Merge pull request #88708 from mikedanese/deleteopts

Migrate clientset metav1.DeleteOpts to pass-by-value
This commit is contained in:
Kubernetes Prow Robot
2020-03-05 23:09:23 -08:00
committed by GitHub
430 changed files with 1854 additions and 1855 deletions

View File

@@ -431,7 +431,7 @@ func RunDeleteTokens(out io.Writer, client clientset.Interface, tokenIDsOrTokens
tokenSecretName := bootstraputil.BootstrapTokenSecretName(tokenID) tokenSecretName := bootstraputil.BootstrapTokenSecretName(tokenID)
klog.V(1).Infof("[token] deleting token %q", tokenID) klog.V(1).Infof("[token] deleting token %q", tokenID)
if err := client.CoreV1().Secrets(metav1.NamespaceSystem).Delete(context.TODO(), tokenSecretName, nil); err != nil { if err := client.CoreV1().Secrets(metav1.NamespaceSystem).Delete(context.TODO(), tokenSecretName, metav1.DeleteOptions{}); err != nil {
return errors.Wrapf(err, "failed to delete bootstrap token %q", tokenID) return errors.Wrapf(err, "failed to delete bootstrap token %q", tokenID)
} }
fmt.Fprintf(out, "bootstrap token %q deleted\n", tokenID) fmt.Fprintf(out, "bootstrap token %q deleted\n", tokenID)

View File

@@ -200,10 +200,7 @@ func createJob(client clientset.Interface, cfg *kubeadmapi.ClusterConfiguration)
func deleteHealthCheckJob(client clientset.Interface, ns, jobName string) error { func deleteHealthCheckJob(client clientset.Interface, ns, jobName string) error {
klog.V(2).Infof("Deleting Job %q in the namespace %q", jobName, ns) klog.V(2).Infof("Deleting Job %q in the namespace %q", jobName, ns)
propagation := metav1.DeletePropagationForeground propagation := metav1.DeletePropagationForeground
deleteOptions := &metav1.DeleteOptions{ if err := client.BatchV1().Jobs(ns).Delete(context.TODO(), jobName, metav1.DeleteOptions{PropagationPolicy: &propagation}); err != nil {
PropagationPolicy: &propagation,
}
if err := client.BatchV1().Jobs(ns).Delete(context.TODO(), jobName, deleteOptions); err != nil {
return errors.Wrapf(err, "could not delete Job %q in the namespace %q", jobName, ns) return errors.Wrapf(err, "could not delete Job %q in the namespace %q", jobName, ns)
} }
return nil return nil

View File

@@ -194,19 +194,13 @@ func CreateOrUpdateDaemonSet(client clientset.Interface, ds *apps.DaemonSet) err
// DeleteDaemonSetForeground deletes the specified DaemonSet in foreground mode; i.e. it blocks until/makes sure all the managed Pods are deleted // DeleteDaemonSetForeground deletes the specified DaemonSet in foreground mode; i.e. it blocks until/makes sure all the managed Pods are deleted
func DeleteDaemonSetForeground(client clientset.Interface, namespace, name string) error { func DeleteDaemonSetForeground(client clientset.Interface, namespace, name string) error {
foregroundDelete := metav1.DeletePropagationForeground foregroundDelete := metav1.DeletePropagationForeground
deleteOptions := &metav1.DeleteOptions{ return client.AppsV1().DaemonSets(namespace).Delete(context.TODO(), name, metav1.DeleteOptions{PropagationPolicy: &foregroundDelete})
PropagationPolicy: &foregroundDelete,
}
return client.AppsV1().DaemonSets(namespace).Delete(context.TODO(), name, deleteOptions)
} }
// DeleteDeploymentForeground deletes the specified Deployment in foreground mode; i.e. it blocks until/makes sure all the managed Pods are deleted // DeleteDeploymentForeground deletes the specified Deployment in foreground mode; i.e. it blocks until/makes sure all the managed Pods are deleted
func DeleteDeploymentForeground(client clientset.Interface, namespace, name string) error { func DeleteDeploymentForeground(client clientset.Interface, namespace, name string) error {
foregroundDelete := metav1.DeletePropagationForeground foregroundDelete := metav1.DeletePropagationForeground
deleteOptions := &metav1.DeleteOptions{ return client.AppsV1().Deployments(namespace).Delete(context.TODO(), name, metav1.DeleteOptions{PropagationPolicy: &foregroundDelete})
PropagationPolicy: &foregroundDelete,
}
return client.AppsV1().Deployments(namespace).Delete(context.TODO(), name, deleteOptions)
} }
// CreateOrUpdateRole creates a Role if the target resource doesn't exist. If the resource exists already, this function will update the resource instead. // CreateOrUpdateRole creates a Role if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.

View File

@@ -192,9 +192,9 @@ func (tc *TokenCleaner) evalSecret(o interface{}) {
ttl, alreadyExpired := bootstrapsecretutil.GetExpiration(secret, time.Now()) ttl, alreadyExpired := bootstrapsecretutil.GetExpiration(secret, time.Now())
if alreadyExpired { if alreadyExpired {
klog.V(3).Infof("Deleting expired secret %s/%s", secret.Namespace, secret.Name) klog.V(3).Infof("Deleting expired secret %s/%s", secret.Namespace, secret.Name)
var options *metav1.DeleteOptions var options metav1.DeleteOptions
if len(secret.UID) > 0 { if len(secret.UID) > 0 {
options = &metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &secret.UID}} options.Preconditions = &metav1.Preconditions{UID: &secret.UID}
} }
err := tc.client.CoreV1().Secrets(secret.Namespace).Delete(context.TODO(), secret.Name, options) err := tc.client.CoreV1().Secrets(secret.Namespace).Delete(context.TODO(), secret.Name, options)
// NotFound isn't a real error (it's already been deleted) // NotFound isn't a real error (it's already been deleted)

View File

@@ -109,7 +109,7 @@ func (ccc *CSRCleanerController) handle(csr *capi.CertificateSigningRequest) err
return err return err
} }
if isIssuedPastDeadline(csr) || isDeniedPastDeadline(csr) || isPendingPastDeadline(csr) || isIssuedExpired { if isIssuedPastDeadline(csr) || isDeniedPastDeadline(csr) || isPendingPastDeadline(csr) || isIssuedExpired {
if err := ccc.csrClient.Delete(context.TODO(), csr.Name, nil); err != nil { if err := ccc.csrClient.Delete(context.TODO(), csr.Name, metav1.DeleteOptions{}); err != nil {
return fmt.Errorf("unable to delete CSR %q: %v", csr.Name, err) return fmt.Errorf("unable to delete CSR %q: %v", csr.Name, err)
} }
} }

View File

@@ -157,7 +157,7 @@ func (b SAControllerClientBuilder) Config(name string) (*restclient.Config, erro
if !valid { if !valid {
klog.Warningf("secret %s contained an invalid API token for %s/%s", secret.Name, sa.Namespace, sa.Name) klog.Warningf("secret %s contained an invalid API token for %s/%s", secret.Name, sa.Namespace, sa.Name)
// try to delete the secret containing the invalid token // try to delete the secret containing the invalid token
if err := b.CoreClient.Secrets(secret.Namespace).Delete(context.TODO(), secret.Name, &metav1.DeleteOptions{}); err != nil && !apierrors.IsNotFound(err) { if err := b.CoreClient.Secrets(secret.Namespace).Delete(context.TODO(), secret.Name, metav1.DeleteOptions{}); err != nil && !apierrors.IsNotFound(err) {
klog.Warningf("error deleting secret %s containing invalid API token for %s/%s: %v", secret.Name, sa.Namespace, sa.Name, err) klog.Warningf("error deleting secret %s containing invalid API token for %s/%s: %v", secret.Name, sa.Namespace, sa.Name, err)
} }
// continue watching for good tokens // continue watching for good tokens

View File

@@ -23,6 +23,7 @@ import (
"time" "time"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
utilruntime "k8s.io/apimachinery/pkg/util/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime"
@@ -190,7 +191,7 @@ func (c *CloudNodeLifecycleController) MonitorNodes() {
fmt.Sprintf("Deleting node %v because it does not exist in the cloud provider", node.Name), fmt.Sprintf("Deleting node %v because it does not exist in the cloud provider", node.Name),
"Node %s event: %s", node.Name, deleteNodeEvent) "Node %s event: %s", node.Name, deleteNodeEvent)
if err := c.kubeClient.CoreV1().Nodes().Delete(context.TODO(), node.Name, nil); err != nil { if err := c.kubeClient.CoreV1().Nodes().Delete(context.TODO(), node.Name, metav1.DeleteOptions{}); err != nil {
klog.Errorf("unable to delete node %q: %v", node.Name, err) klog.Errorf("unable to delete node %q: %v", node.Name, err)
} }
} }

View File

@@ -602,7 +602,7 @@ func (r RealPodControl) DeletePod(namespace string, podID string, object runtime
return fmt.Errorf("object does not have ObjectMeta, %v", err) return fmt.Errorf("object does not have ObjectMeta, %v", err)
} }
klog.V(2).Infof("Controller %v deleting pod %v/%v", accessor.GetName(), namespace, podID) klog.V(2).Infof("Controller %v deleting pod %v/%v", accessor.GetName(), namespace, podID)
if err := r.KubeClient.CoreV1().Pods(namespace).Delete(context.TODO(), podID, nil); err != nil && !apierrors.IsNotFound(err) { if err := r.KubeClient.CoreV1().Pods(namespace).Delete(context.TODO(), podID, metav1.DeleteOptions{}); err != nil && !apierrors.IsNotFound(err) {
r.Recorder.Eventf(object, v1.EventTypeWarning, FailedDeletePodReason, "Error deleting: %v", err) r.Recorder.Eventf(object, v1.EventTypeWarning, FailedDeletePodReason, "Error deleting: %v", err)
return fmt.Errorf("unable to delete pods: %v", err) return fmt.Errorf("unable to delete pods: %v", err)
} }

View File

@@ -120,7 +120,7 @@ func (r realJobControl) CreateJob(namespace string, job *batchv1.Job) (*batchv1.
func (r realJobControl) DeleteJob(namespace string, name string) error { func (r realJobControl) DeleteJob(namespace string, name string) error {
background := metav1.DeletePropagationBackground background := metav1.DeletePropagationBackground
return r.KubeClient.BatchV1().Jobs(namespace).Delete(context.TODO(), name, &metav1.DeleteOptions{PropagationPolicy: &background}) return r.KubeClient.BatchV1().Jobs(namespace).Delete(context.TODO(), name, metav1.DeleteOptions{PropagationPolicy: &background})
} }
type fakeJobControl struct { type fakeJobControl struct {
@@ -222,7 +222,7 @@ func (r realPodControl) ListPods(namespace string, opts metav1.ListOptions) (*v1
} }
func (r realPodControl) DeletePod(namespace string, name string) error { func (r realPodControl) DeletePod(namespace string, name string) error {
return r.KubeClient.CoreV1().Pods(namespace).Delete(context.TODO(), name, nil) return r.KubeClient.CoreV1().Pods(namespace).Delete(context.TODO(), name, metav1.DeleteOptions{})
} }
type fakePodControl struct { type fakePodControl struct {

View File

@@ -171,7 +171,7 @@ func (dsc *DaemonSetsController) cleanupHistory(ds *apps.DaemonSet, old []*apps.
continue continue
} }
// Clean up // Clean up
err := dsc.kubeClient.AppsV1().ControllerRevisions(ds.Namespace).Delete(context.TODO(), history.Name, nil) err := dsc.kubeClient.AppsV1().ControllerRevisions(ds.Namespace).Delete(context.TODO(), history.Name, metav1.DeleteOptions{})
if err != nil { if err != nil {
return err return err
} }
@@ -227,7 +227,7 @@ func (dsc *DaemonSetsController) dedupCurHistories(ds *apps.DaemonSet, curHistor
} }
} }
// Remove duplicates // Remove duplicates
err = dsc.kubeClient.AppsV1().ControllerRevisions(ds.Namespace).Delete(context.TODO(), cur.Name, nil) err = dsc.kubeClient.AppsV1().ControllerRevisions(ds.Namespace).Delete(context.TODO(), cur.Name, metav1.DeleteOptions{})
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@@ -458,7 +458,7 @@ func (dc *DeploymentController) cleanupDeployment(oldRSs []*apps.ReplicaSet, dep
continue continue
} }
klog.V(4).Infof("Trying to cleanup replica set %q for deployment %q", rs.Name, deployment.Name) klog.V(4).Infof("Trying to cleanup replica set %q for deployment %q", rs.Name, deployment.Name)
if err := dc.client.AppsV1().ReplicaSets(rs.Namespace).Delete(context.TODO(), rs.Name, nil); err != nil && !errors.IsNotFound(err) { if err := dc.client.AppsV1().ReplicaSets(rs.Namespace).Delete(context.TODO(), rs.Name, metav1.DeleteOptions{}); err != nil && !errors.IsNotFound(err) {
// Return error instead of aggregating and continuing DELETEs on the theory // Return error instead of aggregating and continuing DELETEs on the theory
// that we may be overloading the api server. // that we may be overloading the api server.
return err return err

View File

@@ -1133,7 +1133,7 @@ func TestUpdatePDBStatusRetries(t *testing.T) {
}) })
// (A) Delete one pod // (A) Delete one pod
if err := dc.coreClient.CoreV1().Pods("default").Delete(context.TODO(), podNames[0], &metav1.DeleteOptions{}); err != nil { if err := dc.coreClient.CoreV1().Pods("default").Delete(context.TODO(), podNames[0], metav1.DeleteOptions{}); err != nil {
t.Fatal(err) t.Fatal(err)
} }
if err := waitForCacheCount(dc.podStore, len(podNames)-1); err != nil { if err := waitForCacheCount(dc.podStore, len(podNames)-1); err != nil {

View File

@@ -369,7 +369,7 @@ func (e *EndpointController) syncService(key string) error {
// service is deleted. However, if we're down at the time when // service is deleted. However, if we're down at the time when
// the service is deleted, we will miss that deletion, so this // the service is deleted, we will miss that deletion, so this
// doesn't completely solve the problem. See #6877. // doesn't completely solve the problem. See #6877.
err = e.client.CoreV1().Endpoints(namespace).Delete(context.TODO(), name, nil) err = e.client.CoreV1().Endpoints(namespace).Delete(context.TODO(), name, metav1.DeleteOptions{})
if err != nil && !errors.IsNotFound(err) { if err != nil && !errors.IsNotFound(err) {
return err return err
} }

View File

@@ -231,7 +231,7 @@ func (r *reconciler) finalize(
} }
for _, endpointSlice := range slicesToDelete { for _, endpointSlice := range slicesToDelete {
err := r.client.DiscoveryV1beta1().EndpointSlices(service.Namespace).Delete(context.TODO(), endpointSlice.Name, &metav1.DeleteOptions{}) err := r.client.DiscoveryV1beta1().EndpointSlices(service.Namespace).Delete(context.TODO(), endpointSlice.Name, metav1.DeleteOptions{})
if err != nil { if err != nil {
errs = append(errs, fmt.Errorf("Error deleting %s EndpointSlice for Service %s/%s: %v", endpointSlice.Name, service.Namespace, service.Name, err)) errs = append(errs, fmt.Errorf("Error deleting %s EndpointSlice for Service %s/%s: %v", endpointSlice.Name, service.Namespace, service.Name, err))
} else { } else {

View File

@@ -289,7 +289,7 @@ func (rh *realHistory) UpdateControllerRevision(revision *apps.ControllerRevisio
} }
func (rh *realHistory) DeleteControllerRevision(revision *apps.ControllerRevision) error { func (rh *realHistory) DeleteControllerRevision(revision *apps.ControllerRevision) error {
return rh.client.AppsV1().ControllerRevisions(revision.Namespace).Delete(context.TODO(), revision.Name, nil) return rh.client.AppsV1().ControllerRevisions(revision.Namespace).Delete(context.TODO(), revision.Name, metav1.DeleteOptions{})
} }
type objectForPatch struct { type objectForPatch struct {

View File

@@ -109,7 +109,7 @@ func deletePodHandler(c clientset.Interface, emitEventFunc func(types.Namespaced
} }
var err error var err error
for i := 0; i < retries; i++ { for i := 0; i < retries; i++ {
err = c.CoreV1().Pods(ns).Delete(context.TODO(), name, &metav1.DeleteOptions{}) err = c.CoreV1().Pods(ns).Delete(context.TODO(), name, metav1.DeleteOptions{})
if err == nil { if err == nil {
break break
} }

View File

@@ -76,7 +76,7 @@ func NewPodGC(kubeClient clientset.Interface, podInformer coreinformers.PodInfor
nodeQueue: workqueue.NewNamedDelayingQueue("orphaned_pods_nodes"), nodeQueue: workqueue.NewNamedDelayingQueue("orphaned_pods_nodes"),
deletePod: func(namespace, name string) error { deletePod: func(namespace, name string) error {
klog.Infof("PodGC is force deleting Pod: %v/%v", namespace, name) klog.Infof("PodGC is force deleting Pod: %v/%v", namespace, name)
return kubeClient.CoreV1().Pods(namespace).Delete(context.TODO(), name, metav1.NewDeleteOptions(0)) return kubeClient.CoreV1().Pods(namespace).Delete(context.TODO(), name, *metav1.NewDeleteOptions(0))
}, },
} }

View File

@@ -349,7 +349,7 @@ func TestGCOrphaned(t *testing.T) {
client.CoreV1().Nodes().Create(context.TODO(), node, metav1.CreateOptions{}) client.CoreV1().Nodes().Create(context.TODO(), node, metav1.CreateOptions{})
} }
for _, node := range test.deletedClientNodes { for _, node := range test.deletedClientNodes {
client.CoreV1().Nodes().Delete(context.TODO(), node.Name, &metav1.DeleteOptions{}) client.CoreV1().Nodes().Delete(context.TODO(), node.Name, metav1.DeleteOptions{})
} }
for _, node := range test.addedInformerNodes { for _, node := range test.addedInformerNodes {
nodeInformer.Informer().GetStore().Add(node) nodeInformer.Informer().GetStore().Add(node)

View File

@@ -1203,7 +1203,7 @@ func TestExpectationsOnRecreate(t *testing.T) {
t.Fatal("Unexpected item in the queue") t.Fatal("Unexpected item in the queue")
} }
err = client.AppsV1().ReplicaSets(oldRS.Namespace).Delete(context.TODO(), oldRS.Name, &metav1.DeleteOptions{}) err = client.AppsV1().ReplicaSets(oldRS.Namespace).Delete(context.TODO(), oldRS.Name, metav1.DeleteOptions{})
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }

View File

@@ -342,9 +342,9 @@ func (e *TokensController) deleteTokens(serviceAccount *v1.ServiceAccount) ( /*r
} }
func (e *TokensController) deleteToken(ns, name string, uid types.UID) ( /*retry*/ bool, error) { func (e *TokensController) deleteToken(ns, name string, uid types.UID) ( /*retry*/ bool, error) {
var opts *metav1.DeleteOptions var opts metav1.DeleteOptions
if len(uid) > 0 { if len(uid) > 0 {
opts = &metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &uid}} opts.Preconditions = &metav1.Preconditions{UID: &uid}
} }
err := e.client.CoreV1().Secrets(ns).Delete(context.TODO(), name, opts) err := e.client.CoreV1().Secrets(ns).Delete(context.TODO(), name, opts)
// NotFound doesn't need a retry (it's already been deleted) // NotFound doesn't need a retry (it's already been deleted)
@@ -460,9 +460,9 @@ func (e *TokensController) ensureReferencedToken(serviceAccount *v1.ServiceAccou
if !addedReference { if !addedReference {
// we weren't able to use the token, try to clean it up. // we weren't able to use the token, try to clean it up.
klog.V(2).Infof("deleting secret %s/%s because reference couldn't be added (%v)", secret.Namespace, secret.Name, err) klog.V(2).Infof("deleting secret %s/%s because reference couldn't be added (%v)", secret.Namespace, secret.Name, err)
deleteOpts := &metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &createdToken.UID}} deleteOpts := metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &createdToken.UID}}
if deleteErr := e.client.CoreV1().Secrets(createdToken.Namespace).Delete(context.TODO(), createdToken.Name, deleteOpts); deleteErr != nil { if err := e.client.CoreV1().Secrets(createdToken.Namespace).Delete(context.TODO(), createdToken.Name, deleteOpts); err != nil {
klog.Error(deleteErr) // if we fail, just log it klog.Error(err) // if we fail, just log it
} }
} }

View File

@@ -136,7 +136,7 @@ func (spc *realStatefulPodControl) UpdateStatefulPod(set *apps.StatefulSet, pod
} }
func (spc *realStatefulPodControl) DeleteStatefulPod(set *apps.StatefulSet, pod *v1.Pod) error { func (spc *realStatefulPodControl) DeleteStatefulPod(set *apps.StatefulSet, pod *v1.Pod) error {
err := spc.client.CoreV1().Pods(set.Namespace).Delete(context.TODO(), pod.Name, nil) err := spc.client.CoreV1().Pods(set.Namespace).Delete(context.TODO(), pod.Name, metav1.DeleteOptions{})
spc.recordPodEvent("delete", set, pod, err) spc.recordPodEvent("delete", set, pod, err)
return err return err
} }

View File

@@ -26,28 +26,26 @@ import (
"testing" "testing"
"time" "time"
v1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/clock"
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apimachinery/pkg/util/strategicpatch"
"k8s.io/apimachinery/pkg/watch" "k8s.io/apimachinery/pkg/watch"
"k8s.io/apimachinery/pkg/util/clock"
ref "k8s.io/client-go/tools/reference"
v1 "k8s.io/api/core/v1"
"k8s.io/client-go/kubernetes/fake" "k8s.io/client-go/kubernetes/fake"
v1core "k8s.io/client-go/kubernetes/typed/core/v1" v1core "k8s.io/client-go/kubernetes/typed/core/v1"
"k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/cache"
ref "k8s.io/client-go/tools/reference"
"k8s.io/klog"
"k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/api/legacyscheme"
api "k8s.io/kubernetes/pkg/apis/core" api "k8s.io/kubernetes/pkg/apis/core"
utilnode "k8s.io/kubernetes/pkg/util/node" utilnode "k8s.io/kubernetes/pkg/util/node"
jsonpatch "github.com/evanphx/json-patch" jsonpatch "github.com/evanphx/json-patch"
"k8s.io/klog"
) )
var ( var (
@@ -183,7 +181,7 @@ func (m *FakeNodeHandler) List(_ context.Context, opts metav1.ListOptions) (*v1.
} }
// Delete deletes a Node from the fake store. // Delete deletes a Node from the fake store.
func (m *FakeNodeHandler) Delete(_ context.Context, id string, opt *metav1.DeleteOptions) error { func (m *FakeNodeHandler) Delete(_ context.Context, id string, opt metav1.DeleteOptions) error {
m.lock.Lock() m.lock.Lock()
defer func() { defer func() {
m.RequestCount++ m.RequestCount++
@@ -197,7 +195,7 @@ func (m *FakeNodeHandler) Delete(_ context.Context, id string, opt *metav1.Delet
} }
// DeleteCollection deletes a collection of Nodes from the fake store. // DeleteCollection deletes a collection of Nodes from the fake store.
func (m *FakeNodeHandler) DeleteCollection(_ context.Context, opt *metav1.DeleteOptions, listOpts metav1.ListOptions) error { func (m *FakeNodeHandler) DeleteCollection(_ context.Context, opt metav1.DeleteOptions, listOpts metav1.ListOptions) error {
return nil return nil
} }

View File

@@ -230,7 +230,7 @@ func (tc *Controller) processJob(key string) error {
} }
// Cascade deletes the Jobs if TTL truly expires. // Cascade deletes the Jobs if TTL truly expires.
policy := metav1.DeletePropagationForeground policy := metav1.DeletePropagationForeground
options := &metav1.DeleteOptions{ options := metav1.DeleteOptions{
PropagationPolicy: &policy, PropagationPolicy: &policy,
Preconditions: &metav1.Preconditions{UID: &fresh.UID}, Preconditions: &metav1.Preconditions{UID: &fresh.UID},
} }

View File

@@ -80,7 +80,7 @@ func DeletePods(kubeClient clientset.Interface, pods []*v1.Pod, recorder record.
klog.V(2).Infof("Starting deletion of pod %v/%v", pod.Namespace, pod.Name) klog.V(2).Infof("Starting deletion of pod %v/%v", pod.Namespace, pod.Name)
recorder.Eventf(pod, v1.EventTypeNormal, "NodeControllerEviction", "Marking for deletion Pod %s from Node %s", pod.Name, nodeName) recorder.Eventf(pod, v1.EventTypeNormal, "NodeControllerEviction", "Marking for deletion Pod %s from Node %s", pod.Name, nodeName)
if err := kubeClient.CoreV1().Pods(pod.Namespace).Delete(context.TODO(), pod.Name, nil); err != nil { if err := kubeClient.CoreV1().Pods(pod.Namespace).Delete(context.TODO(), pod.Name, metav1.DeleteOptions{}); err != nil {
if apierrors.IsNotFound(err) { if apierrors.IsNotFound(err) {
// NotFound error means that pod was already deleted. // NotFound error means that pod was already deleted.
// There is nothing left to do with this pod. // There is nothing left to do with this pod.

View File

@@ -1227,7 +1227,7 @@ func (ctrl *PersistentVolumeController) deleteVolumeOperation(volume *v1.Persist
klog.V(4).Infof("deleteVolumeOperation [%s]: success", volume.Name) klog.V(4).Infof("deleteVolumeOperation [%s]: success", volume.Name)
// Delete the volume // Delete the volume
if err = ctrl.kubeClient.CoreV1().PersistentVolumes().Delete(context.TODO(), volume.Name, nil); err != nil { if err = ctrl.kubeClient.CoreV1().PersistentVolumes().Delete(context.TODO(), volume.Name, metav1.DeleteOptions{}); err != nil {
// Oops, could not delete the volume and therefore the controller will // Oops, could not delete the volume and therefore the controller will
// try to delete the volume again on next update. We _could_ maintain a // try to delete the volume again on next update. We _could_ maintain a
// cache of "recently deleted volumes" and avoid unnecessary deletion, // cache of "recently deleted volumes" and avoid unnecessary deletion,

View File

@@ -1813,7 +1813,7 @@ func TestBindPodVolumes(t *testing.T) {
delayFunc: func(t *testing.T, testEnv *testEnv, pod *v1.Pod, pvs []*v1.PersistentVolume, pvcs []*v1.PersistentVolumeClaim) { delayFunc: func(t *testing.T, testEnv *testEnv, pod *v1.Pod, pvs []*v1.PersistentVolume, pvcs []*v1.PersistentVolumeClaim) {
pvc := pvcs[0] pvc := pvcs[0]
// Delete PVC will fail check // Delete PVC will fail check
if err := testEnv.client.CoreV1().PersistentVolumeClaims(pvc.Namespace).Delete(context.TODO(), pvc.Name, &metav1.DeleteOptions{}); err != nil { if err := testEnv.client.CoreV1().PersistentVolumeClaims(pvc.Namespace).Delete(context.TODO(), pvc.Name, metav1.DeleteOptions{}); err != nil {
t.Errorf("failed to delete PVC %q: %v", pvc.Name, err) t.Errorf("failed to delete PVC %q: %v", pvc.Name, err)
} }
}, },

View File

@@ -124,7 +124,7 @@ func (mc *basicMirrorClient) DeleteMirrorPod(podFullName string, uid *types.UID)
} }
klog.V(2).Infof("Deleting a mirror pod %q (uid %#v)", podFullName, uid) klog.V(2).Infof("Deleting a mirror pod %q (uid %#v)", podFullName, uid)
var GracePeriodSeconds int64 var GracePeriodSeconds int64
if err := mc.apiserverClient.CoreV1().Pods(namespace).Delete(context.TODO(), name, &metav1.DeleteOptions{GracePeriodSeconds: &GracePeriodSeconds, Preconditions: &metav1.Preconditions{UID: uid}}); err != nil { if err := mc.apiserverClient.CoreV1().Pods(namespace).Delete(context.TODO(), name, metav1.DeleteOptions{GracePeriodSeconds: &GracePeriodSeconds, Preconditions: &metav1.Preconditions{UID: uid}}); err != nil {
// Unfortunately, there's no generic error for failing a precondition // Unfortunately, there's no generic error for failing a precondition
if !(apierrors.IsNotFound(err) || apierrors.IsConflict(err)) { if !(apierrors.IsNotFound(err) || apierrors.IsConflict(err)) {
// We should return the error here, but historically this routine does // We should return the error here, but historically this routine does

View File

@@ -583,9 +583,12 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) {
// We don't handle graceful deletion of mirror pods. // We don't handle graceful deletion of mirror pods.
if m.canBeDeleted(pod, status.status) { if m.canBeDeleted(pod, status.status) {
deleteOptions := metav1.NewDeleteOptions(0) deleteOptions := metav1.DeleteOptions{
// Use the pod UID as the precondition for deletion to prevent deleting a newly created pod with the same name and namespace. GracePeriodSeconds: new(int64),
deleteOptions.Preconditions = metav1.NewUIDPreconditions(string(pod.UID)) // Use the pod UID as the precondition for deletion to prevent deleting a
// newly created pod with the same name and namespace.
Preconditions: metav1.NewUIDPreconditions(string(pod.UID)),
}
err = m.kubeClient.CoreV1().Pods(pod.Namespace).Delete(context.TODO(), pod.Name, deleteOptions) err = m.kubeClient.CoreV1().Pods(pod.Namespace).Delete(context.TODO(), pod.Name, deleteOptions)
if err != nil { if err != nil {
klog.Warningf("Failed to delete status for pod %q: %v", format.Pod(pod), err) klog.Warningf("Failed to delete status for pod %q: %v", format.Pod(pod), err)

View File

@@ -249,7 +249,7 @@ func (kubemarkController *KubemarkController) RemoveNodeFromNodeGroup(nodeGroup
var err error var err error
for i := 0; i < numRetries; i++ { for i := 0; i < numRetries; i++ {
err = kubemarkController.externalCluster.client.CoreV1().ReplicationControllers(namespaceKubemark).Delete(context.TODO(), pod.ObjectMeta.Labels["name"], err = kubemarkController.externalCluster.client.CoreV1().ReplicationControllers(namespaceKubemark).Delete(context.TODO(), pod.ObjectMeta.Labels["name"],
&metav1.DeleteOptions{PropagationPolicy: &policy}) metav1.DeleteOptions{PropagationPolicy: &policy})
if err == nil { if err == nil {
klog.Infof("marking node %s for deletion", node) klog.Infof("marking node %s for deletion", node)
// Mark node for deletion from kubemark cluster. // Mark node for deletion from kubemark cluster.
@@ -374,7 +374,7 @@ func (kubemarkCluster *kubemarkCluster) removeUnneededNodes(oldObj interface{},
defer kubemarkCluster.nodesToDeleteLock.Unlock() defer kubemarkCluster.nodesToDeleteLock.Unlock()
if kubemarkCluster.nodesToDelete[node.Name] { if kubemarkCluster.nodesToDelete[node.Name] {
kubemarkCluster.nodesToDelete[node.Name] = false kubemarkCluster.nodesToDelete[node.Name] = false
if err := kubemarkCluster.client.CoreV1().Nodes().Delete(context.TODO(), node.Name, &metav1.DeleteOptions{}); err != nil { if err := kubemarkCluster.client.CoreV1().Nodes().Delete(context.TODO(), node.Name, metav1.DeleteOptions{}); err != nil {
klog.Errorf("failed to delete node %s from kubemark cluster, err: %v", node.Name, err) klog.Errorf("failed to delete node %s from kubemark cluster, err: %v", node.Name, err)
} }
} }

View File

@@ -205,7 +205,7 @@ func writeConfigMap(configMapClient corev1client.ConfigMapsGetter, required *cor
// 1. request is so big the generic request catcher finds it // 1. request is so big the generic request catcher finds it
// 2. the content is so large that that the server sends a validation error "Too long: must have at most 1048576 characters" // 2. the content is so large that that the server sends a validation error "Too long: must have at most 1048576 characters"
if apierrors.IsRequestEntityTooLargeError(err) || (apierrors.IsInvalid(err) && strings.Contains(err.Error(), "Too long")) { if apierrors.IsRequestEntityTooLargeError(err) || (apierrors.IsInvalid(err) && strings.Contains(err.Error(), "Too long")) {
if deleteErr := configMapClient.ConfigMaps(required.Namespace).Delete(context.TODO(), required.Name, nil); deleteErr != nil { if deleteErr := configMapClient.ConfigMaps(required.Namespace).Delete(context.TODO(), required.Name, metav1.DeleteOptions{}); deleteErr != nil {
return deleteErr return deleteErr
} }
return err return err

View File

@@ -99,7 +99,7 @@ func (adapter *EndpointsAdapter) EnsureEndpointSliceFromEndpoints(namespace stri
// required for transition from IP to IPv4 address type. // required for transition from IP to IPv4 address type.
if currentEndpointSlice.AddressType != endpointSlice.AddressType { if currentEndpointSlice.AddressType != endpointSlice.AddressType {
err = adapter.endpointSliceClient.EndpointSlices(namespace).Delete(context.TODO(), endpointSlice.Name, &metav1.DeleteOptions{}) err = adapter.endpointSliceClient.EndpointSlices(namespace).Delete(context.TODO(), endpointSlice.Name, metav1.DeleteOptions{})
if err != nil { if err != nil {
return err return err
} }

View File

@@ -106,5 +106,5 @@ func (c ClusterRoleBindingClientAdapter) Update(in RoleBinding) (RoleBinding, er
} }
func (c ClusterRoleBindingClientAdapter) Delete(namespace, name string, uid types.UID) error { func (c ClusterRoleBindingClientAdapter) Delete(namespace, name string, uid types.UID) error {
return c.Client.Delete(context.TODO(), name, &metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &uid}}) return c.Client.Delete(context.TODO(), name, metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &uid}})
} }

View File

@@ -112,5 +112,5 @@ func (c RoleBindingClientAdapter) Update(in RoleBinding) (RoleBinding, error) {
} }
func (c RoleBindingClientAdapter) Delete(namespace, name string, uid types.UID) error { func (c RoleBindingClientAdapter) Delete(namespace, name string, uid types.UID) error {
return c.Client.RoleBindings(namespace).Delete(context.TODO(), name, &metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &uid}}) return c.Client.RoleBindings(namespace).Delete(context.TODO(), name, metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &uid}})
} }

View File

@@ -787,7 +787,7 @@ func (p *podPreemptorImpl) getUpdatedPod(pod *v1.Pod) (*v1.Pod, error) {
} }
func (p *podPreemptorImpl) deletePod(pod *v1.Pod) error { func (p *podPreemptorImpl) deletePod(pod *v1.Pod) error {
return p.Client.CoreV1().Pods(pod.Namespace).Delete(context.TODO(), pod.Name, &metav1.DeleteOptions{}) return p.Client.CoreV1().Pods(pod.Namespace).Delete(context.TODO(), pod.Name, metav1.DeleteOptions{})
} }
func (p *podPreemptorImpl) setNominatedNodeName(pod *v1.Pod, nominatedNodeName string) error { func (p *podPreemptorImpl) setNominatedNodeName(pod *v1.Pod, nominatedNodeName string) error {

View File

@@ -394,7 +394,7 @@ func (c *csiAttacher) Detach(volumeName string, nodeName types.NodeName) error {
attachID = getAttachmentName(volID, driverName, string(nodeName)) attachID = getAttachmentName(volID, driverName, string(nodeName))
} }
if err := c.k8s.StorageV1().VolumeAttachments().Delete(context.TODO(), attachID, nil); err != nil { if err := c.k8s.StorageV1().VolumeAttachments().Delete(context.TODO(), attachID, metav1.DeleteOptions{}); err != nil {
if apierrors.IsNotFound(err) { if apierrors.IsNotFound(err) {
// object deleted or never existed, done // object deleted or never existed, done
klog.V(4).Info(log("VolumeAttachment object [%v] for volume [%v] not found, object deleted", attachID, volID)) klog.V(4).Info(log("VolumeAttachment object [%v] for volume [%v] not found, object deleted", attachID, volID))

View File

@@ -840,7 +840,7 @@ func (p *glusterfsVolumeProvisioner) CreateVolume(gid int) (r *v1.GlusterfsPersi
klog.Errorf("failed to delete volume: %v, manual deletion of the volume required", deleteErr) klog.Errorf("failed to delete volume: %v, manual deletion of the volume required", deleteErr)
} }
klog.V(3).Infof("failed to update endpoint, deleting %s", endpoint) klog.V(3).Infof("failed to update endpoint, deleting %s", endpoint)
err = kubeClient.CoreV1().Services(epNamespace).Delete(context.TODO(), epServiceName, nil) err = kubeClient.CoreV1().Services(epNamespace).Delete(context.TODO(), epServiceName, metav1.DeleteOptions{})
if err != nil && errors.IsNotFound(err) { if err != nil && errors.IsNotFound(err) {
klog.V(1).Infof("service %s does not exist in namespace %s", epServiceName, epNamespace) klog.V(1).Infof("service %s does not exist in namespace %s", epServiceName, epNamespace)
err = nil err = nil
@@ -921,7 +921,7 @@ func (d *glusterfsVolumeDeleter) deleteEndpointService(namespace string, epServi
if kubeClient == nil { if kubeClient == nil {
return fmt.Errorf("failed to get kube client when deleting endpoint service") return fmt.Errorf("failed to get kube client when deleting endpoint service")
} }
err = kubeClient.CoreV1().Services(namespace).Delete(context.TODO(), epServiceName, nil) err = kubeClient.CoreV1().Services(namespace).Delete(context.TODO(), epServiceName, metav1.DeleteOptions{})
if err != nil { if err != nil {
return fmt.Errorf("failed to delete service %s/%s: %v", namespace, epServiceName, err) return fmt.Errorf("failed to delete service %s/%s: %v", namespace, epServiceName, err)
} }

View File

@@ -186,7 +186,7 @@ func (c *realRecyclerClient) GetPod(name, namespace string) (*v1.Pod, error) {
} }
func (c *realRecyclerClient) DeletePod(name, namespace string) error { func (c *realRecyclerClient) DeletePod(name, namespace string) error {
return c.client.CoreV1().Pods(namespace).Delete(context.TODO(), name, nil) return c.client.CoreV1().Pods(namespace).Delete(context.TODO(), name, metav1.DeleteOptions{})
} }
func (c *realRecyclerClient) Event(eventtype, message string) { func (c *realRecyclerClient) Event(eventtype, message string) {

View File

@@ -40,8 +40,8 @@ type ExamplesGetter interface {
type ExampleInterface interface { type ExampleInterface interface {
Create(ctx context.Context, example *v1.Example, opts metav1.CreateOptions) (*v1.Example, error) Create(ctx context.Context, example *v1.Example, opts metav1.CreateOptions) (*v1.Example, error)
Update(ctx context.Context, example *v1.Example, opts metav1.UpdateOptions) (*v1.Example, error) Update(ctx context.Context, example *v1.Example, opts metav1.UpdateOptions) (*v1.Example, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Example, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Example, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ExampleList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ExampleList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@@ -136,28 +136,28 @@ func (c *examples) Update(ctx context.Context, example *v1.Example, opts metav1.
} }
// Delete takes name of the example and deletes it. Returns an error if one occurs. // Delete takes name of the example and deletes it. Returns an error if one occurs.
func (c *examples) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { func (c *examples) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("examples"). Resource("examples").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *examples) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *examples) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("examples"). Resource("examples").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -103,7 +103,7 @@ func (c *FakeExamples) Update(ctx context.Context, example *crv1.Example, opts v
} }
// Delete takes name of the example and deletes it. Returns an error if one occurs. // Delete takes name of the example and deletes it. Returns an error if one occurs.
func (c *FakeExamples) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeExamples) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(examplesResource, c.ns, name), &crv1.Example{}) Invokes(testing.NewDeleteAction(examplesResource, c.ns, name), &crv1.Example{})
@@ -111,8 +111,8 @@ func (c *FakeExamples) Delete(ctx context.Context, name string, options *v1.Dele
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeExamples) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeExamples) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(examplesResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(examplesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &crv1.ExampleList{}) _, err := c.Fake.Invokes(action, &crv1.ExampleList{})
return err return err

View File

@@ -41,8 +41,8 @@ type CustomResourceDefinitionInterface interface {
Create(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.CreateOptions) (*v1.CustomResourceDefinition, error) Create(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.CreateOptions) (*v1.CustomResourceDefinition, error)
Update(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (*v1.CustomResourceDefinition, error) Update(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (*v1.CustomResourceDefinition, error)
UpdateStatus(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (*v1.CustomResourceDefinition, error) UpdateStatus(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (*v1.CustomResourceDefinition, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CustomResourceDefinition, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CustomResourceDefinition, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.CustomResourceDefinitionList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.CustomResourceDefinitionList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@@ -145,26 +145,26 @@ func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customReso
} }
// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. // Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs.
func (c *customResourceDefinitions) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { func (c *customResourceDefinitions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("customresourcedefinitions"). Resource("customresourcedefinitions").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Resource("customresourcedefinitions"). Resource("customresourcedefinitions").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -108,15 +108,15 @@ func (c *FakeCustomResourceDefinitions) UpdateStatus(ctx context.Context, custom
} }
// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. // Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs.
func (c *FakeCustomResourceDefinitions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeCustomResourceDefinitions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewRootDeleteAction(customresourcedefinitionsResource, name), &apiextensionsv1.CustomResourceDefinition{}) Invokes(testing.NewRootDeleteAction(customresourcedefinitionsResource, name), &apiextensionsv1.CustomResourceDefinition{})
return err return err
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeCustomResourceDefinitions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeCustomResourceDefinitions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOptions) action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOpts)
_, err := c.Fake.Invokes(action, &apiextensionsv1.CustomResourceDefinitionList{}) _, err := c.Fake.Invokes(action, &apiextensionsv1.CustomResourceDefinitionList{})
return err return err

View File

@@ -41,8 +41,8 @@ type CustomResourceDefinitionInterface interface {
Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.CreateOptions) (*v1beta1.CustomResourceDefinition, error) Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.CreateOptions) (*v1beta1.CustomResourceDefinition, error)
Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error) Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error)
UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error) UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CustomResourceDefinition, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CustomResourceDefinition, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CustomResourceDefinitionList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CustomResourceDefinitionList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -145,26 +145,26 @@ func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customReso
} }
// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. // Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs.
func (c *customResourceDefinitions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *customResourceDefinitions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("customresourcedefinitions"). Resource("customresourcedefinitions").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Resource("customresourcedefinitions"). Resource("customresourcedefinitions").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -108,15 +108,15 @@ func (c *FakeCustomResourceDefinitions) UpdateStatus(ctx context.Context, custom
} }
// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. // Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs.
func (c *FakeCustomResourceDefinitions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeCustomResourceDefinitions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewRootDeleteAction(customresourcedefinitionsResource, name), &v1beta1.CustomResourceDefinition{}) Invokes(testing.NewRootDeleteAction(customresourcedefinitionsResource, name), &v1beta1.CustomResourceDefinition{})
return err return err
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeCustomResourceDefinitions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeCustomResourceDefinitions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOptions) action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.CustomResourceDefinitionList{}) _, err := c.Fake.Invokes(action, &v1beta1.CustomResourceDefinitionList{})
return err return err

View File

@@ -504,7 +504,7 @@ func isWatchCachePrimed(crd *apiextensionsv1.CustomResourceDefinition, dynamicCl
// DeleteCustomResourceDefinition deletes a CRD and waits until it disappears from discovery. // DeleteCustomResourceDefinition deletes a CRD and waits until it disappears from discovery.
func DeleteCustomResourceDefinition(crd *apiextensionsv1beta1.CustomResourceDefinition, apiExtensionsClient clientset.Interface) error { func DeleteCustomResourceDefinition(crd *apiextensionsv1beta1.CustomResourceDefinition, apiExtensionsClient clientset.Interface) error {
if err := apiExtensionsClient.ApiextensionsV1beta1().CustomResourceDefinitions().Delete(context.TODO(), crd.Name, nil); err != nil { if err := apiExtensionsClient.ApiextensionsV1beta1().CustomResourceDefinitions().Delete(context.TODO(), crd.Name, metav1.DeleteOptions{}); err != nil {
return err return err
} }
for _, version := range servedVersions(crd) { for _, version := range servedVersions(crd) {
@@ -521,7 +521,7 @@ func DeleteCustomResourceDefinition(crd *apiextensionsv1beta1.CustomResourceDefi
// DeleteV1CustomResourceDefinition deletes a CRD and waits until it disappears from discovery. // DeleteV1CustomResourceDefinition deletes a CRD and waits until it disappears from discovery.
func DeleteV1CustomResourceDefinition(crd *apiextensionsv1.CustomResourceDefinition, apiExtensionsClient clientset.Interface) error { func DeleteV1CustomResourceDefinition(crd *apiextensionsv1.CustomResourceDefinition, apiExtensionsClient clientset.Interface) error {
if err := apiExtensionsClient.ApiextensionsV1().CustomResourceDefinitions().Delete(context.TODO(), crd.Name, nil); err != nil { if err := apiExtensionsClient.ApiextensionsV1().CustomResourceDefinitions().Delete(context.TODO(), crd.Name, metav1.DeleteOptions{}); err != nil {
return err return err
} }
for _, version := range servedV1Versions(crd) { for _, version := range servedV1Versions(crd) {
@@ -542,7 +542,7 @@ func DeleteV1CustomResourceDefinitions(deleteListOpts metav1.ListOptions, apiExt
if err != nil { if err != nil {
return err return err
} }
if err = apiExtensionsClient.ApiextensionsV1().CustomResourceDefinitions().DeleteCollection(context.TODO(), nil, deleteListOpts); err != nil { if err = apiExtensionsClient.ApiextensionsV1().CustomResourceDefinitions().DeleteCollection(context.TODO(), metav1.DeleteOptions{}, deleteListOpts); err != nil {
return err return err
} }
for _, crd := range list.Items { for _, crd := range list.Items {

View File

@@ -156,7 +156,7 @@ func main() {
prompt() prompt()
fmt.Println("Deleting deployment...") fmt.Println("Deleting deployment...")
deletePolicy := metav1.DeletePropagationForeground deletePolicy := metav1.DeletePropagationForeground
if err := deploymentsClient.Delete(context.TODO(), "demo-deployment", &metav1.DeleteOptions{ if err := deploymentsClient.Delete(context.TODO(), "demo-deployment", metav1.DeleteOptions{
PropagationPolicy: &deletePolicy, PropagationPolicy: &deletePolicy,
}); err != nil { }); err != nil {
panic(err) panic(err)

View File

@@ -97,15 +97,15 @@ func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutating
} }
// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. // Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *FakeMutatingWebhookConfigurations) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeMutatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &admissionregistrationv1.MutatingWebhookConfiguration{}) Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &admissionregistrationv1.MutatingWebhookConfiguration{})
return err return err
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions) action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOpts)
_, err := c.Fake.Invokes(action, &admissionregistrationv1.MutatingWebhookConfigurationList{}) _, err := c.Fake.Invokes(action, &admissionregistrationv1.MutatingWebhookConfigurationList{})
return err return err

View File

@@ -97,15 +97,15 @@ func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, valida
} }
// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. // Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *FakeValidatingWebhookConfigurations) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeValidatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &admissionregistrationv1.ValidatingWebhookConfiguration{}) Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &admissionregistrationv1.ValidatingWebhookConfiguration{})
return err return err
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOptions) action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOpts)
_, err := c.Fake.Invokes(action, &admissionregistrationv1.ValidatingWebhookConfigurationList{}) _, err := c.Fake.Invokes(action, &admissionregistrationv1.ValidatingWebhookConfigurationList{})
return err return err

View File

@@ -40,8 +40,8 @@ type MutatingWebhookConfigurationsGetter interface {
type MutatingWebhookConfigurationInterface interface { type MutatingWebhookConfigurationInterface interface {
Create(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.CreateOptions) (*v1.MutatingWebhookConfiguration, error) Create(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.CreateOptions) (*v1.MutatingWebhookConfiguration, error)
Update(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.UpdateOptions) (*v1.MutatingWebhookConfiguration, error) Update(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.UpdateOptions) (*v1.MutatingWebhookConfiguration, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.MutatingWebhookConfiguration, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.MutatingWebhookConfiguration, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.MutatingWebhookConfigurationList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.MutatingWebhookConfigurationList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@@ -129,26 +129,26 @@ func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebh
} }
// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. // Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *mutatingWebhookConfigurations) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { func (c *mutatingWebhookConfigurations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("mutatingwebhookconfigurations"). Resource("mutatingwebhookconfigurations").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Resource("mutatingwebhookconfigurations"). Resource("mutatingwebhookconfigurations").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -40,8 +40,8 @@ type ValidatingWebhookConfigurationsGetter interface {
type ValidatingWebhookConfigurationInterface interface { type ValidatingWebhookConfigurationInterface interface {
Create(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.CreateOptions) (*v1.ValidatingWebhookConfiguration, error) Create(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.CreateOptions) (*v1.ValidatingWebhookConfiguration, error)
Update(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.UpdateOptions) (*v1.ValidatingWebhookConfiguration, error) Update(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.UpdateOptions) (*v1.ValidatingWebhookConfiguration, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ValidatingWebhookConfiguration, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ValidatingWebhookConfiguration, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ValidatingWebhookConfigurationList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ValidatingWebhookConfigurationList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@@ -129,26 +129,26 @@ func (c *validatingWebhookConfigurations) Update(ctx context.Context, validating
} }
// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. // Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *validatingWebhookConfigurations) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { func (c *validatingWebhookConfigurations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("validatingwebhookconfigurations"). Resource("validatingwebhookconfigurations").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Resource("validatingwebhookconfigurations"). Resource("validatingwebhookconfigurations").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -97,15 +97,15 @@ func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutating
} }
// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. // Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *FakeMutatingWebhookConfigurations) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeMutatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &v1beta1.MutatingWebhookConfiguration{}) Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &v1beta1.MutatingWebhookConfiguration{})
return err return err
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions) action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.MutatingWebhookConfigurationList{}) _, err := c.Fake.Invokes(action, &v1beta1.MutatingWebhookConfigurationList{})
return err return err

View File

@@ -97,15 +97,15 @@ func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, valida
} }
// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. // Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *FakeValidatingWebhookConfigurations) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeValidatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &v1beta1.ValidatingWebhookConfiguration{}) Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &v1beta1.ValidatingWebhookConfiguration{})
return err return err
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOptions) action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ValidatingWebhookConfigurationList{}) _, err := c.Fake.Invokes(action, &v1beta1.ValidatingWebhookConfigurationList{})
return err return err

View File

@@ -40,8 +40,8 @@ type MutatingWebhookConfigurationsGetter interface {
type MutatingWebhookConfigurationInterface interface { type MutatingWebhookConfigurationInterface interface {
Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.CreateOptions) (*v1beta1.MutatingWebhookConfiguration, error) Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.CreateOptions) (*v1beta1.MutatingWebhookConfiguration, error)
Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (*v1beta1.MutatingWebhookConfiguration, error) Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (*v1beta1.MutatingWebhookConfiguration, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.MutatingWebhookConfiguration, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.MutatingWebhookConfiguration, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.MutatingWebhookConfigurationList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.MutatingWebhookConfigurationList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -129,26 +129,26 @@ func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebh
} }
// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. // Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *mutatingWebhookConfigurations) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *mutatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("mutatingwebhookconfigurations"). Resource("mutatingwebhookconfigurations").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Resource("mutatingwebhookconfigurations"). Resource("mutatingwebhookconfigurations").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -40,8 +40,8 @@ type ValidatingWebhookConfigurationsGetter interface {
type ValidatingWebhookConfigurationInterface interface { type ValidatingWebhookConfigurationInterface interface {
Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (*v1beta1.ValidatingWebhookConfiguration, error) Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (*v1beta1.ValidatingWebhookConfiguration, error)
Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (*v1beta1.ValidatingWebhookConfiguration, error) Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (*v1beta1.ValidatingWebhookConfiguration, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ValidatingWebhookConfiguration, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ValidatingWebhookConfiguration, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ValidatingWebhookConfigurationList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ValidatingWebhookConfigurationList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -129,26 +129,26 @@ func (c *validatingWebhookConfigurations) Update(ctx context.Context, validating
} }
// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. // Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *validatingWebhookConfigurations) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *validatingWebhookConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("validatingwebhookconfigurations"). Resource("validatingwebhookconfigurations").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Resource("validatingwebhookconfigurations"). Resource("validatingwebhookconfigurations").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -40,8 +40,8 @@ type ControllerRevisionsGetter interface {
type ControllerRevisionInterface interface { type ControllerRevisionInterface interface {
Create(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.CreateOptions) (*v1.ControllerRevision, error) Create(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.CreateOptions) (*v1.ControllerRevision, error)
Update(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.UpdateOptions) (*v1.ControllerRevision, error) Update(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.UpdateOptions) (*v1.ControllerRevision, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ControllerRevision, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ControllerRevision, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ControllerRevisionList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ControllerRevisionList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@@ -136,28 +136,28 @@ func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1
} }
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *controllerRevisions) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { func (c *controllerRevisions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("controllerrevisions"). Resource("controllerrevisions").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *controllerRevisions) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *controllerRevisions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("controllerrevisions"). Resource("controllerrevisions").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -41,8 +41,8 @@ type DaemonSetInterface interface {
Create(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.CreateOptions) (*v1.DaemonSet, error) Create(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.CreateOptions) (*v1.DaemonSet, error)
Update(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (*v1.DaemonSet, error) Update(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (*v1.DaemonSet, error)
UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (*v1.DaemonSet, error) UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (*v1.DaemonSet, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DaemonSet, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DaemonSet, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.DaemonSetList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.DaemonSetList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@@ -153,28 +153,28 @@ func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet,
} }
// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
func (c *daemonSets) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { func (c *daemonSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("daemonsets"). Resource("daemonsets").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *daemonSets) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *daemonSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("daemonsets"). Resource("daemonsets").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -42,8 +42,8 @@ type DeploymentInterface interface {
Create(ctx context.Context, deployment *v1.Deployment, opts metav1.CreateOptions) (*v1.Deployment, error) Create(ctx context.Context, deployment *v1.Deployment, opts metav1.CreateOptions) (*v1.Deployment, error)
Update(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (*v1.Deployment, error) Update(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (*v1.Deployment, error)
UpdateStatus(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (*v1.Deployment, error) UpdateStatus(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (*v1.Deployment, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Deployment, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Deployment, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.DeploymentList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.DeploymentList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@@ -157,28 +157,28 @@ func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1.Deploymen
} }
// Delete takes name of the deployment and deletes it. Returns an error if one occurs. // Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *deployments) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { func (c *deployments) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("deployments"). Resource("deployments").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *deployments) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *deployments) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("deployments"). Resource("deployments").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -103,7 +103,7 @@ func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision
} }
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &appsv1.ControllerRevision{}) Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &appsv1.ControllerRevision{})
@@ -111,8 +111,8 @@ func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, optio
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &appsv1.ControllerRevisionList{}) _, err := c.Fake.Invokes(action, &appsv1.ControllerRevisionList{})
return err return err

View File

@@ -115,7 +115,7 @@ func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *appsv1.Dae
} }
// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
func (c *FakeDaemonSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeDaemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &appsv1.DaemonSet{}) Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &appsv1.DaemonSet{})
@@ -123,8 +123,8 @@ func (c *FakeDaemonSets) Delete(ctx context.Context, name string, options *v1.De
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &appsv1.DaemonSetList{}) _, err := c.Fake.Invokes(action, &appsv1.DaemonSetList{})
return err return err

View File

@@ -116,7 +116,7 @@ func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *appsv1.D
} }
// Delete takes name of the deployment and deletes it. Returns an error if one occurs. // Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *FakeDeployments) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &appsv1.Deployment{}) Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &appsv1.Deployment{})
@@ -124,8 +124,8 @@ func (c *FakeDeployments) Delete(ctx context.Context, name string, options *v1.D
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeDeployments) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &appsv1.DeploymentList{}) _, err := c.Fake.Invokes(action, &appsv1.DeploymentList{})
return err return err

View File

@@ -116,7 +116,7 @@ func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *appsv1.R
} }
// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
func (c *FakeReplicaSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeReplicaSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &appsv1.ReplicaSet{}) Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &appsv1.ReplicaSet{})
@@ -124,8 +124,8 @@ func (c *FakeReplicaSets) Delete(ctx context.Context, name string, options *v1.D
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &appsv1.ReplicaSetList{}) _, err := c.Fake.Invokes(action, &appsv1.ReplicaSetList{})
return err return err

View File

@@ -116,7 +116,7 @@ func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *appsv1
} }
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *FakeStatefulSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeStatefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &appsv1.StatefulSet{}) Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &appsv1.StatefulSet{})
@@ -124,8 +124,8 @@ func (c *FakeStatefulSets) Delete(ctx context.Context, name string, options *v1.
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &appsv1.StatefulSetList{}) _, err := c.Fake.Invokes(action, &appsv1.StatefulSetList{})
return err return err

View File

@@ -42,8 +42,8 @@ type ReplicaSetInterface interface {
Create(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.CreateOptions) (*v1.ReplicaSet, error) Create(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.CreateOptions) (*v1.ReplicaSet, error)
Update(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (*v1.ReplicaSet, error) Update(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (*v1.ReplicaSet, error)
UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (*v1.ReplicaSet, error) UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (*v1.ReplicaSet, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ReplicaSet, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ReplicaSet, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ReplicaSetList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ReplicaSetList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@@ -157,28 +157,28 @@ func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSe
} }
// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
func (c *replicaSets) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { func (c *replicaSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("replicasets"). Resource("replicasets").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *replicaSets) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *replicaSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("replicasets"). Resource("replicasets").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -42,8 +42,8 @@ type StatefulSetInterface interface {
Create(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.CreateOptions) (*v1.StatefulSet, error) Create(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.CreateOptions) (*v1.StatefulSet, error)
Update(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (*v1.StatefulSet, error) Update(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (*v1.StatefulSet, error)
UpdateStatus(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (*v1.StatefulSet, error) UpdateStatus(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (*v1.StatefulSet, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.StatefulSet, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.StatefulSet, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.StatefulSetList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.StatefulSetList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@@ -157,28 +157,28 @@ func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1.Statefu
} }
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *statefulSets) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { func (c *statefulSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("statefulsets"). Resource("statefulsets").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *statefulSets) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *statefulSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("statefulsets"). Resource("statefulsets").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -40,8 +40,8 @@ type ControllerRevisionsGetter interface {
type ControllerRevisionInterface interface { type ControllerRevisionInterface interface {
Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.CreateOptions) (*v1beta1.ControllerRevision, error) Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.CreateOptions) (*v1beta1.ControllerRevision, error)
Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.UpdateOptions) (*v1beta1.ControllerRevision, error) Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.UpdateOptions) (*v1beta1.ControllerRevision, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ControllerRevision, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ControllerRevision, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ControllerRevisionList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ControllerRevisionList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -136,28 +136,28 @@ func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1
} }
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *controllerRevisions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *controllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("controllerrevisions"). Resource("controllerrevisions").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *controllerRevisions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *controllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("controllerrevisions"). Resource("controllerrevisions").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -41,8 +41,8 @@ type DeploymentInterface interface {
Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (*v1beta1.Deployment, error) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (*v1beta1.Deployment, error)
Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error)
UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Deployment, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Deployment, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DeploymentList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DeploymentList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -153,28 +153,28 @@ func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Depl
} }
// Delete takes name of the deployment and deletes it. Returns an error if one occurs. // Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *deployments) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *deployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("deployments"). Resource("deployments").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *deployments) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *deployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("deployments"). Resource("deployments").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -103,7 +103,7 @@ func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision
} }
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &v1beta1.ControllerRevision{}) Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &v1beta1.ControllerRevision{})
@@ -111,8 +111,8 @@ func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, optio
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ControllerRevisionList{}) _, err := c.Fake.Invokes(action, &v1beta1.ControllerRevisionList{})
return err return err

View File

@@ -115,7 +115,7 @@ func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta1.
} }
// Delete takes name of the deployment and deletes it. Returns an error if one occurs. // Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *FakeDeployments) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{}) Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})
@@ -123,8 +123,8 @@ func (c *FakeDeployments) Delete(ctx context.Context, name string, options *v1.D
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeDeployments) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{}) _, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{})
return err return err

View File

@@ -115,7 +115,7 @@ func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta
} }
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *FakeStatefulSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeStatefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &v1beta1.StatefulSet{}) Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &v1beta1.StatefulSet{})
@@ -123,8 +123,8 @@ func (c *FakeStatefulSets) Delete(ctx context.Context, name string, options *v1.
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.StatefulSetList{}) _, err := c.Fake.Invokes(action, &v1beta1.StatefulSetList{})
return err return err

View File

@@ -41,8 +41,8 @@ type StatefulSetInterface interface {
Create(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.CreateOptions) (*v1beta1.StatefulSet, error) Create(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.CreateOptions) (*v1beta1.StatefulSet, error)
Update(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (*v1beta1.StatefulSet, error) Update(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (*v1beta1.StatefulSet, error)
UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (*v1beta1.StatefulSet, error) UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (*v1beta1.StatefulSet, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.StatefulSet, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.StatefulSet, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.StatefulSetList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.StatefulSetList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -153,28 +153,28 @@ func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.St
} }
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *statefulSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *statefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("statefulsets"). Resource("statefulsets").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *statefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *statefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("statefulsets"). Resource("statefulsets").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -40,8 +40,8 @@ type ControllerRevisionsGetter interface {
type ControllerRevisionInterface interface { type ControllerRevisionInterface interface {
Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.CreateOptions) (*v1beta2.ControllerRevision, error) Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.CreateOptions) (*v1beta2.ControllerRevision, error)
Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.UpdateOptions) (*v1beta2.ControllerRevision, error) Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.UpdateOptions) (*v1beta2.ControllerRevision, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.ControllerRevision, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.ControllerRevision, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ControllerRevisionList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ControllerRevisionList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -136,28 +136,28 @@ func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1
} }
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *controllerRevisions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *controllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("controllerrevisions"). Resource("controllerrevisions").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *controllerRevisions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *controllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("controllerrevisions"). Resource("controllerrevisions").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -41,8 +41,8 @@ type DaemonSetInterface interface {
Create(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.CreateOptions) (*v1beta2.DaemonSet, error) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.CreateOptions) (*v1beta2.DaemonSet, error)
Update(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (*v1beta2.DaemonSet, error) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (*v1beta2.DaemonSet, error)
UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (*v1beta2.DaemonSet, error) UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (*v1beta2.DaemonSet, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.DaemonSet, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.DaemonSet, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DaemonSetList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DaemonSetList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -153,28 +153,28 @@ func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.Daemon
} }
// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
func (c *daemonSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *daemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("daemonsets"). Resource("daemonsets").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *daemonSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *daemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("daemonsets"). Resource("daemonsets").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -41,8 +41,8 @@ type DeploymentInterface interface {
Create(ctx context.Context, deployment *v1beta2.Deployment, opts v1.CreateOptions) (*v1beta2.Deployment, error) Create(ctx context.Context, deployment *v1beta2.Deployment, opts v1.CreateOptions) (*v1beta2.Deployment, error)
Update(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (*v1beta2.Deployment, error) Update(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (*v1beta2.Deployment, error)
UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (*v1beta2.Deployment, error) UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (*v1beta2.Deployment, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.Deployment, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.Deployment, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DeploymentList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DeploymentList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -153,28 +153,28 @@ func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Depl
} }
// Delete takes name of the deployment and deletes it. Returns an error if one occurs. // Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *deployments) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *deployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("deployments"). Resource("deployments").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *deployments) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *deployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("deployments"). Resource("deployments").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -103,7 +103,7 @@ func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision
} }
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &v1beta2.ControllerRevision{}) Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &v1beta2.ControllerRevision{})
@@ -111,8 +111,8 @@ func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, optio
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta2.ControllerRevisionList{}) _, err := c.Fake.Invokes(action, &v1beta2.ControllerRevisionList{})
return err return err

View File

@@ -115,7 +115,7 @@ func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.Da
} }
// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
func (c *FakeDaemonSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeDaemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &v1beta2.DaemonSet{}) Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &v1beta2.DaemonSet{})
@@ -123,8 +123,8 @@ func (c *FakeDaemonSets) Delete(ctx context.Context, name string, options *v1.De
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta2.DaemonSetList{}) _, err := c.Fake.Invokes(action, &v1beta2.DaemonSetList{})
return err return err

View File

@@ -115,7 +115,7 @@ func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta2.
} }
// Delete takes name of the deployment and deletes it. Returns an error if one occurs. // Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *FakeDeployments) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &v1beta2.Deployment{}) Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &v1beta2.Deployment{})
@@ -123,8 +123,8 @@ func (c *FakeDeployments) Delete(ctx context.Context, name string, options *v1.D
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeDeployments) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta2.DeploymentList{}) _, err := c.Fake.Invokes(action, &v1beta2.DeploymentList{})
return err return err

View File

@@ -115,7 +115,7 @@ func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.
} }
// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
func (c *FakeReplicaSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeReplicaSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &v1beta2.ReplicaSet{}) Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &v1beta2.ReplicaSet{})
@@ -123,8 +123,8 @@ func (c *FakeReplicaSets) Delete(ctx context.Context, name string, options *v1.D
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta2.ReplicaSetList{}) _, err := c.Fake.Invokes(action, &v1beta2.ReplicaSetList{})
return err return err

