mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-23 20:17:15 +00:00
generated: run refactor
Kubernetes-commit: 3aa59f7f3077642592dc8a864fcef8ba98699894
This commit is contained in:
committed by
Kubernetes Publisher
parent
5be5d5753f
commit
60a0346672
@@ -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(
|
||||
|
Reference in New Issue
Block a user