Update client-go methods to support context and and new create and delete options

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-03-24 10:44:13 -03:00
parent f4b17d345f
commit a46126a034
32 changed files with 167 additions and 132 deletions

View file

@ -17,6 +17,7 @@ limitations under the License.
package leaks
import (
"context"
"crypto/tls"
"fmt"
"net/http"
@ -102,7 +103,7 @@ func checkIngress(hostname string, f *framework.Framework) {
}
func deleteIngress(hostname string, f *framework.Framework) {
err := f.KubeClientSet.NetworkingV1beta1().Ingresses(f.Namespace).Delete(hostname, &metav1.DeleteOptions{})
err := f.KubeClientSet.NetworkingV1beta1().Ingresses(f.Namespace).Delete(context.TODO(), hostname, metav1.DeleteOptions{})
assert.Nil(ginkgo.GinkgoT(), err, "unexpected error deleting ingress")
}