View File

@@ -115,7 +115,7 @@ func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta
} }
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *FakeStatefulSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeStatefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &v1beta2.StatefulSet{}) Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &v1beta2.StatefulSet{})
@@ -123,8 +123,8 @@ func (c *FakeStatefulSets) Delete(ctx context.Context, name string, options *v1.
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta2.StatefulSetList{}) _, err := c.Fake.Invokes(action, &v1beta2.StatefulSetList{})
return err return err

View File

@@ -41,8 +41,8 @@ type ReplicaSetInterface interface {
Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.CreateOptions) (*v1beta2.ReplicaSet, error) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.CreateOptions) (*v1beta2.ReplicaSet, error)
Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (*v1beta2.ReplicaSet, error) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (*v1beta2.ReplicaSet, error)
UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (*v1beta2.ReplicaSet, error) UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (*v1beta2.ReplicaSet, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.ReplicaSet, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.ReplicaSet, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ReplicaSetList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ReplicaSetList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -153,28 +153,28 @@ func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.Repl
} }
// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
func (c *replicaSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *replicaSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("replicasets"). Resource("replicasets").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *replicaSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *replicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("replicasets"). Resource("replicasets").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -41,8 +41,8 @@ type StatefulSetInterface interface {
Create(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.CreateOptions) (*v1beta2.StatefulSet, error) Create(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.CreateOptions) (*v1beta2.StatefulSet, error)
Update(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (*v1beta2.StatefulSet, error) Update(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (*v1beta2.StatefulSet, error)
UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (*v1beta2.StatefulSet, error) UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (*v1beta2.StatefulSet, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.StatefulSet, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.StatefulSet, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.StatefulSetList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.StatefulSetList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -156,28 +156,28 @@ func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.St
} }
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *statefulSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *statefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("statefulsets"). Resource("statefulsets").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *statefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *statefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("statefulsets"). Resource("statefulsets").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -40,8 +40,8 @@ type AuditSinksGetter interface {
type AuditSinkInterface interface { type AuditSinkInterface interface {
Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (*v1alpha1.AuditSink, error) Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (*v1alpha1.AuditSink, error)
Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (*v1alpha1.AuditSink, error) Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (*v1alpha1.AuditSink, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.AuditSink, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.AuditSink, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AuditSinkList, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AuditSinkList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -129,26 +129,26 @@ func (c *auditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSink,
} }
// Delete takes name of the auditSink and deletes it. Returns an error if one occurs. // Delete takes name of the auditSink and deletes it. Returns an error if one occurs.
func (c *auditSinks) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *auditSinks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("auditsinks"). Resource("auditsinks").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *auditSinks) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *auditSinks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Resource("auditsinks"). Resource("auditsinks").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -97,15 +97,15 @@ func (c *FakeAuditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSi
} }
// Delete takes name of the auditSink and deletes it. Returns an error if one occurs. // Delete takes name of the auditSink and deletes it. Returns an error if one occurs.
func (c *FakeAuditSinks) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeAuditSinks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewRootDeleteAction(auditsinksResource, name), &v1alpha1.AuditSink{}) Invokes(testing.NewRootDeleteAction(auditsinksResource, name), &v1alpha1.AuditSink{})
return err return err
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeAuditSinks) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeAuditSinks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(auditsinksResource, listOptions) action := testing.NewRootDeleteCollectionAction(auditsinksResource, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.AuditSinkList{}) _, err := c.Fake.Invokes(action, &v1alpha1.AuditSinkList{})
return err return err

View File

@@ -115,7 +115,7 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizon
} }
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &autoscalingv1.HorizontalPodAutoscaler{}) Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &autoscalingv1.HorizontalPodAutoscaler{})
@@ -123,8 +123,8 @@ func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string,
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &autoscalingv1.HorizontalPodAutoscalerList{}) _, err := c.Fake.Invokes(action, &autoscalingv1.HorizontalPodAutoscalerList{})
return err return err

