generated: run refactor

Kubernetes-commit: 3aa59f7f3077642592dc8a864fcef8ba98699894
This commit is contained in:
Mike Danese
2020-02-07 18:16:47 -08:00
committed by Kubernetes Publisher
parent 5be5d5753f
commit 60a0346672
95 changed files with 290 additions and 199 deletions

View File

@@ -62,12 +62,12 @@ func RequestCertificate(client certificatesclient.CertificateSigningRequestInter
csr.GenerateName = "csr-"
}
req, err = client.Create(csr)
req, err = client.Create(context.TODO(), csr)
switch {
case err == nil:
case errors.IsAlreadyExists(err) && len(name) > 0:
klog.Infof("csr for this node already exists, reusing")
req, err = client.Get(name, metav1.GetOptions{})
req, err = client.Get(context.TODO(), name, metav1.GetOptions{})
if err != nil {
return nil, formatError("cannot retrieve certificate signing request: %v", err)
}
@@ -87,11 +87,11 @@ func WaitForCertificate(ctx context.Context, client certificatesclient.Certifica
lw := &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
options.FieldSelector = fieldSelector
return client.List(options)
return client.List(context.TODO(), options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
options.FieldSelector = fieldSelector
return client.Watch(options)
return client.Watch(context.TODO(), options)
},
}
event, err := watchtools.UntilWithSync(