View File

@@ -41,8 +41,8 @@ type HorizontalPodAutoscalerInterface interface {
Create(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.CreateOptions) (*v1.HorizontalPodAutoscaler, error) Create(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.CreateOptions) (*v1.HorizontalPodAutoscaler, error)
Update(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (*v1.HorizontalPodAutoscaler, error) Update(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (*v1.HorizontalPodAutoscaler, error)
UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (*v1.HorizontalPodAutoscaler, error) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (*v1.HorizontalPodAutoscaler, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.HorizontalPodAutoscaler, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.HorizontalPodAutoscaler, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.HorizontalPodAutoscalerList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@@ -153,28 +153,28 @@ func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalP
} }
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -115,7 +115,7 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizon
} }
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v2beta1.HorizontalPodAutoscaler{}) Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v2beta1.HorizontalPodAutoscaler{})
@@ -123,8 +123,8 @@ func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string,
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v2beta1.HorizontalPodAutoscalerList{}) _, err := c.Fake.Invokes(action, &v2beta1.HorizontalPodAutoscalerList{})
return err return err

View File

@@ -41,8 +41,8 @@ type HorizontalPodAutoscalerInterface interface {
Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.CreateOptions) (*v2beta1.HorizontalPodAutoscaler, error) Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.CreateOptions) (*v2beta1.HorizontalPodAutoscaler, error)
Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta1.HorizontalPodAutoscaler, error) Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta1.HorizontalPodAutoscaler, error)
UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta1.HorizontalPodAutoscaler, error) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta1.HorizontalPodAutoscaler, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2beta1.HorizontalPodAutoscaler, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v2beta1.HorizontalPodAutoscaler, error)
List(ctx context.Context, opts v1.ListOptions) (*v2beta1.HorizontalPodAutoscalerList, error) List(ctx context.Context, opts v1.ListOptions) (*v2beta1.HorizontalPodAutoscalerList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -153,28 +153,28 @@ func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalP
} }
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -115,7 +115,7 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizon
} }
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v2beta2.HorizontalPodAutoscaler{}) Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v2beta2.HorizontalPodAutoscaler{})
@@ -123,8 +123,8 @@ func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string,
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v2beta2.HorizontalPodAutoscalerList{}) _, err := c.Fake.Invokes(action, &v2beta2.HorizontalPodAutoscalerList{})
return err return err

View File

@@ -41,8 +41,8 @@ type HorizontalPodAutoscalerInterface interface {
Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.CreateOptions) (*v2beta2.HorizontalPodAutoscaler, error) Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.CreateOptions) (*v2beta2.HorizontalPodAutoscaler, error)
Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta2.HorizontalPodAutoscaler, error) Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta2.HorizontalPodAutoscaler, error)
UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta2.HorizontalPodAutoscaler, error) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta2.HorizontalPodAutoscaler, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error)
List(ctx context.Context, opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) List(ctx context.Context, opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -153,28 +153,28 @@ func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalP
} }
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -115,7 +115,7 @@ func (c *FakeJobs) UpdateStatus(ctx context.Context, job *batchv1.Job, opts v1.U
} }
// Delete takes name of the job and deletes it. Returns an error if one occurs. // Delete takes name of the job and deletes it. Returns an error if one occurs.
func (c *FakeJobs) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(jobsResource, c.ns, name), &batchv1.Job{}) Invokes(testing.NewDeleteAction(jobsResource, c.ns, name), &batchv1.Job{})
@@ -123,8 +123,8 @@ func (c *FakeJobs) Delete(ctx context.Context, name string, options *v1.DeleteOp
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &batchv1.JobList{}) _, err := c.Fake.Invokes(action, &batchv1.JobList{})
return err return err

View File

@@ -41,8 +41,8 @@ type JobInterface interface {
Create(ctx context.Context, job *v1.Job, opts metav1.CreateOptions) (*v1.Job, error) Create(ctx context.Context, job *v1.Job, opts metav1.CreateOptions) (*v1.Job, error)
Update(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (*v1.Job, error) Update(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (*v1.Job, error)
UpdateStatus(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (*v1.Job, error) UpdateStatus(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (*v1.Job, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Job, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Job, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.JobList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.JobList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@@ -153,28 +153,28 @@ func (c *jobs) UpdateStatus(ctx context.Context, job *v1.Job, opts metav1.Update
} }
// Delete takes name of the job and deletes it. Returns an error if one occurs. // Delete takes name of the job and deletes it. Returns an error if one occurs.
func (c *jobs) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { func (c *jobs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("jobs"). Resource("jobs").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *jobs) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *jobs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("jobs"). Resource("jobs").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -41,8 +41,8 @@ type CronJobInterface interface {
Create(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.CreateOptions) (*v1beta1.CronJob, error) Create(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.CreateOptions) (*v1beta1.CronJob, error)
Update(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (*v1beta1.CronJob, error) Update(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (*v1beta1.CronJob, error)
UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (*v1beta1.CronJob, error) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (*v1beta1.CronJob, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CronJob, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CronJob, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CronJobList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CronJobList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -153,28 +153,28 @@ func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob, o
} }
// Delete takes name of the cronJob and deletes it. Returns an error if one occurs. // Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
func (c *cronJobs) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *cronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("cronjobs"). Resource("cronjobs").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *cronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *cronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("cronjobs"). Resource("cronjobs").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -115,7 +115,7 @@ func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJo
} }
// Delete takes name of the cronJob and deletes it. Returns an error if one occurs. // Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
func (c *FakeCronJobs) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeCronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(cronjobsResource, c.ns, name), &v1beta1.CronJob{}) Invokes(testing.NewDeleteAction(cronjobsResource, c.ns, name), &v1beta1.CronJob{})
@@ -123,8 +123,8 @@ func (c *FakeCronJobs) Delete(ctx context.Context, name string, options *v1.Dele
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeCronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.CronJobList{}) _, err := c.Fake.Invokes(action, &v1beta1.CronJobList{})
return err return err

View File

@@ -41,8 +41,8 @@ type CronJobInterface interface {
Create(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.CreateOptions) (*v2alpha1.CronJob, error) Create(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.CreateOptions) (*v2alpha1.CronJob, error)
Update(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, error) Update(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, error)
UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, error) UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CronJob, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CronJob, error)
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CronJobList, error) List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CronJobList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -153,28 +153,28 @@ func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob,
} }
// Delete takes name of the cronJob and deletes it. Returns an error if one occurs. // Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
func (c *cronJobs) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *cronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("cronjobs"). Resource("cronjobs").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *cronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *cronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("cronjobs"). Resource("cronjobs").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -115,7 +115,7 @@ func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJ
} }
// Delete takes name of the cronJob and deletes it. Returns an error if one occurs. // Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
func (c *FakeCronJobs) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeCronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(cronjobsResource, c.ns, name), &v2alpha1.CronJob{}) Invokes(testing.NewDeleteAction(cronjobsResource, c.ns, name), &v2alpha1.CronJob{})
@@ -123,8 +123,8 @@ func (c *FakeCronJobs) Delete(ctx context.Context, name string, options *v1.Dele
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeCronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v2alpha1.CronJobList{}) _, err := c.Fake.Invokes(action, &v2alpha1.CronJobList{})
return err return err

View File

@@ -41,8 +41,8 @@ type CertificateSigningRequestInterface interface {
Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.CreateOptions) (*v1beta1.CertificateSigningRequest, error) Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.CreateOptions) (*v1beta1.CertificateSigningRequest, error)
Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (*v1beta1.CertificateSigningRequest, error) Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (*v1beta1.CertificateSigningRequest, error)
UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (*v1beta1.CertificateSigningRequest, error) UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (*v1beta1.CertificateSigningRequest, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CertificateSigningRequest, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CertificateSigningRequest, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -145,26 +145,26 @@ func (c *certificateSigningRequests) UpdateStatus(ctx context.Context, certifica
} }
// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. // Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs.
func (c *certificateSigningRequests) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *certificateSigningRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("certificatesigningrequests"). Resource("certificatesigningrequests").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *certificateSigningRequests) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *certificateSigningRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Resource("certificatesigningrequests"). Resource("certificatesigningrequests").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -108,15 +108,15 @@ func (c *FakeCertificateSigningRequests) UpdateStatus(ctx context.Context, certi
} }
// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. // Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs.
func (c *FakeCertificateSigningRequests) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeCertificateSigningRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{}) Invokes(testing.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{})
return err return err
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeCertificateSigningRequests) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeCertificateSigningRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOptions) action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.CertificateSigningRequestList{}) _, err := c.Fake.Invokes(action, &v1beta1.CertificateSigningRequestList{})
return err return err

View File

@@ -103,7 +103,7 @@ func (c *FakeLeases) Update(ctx context.Context, lease *coordinationv1.Lease, op
} }
// Delete takes name of the lease and deletes it. Returns an error if one occurs. // Delete takes name of the lease and deletes it. Returns an error if one occurs.
func (c *FakeLeases) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeLeases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(leasesResource, c.ns, name), &coordinationv1.Lease{}) Invokes(testing.NewDeleteAction(leasesResource, c.ns, name), &coordinationv1.Lease{})
@@ -111,8 +111,8 @@ func (c *FakeLeases) Delete(ctx context.Context, name string, options *v1.Delete
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeLeases) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeLeases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &coordinationv1.LeaseList{}) _, err := c.Fake.Invokes(action, &coordinationv1.LeaseList{})
return err return err

View File

@@ -40,8 +40,8 @@ type LeasesGetter interface {
type LeaseInterface interface { type LeaseInterface interface {
Create(ctx context.Context, lease *v1.Lease, opts metav1.CreateOptions) (*v1.Lease, error) Create(ctx context.Context, lease *v1.Lease, opts metav1.CreateOptions) (*v1.Lease, error)
Update(ctx context.Context, lease *v1.Lease, opts metav1.UpdateOptions) (*v1.Lease, error) Update(ctx context.Context, lease *v1.Lease, opts metav1.UpdateOptions) (*v1.Lease, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Lease, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Lease, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.LeaseList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.LeaseList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@@ -136,28 +136,28 @@ func (c *leases) Update(ctx context.Context, lease *v1.Lease, opts metav1.Update
} }
// Delete takes name of the lease and deletes it. Returns an error if one occurs. // Delete takes name of the lease and deletes it. Returns an error if one occurs.
func (c *leases) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { func (c *leases) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("leases"). Resource("leases").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *leases) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *leases) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("leases"). Resource("leases").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -103,7 +103,7 @@ func (c *FakeLeases) Update(ctx context.Context, lease *v1beta1.Lease, opts v1.U
} }
// Delete takes name of the lease and deletes it. Returns an error if one occurs. // Delete takes name of the lease and deletes it. Returns an error if one occurs.
func (c *FakeLeases) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *FakeLeases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(leasesResource, c.ns, name), &v1beta1.Lease{}) Invokes(testing.NewDeleteAction(leasesResource, c.ns, name), &v1beta1.Lease{})
@@ -111,8 +111,8 @@ func (c *FakeLeases) Delete(ctx context.Context, name string, options *v1.Delete
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeLeases) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeLeases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.LeaseList{}) _, err := c.Fake.Invokes(action, &v1beta1.LeaseList{})
return err return err

View File

@@ -40,8 +40,8 @@ type LeasesGetter interface {
type LeaseInterface interface { type LeaseInterface interface {
Create(ctx context.Context, lease *v1beta1.Lease, opts v1.CreateOptions) (*v1beta1.Lease, error) Create(ctx context.Context, lease *v1beta1.Lease, opts v1.CreateOptions) (*v1beta1.Lease, error)
Update(ctx context.Context, lease *v1beta1.Lease, opts v1.UpdateOptions) (*v1beta1.Lease, error) Update(ctx context.Context, lease *v1beta1.Lease, opts v1.UpdateOptions) (*v1beta1.Lease, error)
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Lease, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Lease, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.LeaseList, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.LeaseList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
@@ -136,28 +136,28 @@ func (c *leases) Update(ctx context.Context, lease *v1beta1.Lease, opts v1.Updat
} }
// Delete takes name of the lease and deletes it. Returns an error if one occurs. // Delete takes name of the lease and deletes it. Returns an error if one occurs.
func (c *leases) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error { func (c *leases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("leases"). Resource("leases").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *leases) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *leases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("leases"). Resource("leases").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

View File

@@ -40,8 +40,8 @@ type ComponentStatusesGetter interface {
type ComponentStatusInterface interface { type ComponentStatusInterface interface {
Create(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.CreateOptions) (*v1.ComponentStatus, error) Create(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.CreateOptions) (*v1.ComponentStatus, error)
Update(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.UpdateOptions) (*v1.ComponentStatus, error) Update(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.UpdateOptions) (*v1.ComponentStatus, error)
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ComponentStatus, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ComponentStatus, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ComponentStatusList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ComponentStatusList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
@@ -129,26 +129,26 @@ func (c *componentStatuses) Update(ctx context.Context, componentStatus *v1.Comp
} }
// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs. // Delete takes name of the componentStatus and deletes it. Returns an error if one occurs.
func (c *componentStatuses) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error { func (c *componentStatuses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("componentstatuses"). Resource("componentstatuses").
Name(name). Name(name).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *componentStatuses) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *componentStatuses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Resource("componentstatuses"). Resource("componentstatuses").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(ctx). Do(ctx).
Error() Error()
} }

Some files were not shown because too many files have changed in this diff Show More