mirror of
https://github.com/kubernetes/client-go.git
synced 2026-05-15 11:43:33 +00:00
Compare commits
74 Commits
release-1.
...
v0.18.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7345229d48 | ||
|
|
303c51f3d4 | ||
|
|
7b592a8174 | ||
|
|
11b3f81436 | ||
|
|
19e102247d | ||
|
|
b3ff053fb1 | ||
|
|
3ce1317b14 | ||
|
|
aa2d6328a3 | ||
|
|
dbcb4c305c | ||
|
|
88ba1c9b80 | ||
|
|
136e483e70 | ||
|
|
dc8515ba96 | ||
|
|
8ca7f667a2 | ||
|
|
3e3c7a4209 | ||
|
|
6be3e0bf76 | ||
|
|
d0229e78f4 | ||
|
|
63c6663c56 | ||
|
|
aad7e5b6d4 | ||
|
|
f6341befeb | ||
|
|
1088ee5da1 | ||
|
|
1979366505 | ||
|
|
1f8ca21aea | ||
|
|
e686f3a6b1 | ||
|
|
95caa2d638 | ||
|
|
e21d8b321d | ||
|
|
963287bf1b | ||
|
|
aa9e2e1d28 | ||
|
|
62641f51d9 | ||
|
|
6d9df0db96 | ||
|
|
fe51308355 | ||
|
|
722d7c83fd | ||
|
|
5c2a76ef0f | ||
|
|
b4b41575df | ||
|
|
2f9d817fc1 | ||
|
|
9793c43f36 | ||
|
|
a884d2d0bc | ||
|
|
c2cd954c1a | ||
|
|
c97745df16 | ||
|
|
cbb845eb7b | ||
|
|
130ee555e2 | ||
|
|
db9ba44b57 | ||
|
|
275032820d | ||
|
|
39958e487b | ||
|
|
9c3e96b764 | ||
|
|
cca4bbf022 | ||
|
|
38ae657aae | ||
|
|
665c6734d2 | ||
|
|
60fa75c071 | ||
|
|
b229bee3a8 | ||
|
|
5e884de6b7 | ||
|
|
b4195b390d | ||
|
|
68503dd6f8 | ||
|
|
5403cae7f7 | ||
|
|
4c92726be3 | ||
|
|
bc450043dc | ||
|
|
cad9369f5c | ||
|
|
8f319dd0ec | ||
|
|
63b7bdc3fa | ||
|
|
6ca9f7245f | ||
|
|
69a103b2ce | ||
|
|
010dce13f8 | ||
|
|
8f6e628cf6 | ||
|
|
39a9bc1d5a | ||
|
|
b52b5a278b | ||
|
|
8f2c761d18 | ||
|
|
46ad60adf9 | ||
|
|
40d13067fe | ||
|
|
789de056aa | ||
|
|
6c3faaec46 | ||
|
|
b8a07f42d5 | ||
|
|
1245dcc076 | ||
|
|
292400c132 | ||
|
|
f4cd5ff32d | ||
|
|
e302dbfef5 |
12
Godeps/Godeps.json
generated
12
Godeps/Godeps.json
generated
@@ -264,7 +264,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/crypto",
|
||||
"Rev": "60c769a6c586"
|
||||
"Rev": "bac4c82f6975"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/exp",
|
||||
@@ -348,11 +348,11 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api",
|
||||
"Rev": "026463abc787"
|
||||
"Rev": "v0.18.3"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery",
|
||||
"Rev": "2373d029717c"
|
||||
"Rev": "v0.18.3"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo",
|
||||
@@ -364,15 +364,15 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi",
|
||||
"Rev": "bf4fb3bd569c"
|
||||
"Rev": "61e04a5be9a6"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/utils",
|
||||
"Rev": "5f6fbceb4c31"
|
||||
"Rev": "a9aa75ae1b89"
|
||||
},
|
||||
{
|
||||
"ImportPath": "sigs.k8s.io/structured-merge-diff/v3",
|
||||
"Rev": "5e70324e7c1c"
|
||||
"Rev": "v3.0.0"
|
||||
},
|
||||
{
|
||||
"ImportPath": "sigs.k8s.io/yaml",
|
||||
|
||||
@@ -190,16 +190,29 @@ func (d *memCacheClient) refreshLocked() error {
|
||||
return err
|
||||
}
|
||||
|
||||
wg := &sync.WaitGroup{}
|
||||
resultLock := &sync.Mutex{}
|
||||
rl := map[string]*cacheEntry{}
|
||||
for _, g := range gl.Groups {
|
||||
for _, v := range g.Versions {
|
||||
r, err := d.serverResourcesForGroupVersion(v.GroupVersion)
|
||||
rl[v.GroupVersion] = &cacheEntry{r, err}
|
||||
if err != nil {
|
||||
utilruntime.HandleError(fmt.Errorf("couldn't get resource list for %v: %v", v.GroupVersion, err))
|
||||
}
|
||||
gv := v.GroupVersion
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
defer utilruntime.HandleCrash()
|
||||
|
||||
r, err := d.serverResourcesForGroupVersion(gv)
|
||||
if err != nil {
|
||||
utilruntime.HandleError(fmt.Errorf("couldn't get resource list for %v: %v", gv, err))
|
||||
}
|
||||
|
||||
resultLock.Lock()
|
||||
defer resultLock.Unlock()
|
||||
rl[gv] = &cacheEntry{r, err}
|
||||
}()
|
||||
}
|
||||
}
|
||||
wg.Wait()
|
||||
|
||||
d.groupToServerResources, d.groupList = rl, gl
|
||||
d.cacheValid = true
|
||||
|
||||
@@ -205,16 +205,22 @@ func TestServerGroupsFails(t *testing.T) {
|
||||
func TestPartialPermanentFailure(t *testing.T) {
|
||||
fake := &fakeDiscovery{
|
||||
groupList: &metav1.APIGroupList{
|
||||
Groups: []metav1.APIGroup{{
|
||||
Name: "astronomy",
|
||||
Versions: []metav1.GroupVersionForDiscovery{{
|
||||
GroupVersion: "astronomy/v8beta1",
|
||||
Version: "v8beta1",
|
||||
}, {
|
||||
GroupVersion: "astronomy2/v8beta1",
|
||||
Version: "v8beta1",
|
||||
}},
|
||||
}},
|
||||
Groups: []metav1.APIGroup{
|
||||
{
|
||||
Name: "astronomy",
|
||||
Versions: []metav1.GroupVersionForDiscovery{{
|
||||
GroupVersion: "astronomy/v8beta1",
|
||||
Version: "v8beta1",
|
||||
}},
|
||||
},
|
||||
{
|
||||
Name: "astronomy2",
|
||||
Versions: []metav1.GroupVersionForDiscovery{{
|
||||
GroupVersion: "astronomy2/v8beta1",
|
||||
Version: "v8beta1",
|
||||
}},
|
||||
},
|
||||
},
|
||||
},
|
||||
resourceMap: map[string]*resourceMapEntry{
|
||||
"astronomy/v8beta1": {
|
||||
@@ -286,16 +292,22 @@ func TestPartialPermanentFailure(t *testing.T) {
|
||||
func TestPartialRetryableFailure(t *testing.T) {
|
||||
fake := &fakeDiscovery{
|
||||
groupList: &metav1.APIGroupList{
|
||||
Groups: []metav1.APIGroup{{
|
||||
Name: "astronomy",
|
||||
Versions: []metav1.GroupVersionForDiscovery{{
|
||||
GroupVersion: "astronomy/v8beta1",
|
||||
Version: "v8beta1",
|
||||
}, {
|
||||
GroupVersion: "astronomy2/v8beta1",
|
||||
Version: "v8beta1",
|
||||
}},
|
||||
}},
|
||||
Groups: []metav1.APIGroup{
|
||||
{
|
||||
Name: "astronomy",
|
||||
Versions: []metav1.GroupVersionForDiscovery{{
|
||||
GroupVersion: "astronomy/v8beta1",
|
||||
Version: "v8beta1",
|
||||
}},
|
||||
},
|
||||
{
|
||||
Name: "astronomy2",
|
||||
Versions: []metav1.GroupVersionForDiscovery{{
|
||||
GroupVersion: "astronomy2/v8beta1",
|
||||
Version: "v8beta1",
|
||||
}},
|
||||
},
|
||||
},
|
||||
},
|
||||
resourceMap: map[string]*resourceMapEntry{
|
||||
"astronomy/v8beta1": {
|
||||
|
||||
@@ -18,6 +18,7 @@ package dynamic
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
@@ -134,7 +135,7 @@ func TestList(t *testing.T) {
|
||||
}
|
||||
defer srv.Close()
|
||||
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).List(metav1.ListOptions{})
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error when listing %q: %v", tc.name, err)
|
||||
continue
|
||||
@@ -209,7 +210,7 @@ func TestGet(t *testing.T) {
|
||||
}
|
||||
defer srv.Close()
|
||||
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Get(tc.name, metav1.GetOptions{}, tc.subresource...)
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Get(context.TODO(), tc.name, metav1.GetOptions{}, tc.subresource...)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error when getting %q: %v", tc.name, err)
|
||||
continue
|
||||
@@ -234,7 +235,7 @@ func TestDelete(t *testing.T) {
|
||||
namespace string
|
||||
name string
|
||||
path string
|
||||
deleteOptions *metav1.DeleteOptions
|
||||
deleteOptions metav1.DeleteOptions
|
||||
}{
|
||||
{
|
||||
name: "normal_delete",
|
||||
@@ -260,7 +261,7 @@ func TestDelete(t *testing.T) {
|
||||
namespace: "nstest",
|
||||
name: "namespaced_delete_with_options",
|
||||
path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_delete_with_options",
|
||||
deleteOptions: &metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &uid}, PropagationPolicy: &background},
|
||||
deleteOptions: metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &uid}, PropagationPolicy: &background},
|
||||
},
|
||||
}
|
||||
for _, tc := range tcs {
|
||||
@@ -283,7 +284,7 @@ func TestDelete(t *testing.T) {
|
||||
}
|
||||
defer srv.Close()
|
||||
|
||||
err = cl.Resource(resource).Namespace(tc.namespace).Delete(tc.name, tc.deleteOptions, tc.subresource...)
|
||||
err = cl.Resource(resource).Namespace(tc.namespace).Delete(context.TODO(), tc.name, tc.deleteOptions, tc.subresource...)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error when deleting %q: %v", tc.name, err)
|
||||
continue
|
||||
@@ -331,7 +332,7 @@ func TestDeleteCollection(t *testing.T) {
|
||||
}
|
||||
defer srv.Close()
|
||||
|
||||
err = cl.Resource(resource).Namespace(tc.namespace).DeleteCollection(nil, metav1.ListOptions{})
|
||||
err = cl.Resource(resource).Namespace(tc.namespace).DeleteCollection(context.TODO(), metav1.DeleteOptions{}, metav1.ListOptions{})
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error when deleting collection %q: %v", tc.name, err)
|
||||
continue
|
||||
@@ -404,7 +405,7 @@ func TestCreate(t *testing.T) {
|
||||
}
|
||||
defer srv.Close()
|
||||
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Create(tc.obj, metav1.CreateOptions{}, tc.subresource...)
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Create(context.TODO(), tc.obj, metav1.CreateOptions{}, tc.subresource...)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error when creating %q: %v", tc.name, err)
|
||||
continue
|
||||
@@ -481,7 +482,7 @@ func TestUpdate(t *testing.T) {
|
||||
}
|
||||
defer srv.Close()
|
||||
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Update(tc.obj, metav1.UpdateOptions{}, tc.subresource...)
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Update(context.TODO(), tc.obj, metav1.UpdateOptions{}, tc.subresource...)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error when updating %q: %v", tc.name, err)
|
||||
continue
|
||||
@@ -550,7 +551,7 @@ func TestWatch(t *testing.T) {
|
||||
}
|
||||
defer srv.Close()
|
||||
|
||||
watcher, err := cl.Resource(resource).Namespace(tc.namespace).Watch(metav1.ListOptions{})
|
||||
watcher, err := cl.Resource(resource).Namespace(tc.namespace).Watch(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error when watching %q: %v", tc.name, err)
|
||||
continue
|
||||
@@ -640,7 +641,7 @@ func TestPatch(t *testing.T) {
|
||||
}
|
||||
defer srv.Close()
|
||||
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Patch(tc.name, types.StrategicMergePatchType, tc.patch, metav1.PatchOptions{}, tc.subresource...)
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Patch(context.TODO(), tc.name, types.StrategicMergePatchType, tc.patch, metav1.PatchOptions{}, tc.subresource...)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error when patching %q: %v", tc.name, err)
|
||||
continue
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package dynamicinformer
|
||||
|
||||
import (
|
||||
"context"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -125,13 +126,13 @@ func NewFilteredDynamicInformer(client dynamic.Interface, gvr schema.GroupVersio
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.Resource(gvr).Namespace(namespace).List(options)
|
||||
return client.Resource(gvr).Namespace(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.Resource(gvr).Namespace(namespace).Watch(options)
|
||||
return client.Resource(gvr).Namespace(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&unstructured.Unstructured{},
|
||||
|
||||
@@ -48,7 +48,7 @@ func TestDynamicSharedInformerFactory(t *testing.T) {
|
||||
gvr: schema.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "deployments"},
|
||||
trigger: func(gvr schema.GroupVersionResource, ns string, fakeClient *fake.FakeDynamicClient, _ *unstructured.Unstructured) *unstructured.Unstructured {
|
||||
testObject := newUnstructured("extensions/v1beta1", "Deployment", "ns-foo", "name-foo")
|
||||
createdObj, err := fakeClient.Resource(gvr).Namespace(ns).Create(testObject, metav1.CreateOptions{})
|
||||
createdObj, err := fakeClient.Resource(gvr).Namespace(ns).Create(context.TODO(), testObject, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
@@ -71,7 +71,7 @@ func TestDynamicSharedInformerFactory(t *testing.T) {
|
||||
existingObj: newUnstructured("extensions/v1beta1", "Deployment", "ns-foo", "name-foo"),
|
||||
trigger: func(gvr schema.GroupVersionResource, ns string, fakeClient *fake.FakeDynamicClient, testObject *unstructured.Unstructured) *unstructured.Unstructured {
|
||||
testObject.Object["spec"] = "updatedName"
|
||||
updatedObj, err := fakeClient.Resource(gvr).Namespace(ns).Update(testObject, metav1.UpdateOptions{})
|
||||
updatedObj, err := fakeClient.Resource(gvr).Namespace(ns).Update(context.TODO(), testObject, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
@@ -93,7 +93,7 @@ func TestDynamicSharedInformerFactory(t *testing.T) {
|
||||
gvr: schema.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "deployments"},
|
||||
existingObj: newUnstructured("extensions/v1beta1", "Deployment", "ns-foo", "name-foo"),
|
||||
trigger: func(gvr schema.GroupVersionResource, ns string, fakeClient *fake.FakeDynamicClient, testObject *unstructured.Unstructured) *unstructured.Unstructured {
|
||||
err := fakeClient.Resource(gvr).Namespace(ns).Delete(testObject.GetName(), &metav1.DeleteOptions{})
|
||||
err := fakeClient.Resource(gvr).Namespace(ns).Delete(context.TODO(), testObject.GetName(), metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
@@ -86,7 +87,7 @@ func (c *dynamicResourceClient) Namespace(ns string) dynamic.ResourceInterface {
|
||||
return &ret
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) Create(ctx context.Context, obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
var uncastRet runtime.Object
|
||||
var err error
|
||||
switch {
|
||||
@@ -132,7 +133,7 @@ func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts meta
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) Update(ctx context.Context, obj *unstructured.Unstructured, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
var uncastRet runtime.Object
|
||||
var err error
|
||||
switch {
|
||||
@@ -168,7 +169,7 @@ func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts meta
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) {
|
||||
var uncastRet runtime.Object
|
||||
var err error
|
||||
switch {
|
||||
@@ -196,7 +197,7 @@ func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opt
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Delete(name string, opts *metav1.DeleteOptions, subresources ...string) error {
|
||||
func (c *dynamicResourceClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions, subresources ...string) error {
|
||||
var err error
|
||||
switch {
|
||||
case len(c.namespace) == 0 && len(subresources) == 0:
|
||||
@@ -219,7 +220,7 @@ func (c *dynamicResourceClient) Delete(name string, opts *metav1.DeleteOptions,
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
func (c *dynamicResourceClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var err error
|
||||
switch {
|
||||
case len(c.namespace) == 0:
|
||||
@@ -235,7 +236,7 @@ func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, lis
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) Get(ctx context.Context, name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
var uncastRet runtime.Object
|
||||
var err error
|
||||
switch {
|
||||
@@ -270,7 +271,7 @@ func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subreso
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error) {
|
||||
func (c *dynamicResourceClient) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) {
|
||||
var obj runtime.Object
|
||||
var err error
|
||||
switch {
|
||||
@@ -317,7 +318,7 @@ func (c *dynamicResourceClient) List(opts metav1.ListOptions) (*unstructured.Uns
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
func (c *dynamicResourceClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
switch {
|
||||
case len(c.namespace) == 0:
|
||||
return c.client.Fake.
|
||||
@@ -333,7 +334,7 @@ func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface,
|
||||
}
|
||||
|
||||
// TODO: opts are currently ignored.
|
||||
func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
var uncastRet runtime.Object
|
||||
var err error
|
||||
switch {
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
@@ -68,7 +69,7 @@ func TestList(t *testing.T) {
|
||||
newUnstructured("group/version", "TheKind", "ns-foo", "name-baz"),
|
||||
newUnstructured("group2/version", "TheKind", "ns-foo", "name2-baz"),
|
||||
)
|
||||
listFirst, err := client.Resource(schema.GroupVersionResource{Group: "group", Version: "version", Resource: "thekinds"}).List(metav1.ListOptions{})
|
||||
listFirst, err := client.Resource(schema.GroupVersionResource{Group: "group", Version: "version", Resource: "thekinds"}).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -96,7 +97,7 @@ func (tc *patchTestCase) runner(t *testing.T) {
|
||||
client := NewSimpleDynamicClient(runtime.NewScheme(), tc.object)
|
||||
resourceInterface := client.Resource(schema.GroupVersionResource{Group: testGroup, Version: testVersion, Resource: testResource}).Namespace(testNamespace)
|
||||
|
||||
got, recErr := resourceInterface.Patch(testName, tc.patchType, tc.patchBytes, metav1.PatchOptions{})
|
||||
got, recErr := resourceInterface.Patch(context.TODO(), testName, tc.patchType, tc.patchBytes, metav1.PatchOptions{})
|
||||
|
||||
if err := tc.verifyErr(recErr); err != nil {
|
||||
t.Error(err)
|
||||
|
||||
@@ -17,6 +17,8 @@ limitations under the License.
|
||||
package dynamic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -29,15 +31,15 @@ type Interface interface {
|
||||
}
|
||||
|
||||
type ResourceInterface interface {
|
||||
Create(obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error)
|
||||
Update(obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error)
|
||||
UpdateStatus(obj *unstructured.Unstructured, options metav1.UpdateOptions) (*unstructured.Unstructured, error)
|
||||
Delete(name string, options *metav1.DeleteOptions, subresources ...string) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error)
|
||||
List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error)
|
||||
Create(ctx context.Context, obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error)
|
||||
Update(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error)
|
||||
UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions) (*unstructured.Unstructured, error)
|
||||
Delete(ctx context.Context, name string, options metav1.DeleteOptions, subresources ...string) error
|
||||
DeleteCollection(ctx context.Context, options metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error)
|
||||
}
|
||||
|
||||
type NamespaceableResourceInterface interface {
|
||||
|
||||
@@ -90,7 +90,7 @@ func (c *dynamicResourceClient) Namespace(ns string) ResourceInterface {
|
||||
return &ret
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) Create(ctx context.Context, obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
outBytes, err := runtime.Encode(unstructured.UnstructuredJSONScheme, obj)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -112,7 +112,7 @@ func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts meta
|
||||
AbsPath(append(c.makeURLSegments(name), subresources...)...).
|
||||
Body(outBytes).
|
||||
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
|
||||
Do(context.TODO())
|
||||
Do(ctx)
|
||||
if err := result.Error(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -128,7 +128,7 @@ func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts meta
|
||||
return uncastObj.(*unstructured.Unstructured), nil
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) Update(ctx context.Context, obj *unstructured.Unstructured, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
accessor, err := meta.Accessor(obj)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -147,7 +147,7 @@ func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts meta
|
||||
AbsPath(append(c.makeURLSegments(name), subresources...)...).
|
||||
Body(outBytes).
|
||||
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
|
||||
Do(context.TODO())
|
||||
Do(ctx)
|
||||
if err := result.Error(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -163,7 +163,7 @@ func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts meta
|
||||
return uncastObj.(*unstructured.Unstructured), nil
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) {
|
||||
accessor, err := meta.Accessor(obj)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -183,7 +183,7 @@ func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opt
|
||||
AbsPath(append(c.makeURLSegments(name), "status")...).
|
||||
Body(outBytes).
|
||||
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
|
||||
Do(context.TODO())
|
||||
Do(ctx)
|
||||
if err := result.Error(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -199,14 +199,11 @@ func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opt
|
||||
return uncastObj.(*unstructured.Unstructured), nil
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Delete(name string, opts *metav1.DeleteOptions, subresources ...string) error {
|
||||
func (c *dynamicResourceClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions, subresources ...string) error {
|
||||
if len(name) == 0 {
|
||||
return fmt.Errorf("name is required")
|
||||
}
|
||||
if opts == nil {
|
||||
opts = &metav1.DeleteOptions{}
|
||||
}
|
||||
deleteOptionsByte, err := runtime.Encode(deleteOptionsCodec.LegacyCodec(schema.GroupVersion{Version: "v1"}), opts)
|
||||
deleteOptionsByte, err := runtime.Encode(deleteOptionsCodec.LegacyCodec(schema.GroupVersion{Version: "v1"}), &opts)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -215,15 +212,12 @@ func (c *dynamicResourceClient) Delete(name string, opts *metav1.DeleteOptions,
|
||||
Delete().
|
||||
AbsPath(append(c.makeURLSegments(name), subresources...)...).
|
||||
Body(deleteOptionsByte).
|
||||
Do(context.TODO())
|
||||
Do(ctx)
|
||||
return result.Error()
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
if opts == nil {
|
||||
opts = &metav1.DeleteOptions{}
|
||||
}
|
||||
deleteOptionsByte, err := runtime.Encode(deleteOptionsCodec.LegacyCodec(schema.GroupVersion{Version: "v1"}), opts)
|
||||
func (c *dynamicResourceClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
deleteOptionsByte, err := runtime.Encode(deleteOptionsCodec.LegacyCodec(schema.GroupVersion{Version: "v1"}), &opts)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -233,15 +227,15 @@ func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, lis
|
||||
AbsPath(c.makeURLSegments("")...).
|
||||
Body(deleteOptionsByte).
|
||||
SpecificallyVersionedParams(&listOptions, dynamicParameterCodec, versionV1).
|
||||
Do(context.TODO())
|
||||
Do(ctx)
|
||||
return result.Error()
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) Get(ctx context.Context, name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
if len(name) == 0 {
|
||||
return nil, fmt.Errorf("name is required")
|
||||
}
|
||||
result := c.client.client.Get().AbsPath(append(c.makeURLSegments(name), subresources...)...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do(context.TODO())
|
||||
result := c.client.client.Get().AbsPath(append(c.makeURLSegments(name), subresources...)...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do(ctx)
|
||||
if err := result.Error(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -256,8 +250,8 @@ func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subreso
|
||||
return uncastObj.(*unstructured.Unstructured), nil
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error) {
|
||||
result := c.client.client.Get().AbsPath(c.makeURLSegments("")...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do(context.TODO())
|
||||
func (c *dynamicResourceClient) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) {
|
||||
result := c.client.client.Get().AbsPath(c.makeURLSegments("")...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do(ctx)
|
||||
if err := result.Error(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -280,14 +274,14 @@ func (c *dynamicResourceClient) List(opts metav1.ListOptions) (*unstructured.Uns
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
func (c *dynamicResourceClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.client.Get().AbsPath(c.makeURLSegments("")...).
|
||||
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
|
||||
Watch(context.TODO())
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
if len(name) == 0 {
|
||||
return nil, fmt.Errorf("name is required")
|
||||
}
|
||||
@@ -296,7 +290,7 @@ func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []by
|
||||
AbsPath(append(c.makeURLSegments(name), subresources...)...).
|
||||
Body(data).
|
||||
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
|
||||
Do(context.TODO())
|
||||
Do(ctx)
|
||||
if err := result.Error(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ func main() {
|
||||
prompt()
|
||||
fmt.Println("Deleting deployment...")
|
||||
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,
|
||||
}); err != nil {
|
||||
panic(err)
|
||||
|
||||
@@ -19,6 +19,7 @@ package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
@@ -108,7 +109,7 @@ func main() {
|
||||
|
||||
// Create Deployment
|
||||
fmt.Println("Creating deployment...")
|
||||
result, err := client.Resource(deploymentRes).Namespace(namespace).Create(deployment, metav1.CreateOptions{})
|
||||
result, err := client.Resource(deploymentRes).Namespace(namespace).Create(context.TODO(), deployment, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -133,7 +134,7 @@ func main() {
|
||||
retryErr := retry.RetryOnConflict(retry.DefaultRetry, func() error {
|
||||
// Retrieve the latest version of Deployment before attempting update
|
||||
// RetryOnConflict uses exponential backoff to avoid exhausting the apiserver
|
||||
result, getErr := client.Resource(deploymentRes).Namespace(namespace).Get("demo-deployment", metav1.GetOptions{})
|
||||
result, getErr := client.Resource(deploymentRes).Namespace(namespace).Get(context.TODO(), "demo-deployment", metav1.GetOptions{})
|
||||
if getErr != nil {
|
||||
panic(fmt.Errorf("failed to get latest version of Deployment: %v", getErr))
|
||||
}
|
||||
@@ -157,7 +158,7 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
_, updateErr := client.Resource(deploymentRes).Namespace(namespace).Update(result, metav1.UpdateOptions{})
|
||||
_, updateErr := client.Resource(deploymentRes).Namespace(namespace).Update(context.TODO(), result, metav1.UpdateOptions{})
|
||||
return updateErr
|
||||
})
|
||||
if retryErr != nil {
|
||||
@@ -168,7 +169,7 @@ func main() {
|
||||
// List Deployments
|
||||
prompt()
|
||||
fmt.Printf("Listing deployments in namespace %q:\n", apiv1.NamespaceDefault)
|
||||
list, err := client.Resource(deploymentRes).Namespace(namespace).List(metav1.ListOptions{})
|
||||
list, err := client.Resource(deploymentRes).Namespace(namespace).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -185,10 +186,10 @@ func main() {
|
||||
prompt()
|
||||
fmt.Println("Deleting deployment...")
|
||||
deletePolicy := metav1.DeletePropagationForeground
|
||||
deleteOptions := &metav1.DeleteOptions{
|
||||
deleteOptions := metav1.DeleteOptions{
|
||||
PropagationPolicy: &deletePolicy,
|
||||
}
|
||||
if err := client.Resource(deploymentRes).Namespace(namespace).Delete("demo-deployment", deleteOptions); err != nil {
|
||||
if err := client.Resource(deploymentRes).Namespace(namespace).Delete(context.TODO(), "demo-deployment", deleteOptions); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
|
||||
12
go.mod
12
go.mod
@@ -23,21 +23,21 @@ require (
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/stretchr/testify v1.4.0
|
||||
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586
|
||||
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975
|
||||
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
|
||||
google.golang.org/appengine v1.5.0 // indirect
|
||||
k8s.io/api v0.0.0-20200214081624-026463abc787
|
||||
k8s.io/apimachinery v0.0.0-20200214081019-2373d029717c
|
||||
k8s.io/api v0.18.3
|
||||
k8s.io/apimachinery v0.18.3
|
||||
k8s.io/klog v1.0.0
|
||||
k8s.io/utils v0.0.0-20200117235808-5f6fbceb4c31
|
||||
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89
|
||||
sigs.k8s.io/yaml v1.2.0
|
||||
)
|
||||
|
||||
replace (
|
||||
golang.org/x/sys => golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // pinned to release-branch.go1.13
|
||||
golang.org/x/tools => golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7 // pinned to release-branch.go1.13
|
||||
k8s.io/api => k8s.io/api v0.0.0-20200214081624-026463abc787
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20200214081019-2373d029717c
|
||||
k8s.io/api => k8s.io/api v0.18.3
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.18.3
|
||||
)
|
||||
|
||||
20
go.sum
20
go.sum
@@ -121,8 +121,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 h1:7KByu05hhLed2MO29w7p1XfZvZ13m8mub3shuVftRs0=
|
||||
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo=
|
||||
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
@@ -182,20 +182,20 @@ gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
k8s.io/api v0.0.0-20200214081624-026463abc787/go.mod h1:brPp6rLV9ZWi2IgXmvCsY7TKw2l27eF4rfCHlyW88ys=
|
||||
k8s.io/apimachinery v0.0.0-20200214081019-2373d029717c/go.mod h1:5X8oEhnd931nEg6/Nkumo00nT6ZsCLp2h7Xwd7Ym6P4=
|
||||
k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA=
|
||||
k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko=
|
||||
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
|
||||
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
|
||||
k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c h1:/KUFqjjqAcY4Us6luF5RDNZ16KJtb49HfR3ZHB9qYXM=
|
||||
k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E=
|
||||
k8s.io/utils v0.0.0-20200117235808-5f6fbceb4c31 h1:KCcLuc/HD1RogJgEbZi9ObRuLv1bgiRCfAbidLKrUpg=
|
||||
k8s.io/utils v0.0.0-20200117235808-5f6fbceb4c31/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
|
||||
k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 h1:Oh3Mzx5pJ+yIumsAD0MOECPVeXsVot0UkiaCGVyfGQY=
|
||||
k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E=
|
||||
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU=
|
||||
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200207200219-5e70324e7c1c h1:xQP7F7Lntt2dtYmg12WPQHObOrAyPHlMWP1JVSa79GM=
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200207200219-5e70324e7c1c/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E=
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
|
||||
@@ -244,6 +244,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
// Group=networking.k8s.io, Version=v1beta1
|
||||
case networkingv1beta1.SchemeGroupVersion.WithResource("ingresses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().Ingresses().Informer()}, nil
|
||||
case networkingv1beta1.SchemeGroupVersion.WithResource("ingressclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().IngressClasses().Informer()}, nil
|
||||
|
||||
// Group=node.k8s.io, Version=v1alpha1
|
||||
case nodev1alpha1.SchemeGroupVersion.WithResource("runtimeclasses"):
|
||||
@@ -306,6 +308,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Settings().V1alpha1().PodPresets().Informer()}, nil
|
||||
|
||||
// Group=storage.k8s.io, Version=v1
|
||||
case storagev1.SchemeGroupVersion.WithResource("csidrivers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().CSIDrivers().Informer()}, nil
|
||||
case storagev1.SchemeGroupVersion.WithResource("csinodes"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().CSINodes().Informer()}, nil
|
||||
case storagev1.SchemeGroupVersion.WithResource("storageclasses"):
|
||||
|
||||
89
informers/networking/v1beta1/ingressclass.go
Normal file
89
informers/networking/v1beta1/ingressclass.go
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
networkingv1beta1 "k8s.io/api/networking/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/networking/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// IngressClassInformer provides access to a shared informer and lister for
|
||||
// IngressClasses.
|
||||
type IngressClassInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.IngressClassLister
|
||||
}
|
||||
|
||||
type ingressClassInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewIngressClassInformer constructs a new informer for IngressClass type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewIngressClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredIngressClassInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredIngressClassInformer constructs a new informer for IngressClass type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredIngressClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1beta1().IngressClasses().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1beta1().IngressClasses().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&networkingv1beta1.IngressClass{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *ingressClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredIngressClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *ingressClassInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&networkingv1beta1.IngressClass{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *ingressClassInformer) Lister() v1beta1.IngressClassLister {
|
||||
return v1beta1.NewIngressClassLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -26,6 +26,8 @@ import (
|
||||
type Interface interface {
|
||||
// Ingresses returns a IngressInformer.
|
||||
Ingresses() IngressInformer
|
||||
// IngressClasses returns a IngressClassInformer.
|
||||
IngressClasses() IngressClassInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
@@ -43,3 +45,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
func (v *version) Ingresses() IngressInformer {
|
||||
return &ingressInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// IngressClasses returns a IngressClassInformer.
|
||||
func (v *version) IngressClasses() IngressClassInformer {
|
||||
return &ingressClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
89
informers/storage/v1/csidriver.go
Normal file
89
informers/storage/v1/csidriver.go
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1 "k8s.io/client-go/listers/storage/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// CSIDriverInformer provides access to a shared informer and lister for
|
||||
// CSIDrivers.
|
||||
type CSIDriverInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.CSIDriverLister
|
||||
}
|
||||
|
||||
type cSIDriverInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewCSIDriverInformer constructs a new informer for CSIDriver type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewCSIDriverInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredCSIDriverInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredCSIDriverInformer constructs a new informer for CSIDriver type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredCSIDriverInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.StorageV1().CSIDrivers().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.StorageV1().CSIDrivers().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&storagev1.CSIDriver{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *cSIDriverInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredCSIDriverInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *cSIDriverInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&storagev1.CSIDriver{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *cSIDriverInformer) Lister() v1.CSIDriverLister {
|
||||
return v1.NewCSIDriverLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -24,6 +24,8 @@ import (
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// CSIDrivers returns a CSIDriverInformer.
|
||||
CSIDrivers() CSIDriverInformer
|
||||
// CSINodes returns a CSINodeInformer.
|
||||
CSINodes() CSINodeInformer
|
||||
// StorageClasses returns a StorageClassInformer.
|
||||
@@ -43,6 +45,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// CSIDrivers returns a CSIDriverInformer.
|
||||
func (v *version) CSIDrivers() CSIDriverInformer {
|
||||
return &cSIDriverInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// CSINodes returns a CSINodeInformer.
|
||||
func (v *version) CSINodes() CSINodeInformer {
|
||||
return &cSINodeInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &admissionregistrationv1.MutatingWebhookConfiguration{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions)
|
||||
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &admissionregistrationv1.MutatingWebhookConfigurationList{})
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &admissionregistrationv1.ValidatingWebhookConfiguration{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOptions)
|
||||
func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &admissionregistrationv1.ValidatingWebhookConfigurationList{})
|
||||
return err
|
||||
|
||||
@@ -40,8 +40,8 @@ type MutatingWebhookConfigurationsGetter interface {
|
||||
type MutatingWebhookConfigurationInterface interface {
|
||||
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)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.MutatingWebhookConfiguration, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.MutatingWebhookConfigurationList, 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.
|
||||
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().
|
||||
Resource("mutatingwebhookconfigurations").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("mutatingwebhookconfigurations").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ type ValidatingWebhookConfigurationsGetter interface {
|
||||
type ValidatingWebhookConfigurationInterface interface {
|
||||
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)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ValidatingWebhookConfiguration, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.ValidatingWebhookConfigurationList, 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.
|
||||
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().
|
||||
Resource("validatingwebhookconfigurations").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("validatingwebhookconfigurations").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &v1beta1.MutatingWebhookConfiguration{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions)
|
||||
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.MutatingWebhookConfigurationList{})
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &v1beta1.ValidatingWebhookConfiguration{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOptions)
|
||||
func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.ValidatingWebhookConfigurationList{})
|
||||
return err
|
||||
|
||||
@@ -40,8 +40,8 @@ type MutatingWebhookConfigurationsGetter interface {
|
||||
type MutatingWebhookConfigurationInterface interface {
|
||||
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)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.MutatingWebhookConfiguration, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.MutatingWebhookConfigurationList, 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.
|
||||
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().
|
||||
Resource("mutatingwebhookconfigurations").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("mutatingwebhookconfigurations").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ type ValidatingWebhookConfigurationsGetter interface {
|
||||
type ValidatingWebhookConfigurationInterface interface {
|
||||
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)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ValidatingWebhookConfiguration, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ValidatingWebhookConfigurationList, 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.
|
||||
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().
|
||||
Resource("validatingwebhookconfigurations").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("validatingwebhookconfigurations").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ type ControllerRevisionsGetter interface {
|
||||
type ControllerRevisionInterface interface {
|
||||
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)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ControllerRevision, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.ControllerRevisionList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("controllerrevisions").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("controllerrevisions").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ type DaemonSetInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (*v1.DaemonSet, error)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DaemonSet, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.DaemonSetList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("daemonsets").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("daemonsets").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ type DeploymentInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (*v1.Deployment, error)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Deployment, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.DeploymentList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("deployments").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("deployments").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions)
|
||||
func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &appsv1.ControllerRevisionList{})
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions)
|
||||
func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &appsv1.DaemonSetList{})
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeDeployments) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
|
||||
func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &appsv1.DeploymentList{})
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions)
|
||||
func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &appsv1.ReplicaSetList{})
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions)
|
||||
func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &appsv1.StatefulSetList{})
|
||||
return err
|
||||
|
||||
@@ -42,8 +42,8 @@ type ReplicaSetInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (*v1.ReplicaSet, error)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ReplicaSet, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.ReplicaSetList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("replicasets").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("replicasets").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ type StatefulSetInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (*v1.StatefulSet, error)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.StatefulSet, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.StatefulSetList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("statefulsets").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("statefulsets").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ type ControllerRevisionsGetter interface {
|
||||
type ControllerRevisionInterface interface {
|
||||
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)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ControllerRevision, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ControllerRevisionList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("controllerrevisions").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("controllerrevisions").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ type DeploymentInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Deployment, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DeploymentList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("deployments").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("deployments").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions)
|
||||
func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.ControllerRevisionList{})
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeDeployments) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
|
||||
func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{})
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions)
|
||||
func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.StatefulSetList{})
|
||||
return err
|
||||
|
||||
@@ -41,8 +41,8 @@ type StatefulSetInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (*v1beta1.StatefulSet, error)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.StatefulSet, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.StatefulSetList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("statefulsets").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("statefulsets").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ type ControllerRevisionsGetter interface {
|
||||
type ControllerRevisionInterface interface {
|
||||
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)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.ControllerRevision, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ControllerRevisionList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("controllerrevisions").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("controllerrevisions").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ type DaemonSetInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (*v1beta2.DaemonSet, error)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.DaemonSet, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DaemonSetList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("daemonsets").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("daemonsets").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ type DeploymentInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (*v1beta2.Deployment, error)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.Deployment, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DeploymentList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("deployments").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("deployments").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions)
|
||||
func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta2.ControllerRevisionList{})
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions)
|
||||
func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta2.DaemonSetList{})
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeDeployments) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
|
||||
func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta2.DeploymentList{})
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions)
|
||||
func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta2.ReplicaSetList{})
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions)
|
||||
func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta2.StatefulSetList{})
|
||||
return err
|
||||
|
||||
@@ -41,8 +41,8 @@ type ReplicaSetInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (*v1beta2.ReplicaSet, error)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.ReplicaSet, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ReplicaSetList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("replicasets").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("replicasets").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ type StatefulSetInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (*v1beta2.StatefulSet, error)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.StatefulSet, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.StatefulSetList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("statefulsets").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("statefulsets").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ type AuditSinksGetter interface {
|
||||
type AuditSinkInterface interface {
|
||||
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)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.AuditSink, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AuditSinkList, 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.
|
||||
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().
|
||||
Resource("auditsinks").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("auditsinks").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
Invokes(testing.NewRootDeleteAction(auditsinksResource, name), &v1alpha1.AuditSink{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeAuditSinks) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(auditsinksResource, listOptions)
|
||||
func (c *FakeAuditSinks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(auditsinksResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.AuditSinkList{})
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
|
||||
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &autoscalingv1.HorizontalPodAutoscalerList{})
|
||||
return err
|
||||
|
||||
@@ -41,8 +41,8 @@ type HorizontalPodAutoscalerInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (*v1.HorizontalPodAutoscaler, error)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.HorizontalPodAutoscaler, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.HorizontalPodAutoscalerList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("horizontalpodautoscalers").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("horizontalpodautoscalers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
|
||||
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2beta1.HorizontalPodAutoscalerList{})
|
||||
return err
|
||||
|
||||
@@ -41,8 +41,8 @@ type HorizontalPodAutoscalerInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta1.HorizontalPodAutoscaler, error)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2beta1.HorizontalPodAutoscaler, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2beta1.HorizontalPodAutoscalerList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("horizontalpodautoscalers").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("horizontalpodautoscalers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
|
||||
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2beta2.HorizontalPodAutoscalerList{})
|
||||
return err
|
||||
|
||||
@@ -41,8 +41,8 @@ type HorizontalPodAutoscalerInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta2.HorizontalPodAutoscaler, error)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("horizontalpodautoscalers").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("horizontalpodautoscalers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
|
||||
func (c *FakeJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &batchv1.JobList{})
|
||||
return err
|
||||
|
||||
@@ -41,8 +41,8 @@ type JobInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (*v1.Job, error)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Job, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.JobList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("jobs").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("jobs").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ type CronJobInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (*v1beta1.CronJob, error)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CronJob, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CronJobList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("cronjobs").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("cronjobs").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeCronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOptions)
|
||||
func (c *FakeCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.CronJobList{})
|
||||
return err
|
||||
|
||||
@@ -41,8 +41,8 @@ type CronJobInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, error)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CronJob, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CronJobList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("cronjobs").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("cronjobs").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeCronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOptions)
|
||||
func (c *FakeCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2alpha1.CronJobList{})
|
||||
return err
|
||||
|
||||
@@ -41,8 +41,8 @@ type CertificateSigningRequestInterface interface {
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (*v1beta1.CertificateSigningRequest, error)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CertificateSigningRequest, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, 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.
|
||||
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().
|
||||
Resource("certificatesigningrequests").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("certificatesigningrequests").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -20,20 +20,23 @@ import (
|
||||
"context"
|
||||
|
||||
certificates "k8s.io/api/certificates/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
)
|
||||
|
||||
type CertificateSigningRequestExpansion interface {
|
||||
UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error)
|
||||
UpdateApproval(ctx context.Context, certificateSigningRequest *certificates.CertificateSigningRequest, opts metav1.UpdateOptions) (result *certificates.CertificateSigningRequest, err error)
|
||||
}
|
||||
|
||||
func (c *certificateSigningRequests) UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) {
|
||||
func (c *certificateSigningRequests) UpdateApproval(ctx context.Context, certificateSigningRequest *certificates.CertificateSigningRequest, opts metav1.UpdateOptions) (result *certificates.CertificateSigningRequest, err error) {
|
||||
result = &certificates.CertificateSigningRequest{}
|
||||
err = c.client.Put().
|
||||
Resource("certificatesigningrequests").
|
||||
Name(certificateSigningRequest.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(certificateSigningRequest).
|
||||
SubResource("approval").
|
||||
Do(context.TODO()).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
Invokes(testing.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeCertificateSigningRequests) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOptions)
|
||||
func (c *FakeCertificateSigningRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.CertificateSigningRequestList{})
|
||||
return err
|
||||
|
||||
@@ -17,11 +17,14 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
certificates "k8s.io/api/certificates/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
core "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
func (c *FakeCertificateSigningRequests) UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) {
|
||||
func (c *FakeCertificateSigningRequests) UpdateApproval(ctx context.Context, certificateSigningRequest *certificates.CertificateSigningRequest, opts metav1.UpdateOptions) (result *certificates.CertificateSigningRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "approval", certificateSigningRequest), &certificates.CertificateSigningRequest{})
|
||||
if obj == nil {
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeLeases) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOptions)
|
||||
func (c *FakeLeases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &coordinationv1.LeaseList{})
|
||||
return err
|
||||
|
||||
@@ -40,8 +40,8 @@ type LeasesGetter interface {
|
||||
type LeaseInterface interface {
|
||||
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)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Lease, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.LeaseList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("leases").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("leases").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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.
|
||||
func (c *FakeLeases) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOptions)
|
||||
func (c *FakeLeases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.LeaseList{})
|
||||
return err
|
||||
|
||||
@@ -40,8 +40,8 @@ type LeasesGetter interface {
|
||||
type LeaseInterface interface {
|
||||
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)
|
||||
Delete(ctx context.Context, name string, opts *v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Lease, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.LeaseList, 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.
|
||||
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().
|
||||
Namespace(c.ns).
|
||||
Resource("leases").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("leases").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ type ComponentStatusesGetter interface {
|
||||
type ComponentStatusInterface interface {
|
||||
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)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ComponentStatus, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.ComponentStatusList, 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.
|
||||
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().
|
||||
Resource("componentstatuses").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("componentstatuses").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ type ConfigMapsGetter interface {
|
||||
type ConfigMapInterface interface {
|
||||
Create(ctx context.Context, configMap *v1.ConfigMap, opts metav1.CreateOptions) (*v1.ConfigMap, error)
|
||||
Update(ctx context.Context, configMap *v1.ConfigMap, opts metav1.UpdateOptions) (*v1.ConfigMap, error)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ConfigMap, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.ConfigMapList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
@@ -136,28 +136,28 @@ func (c *configMaps) Update(ctx context.Context, configMap *v1.ConfigMap, opts m
|
||||
}
|
||||
|
||||
// Delete takes name of the configMap and deletes it. Returns an error if one occurs.
|
||||
func (c *configMaps) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
|
||||
func (c *configMaps) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("configmaps").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *configMaps) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
func (c *configMaps) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("configmaps").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ type EndpointsGetter interface {
|
||||
type EndpointsInterface interface {
|
||||
Create(ctx context.Context, endpoints *v1.Endpoints, opts metav1.CreateOptions) (*v1.Endpoints, error)
|
||||
Update(ctx context.Context, endpoints *v1.Endpoints, opts metav1.UpdateOptions) (*v1.Endpoints, error)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Endpoints, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.EndpointsList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
@@ -136,28 +136,28 @@ func (c *endpoints) Update(ctx context.Context, endpoints *v1.Endpoints, opts me
|
||||
}
|
||||
|
||||
// Delete takes name of the endpoints and deletes it. Returns an error if one occurs.
|
||||
func (c *endpoints) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
|
||||
func (c *endpoints) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("endpoints").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *endpoints) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
func (c *endpoints) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("endpoints").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ type EventsGetter interface {
|
||||
type EventInterface interface {
|
||||
Create(ctx context.Context, event *v1.Event, opts metav1.CreateOptions) (*v1.Event, error)
|
||||
Update(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (*v1.Event, error)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Event, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.EventList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
@@ -136,28 +136,28 @@ func (c *events) Update(ctx context.Context, event *v1.Event, opts metav1.Update
|
||||
}
|
||||
|
||||
// Delete takes name of the event and deletes it. Returns an error if one occurs.
|
||||
func (c *events) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
|
||||
func (c *events) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("events").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *events) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
func (c *events) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("events").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -97,15 +97,15 @@ func (c *FakeComponentStatuses) Update(ctx context.Context, componentStatus *cor
|
||||
}
|
||||
|
||||
// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeComponentStatuses) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeComponentStatuses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(componentstatusesResource, name), &corev1.ComponentStatus{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeComponentStatuses) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(componentstatusesResource, listOptions)
|
||||
func (c *FakeComponentStatuses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(componentstatusesResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.ComponentStatusList{})
|
||||
return err
|
||||
|
||||
@@ -103,7 +103,7 @@ func (c *FakeConfigMaps) Update(ctx context.Context, configMap *corev1.ConfigMap
|
||||
}
|
||||
|
||||
// Delete takes name of the configMap and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeConfigMaps) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeConfigMaps) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(configmapsResource, c.ns, name), &corev1.ConfigMap{})
|
||||
|
||||
@@ -111,8 +111,8 @@ func (c *FakeConfigMaps) Delete(ctx context.Context, name string, options *v1.De
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeConfigMaps) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions)
|
||||
func (c *FakeConfigMaps) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(configmapsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.ConfigMapList{})
|
||||
return err
|
||||
|
||||
@@ -103,7 +103,7 @@ func (c *FakeEndpoints) Update(ctx context.Context, endpoints *corev1.Endpoints,
|
||||
}
|
||||
|
||||
// Delete takes name of the endpoints and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeEndpoints) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeEndpoints) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(endpointsResource, c.ns, name), &corev1.Endpoints{})
|
||||
|
||||
@@ -111,8 +111,8 @@ func (c *FakeEndpoints) Delete(ctx context.Context, name string, options *v1.Del
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeEndpoints) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions)
|
||||
func (c *FakeEndpoints) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(endpointsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.EndpointsList{})
|
||||
return err
|
||||
|
||||
@@ -103,7 +103,7 @@ func (c *FakeEvents) Update(ctx context.Context, event *corev1.Event, opts v1.Up
|
||||
}
|
||||
|
||||
// Delete takes name of the event and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeEvents) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeEvents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(eventsResource, c.ns, name), &corev1.Event{})
|
||||
|
||||
@@ -111,8 +111,8 @@ func (c *FakeEvents) Delete(ctx context.Context, name string, options *v1.Delete
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeEvents) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
|
||||
func (c *FakeEvents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.EventList{})
|
||||
return err
|
||||
|
||||
@@ -103,7 +103,7 @@ func (c *FakeLimitRanges) Update(ctx context.Context, limitRange *corev1.LimitRa
|
||||
}
|
||||
|
||||
// Delete takes name of the limitRange and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeLimitRanges) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeLimitRanges) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(limitrangesResource, c.ns, name), &corev1.LimitRange{})
|
||||
|
||||
@@ -111,8 +111,8 @@ func (c *FakeLimitRanges) Delete(ctx context.Context, name string, options *v1.D
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeLimitRanges) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions)
|
||||
func (c *FakeLimitRanges) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(limitrangesResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.LimitRangeList{})
|
||||
return err
|
||||
|
||||
@@ -108,7 +108,7 @@ func (c *FakeNamespaces) UpdateStatus(ctx context.Context, namespace *corev1.Nam
|
||||
}
|
||||
|
||||
// Delete takes name of the namespace and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeNamespaces) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeNamespaces) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(namespacesResource, name), &corev1.Namespace{})
|
||||
return err
|
||||
|
||||
@@ -17,11 +17,14 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
core "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
func (c *FakeNamespaces) Finalize(namespace *v1.Namespace) (*v1.Namespace, error) {
|
||||
func (c *FakeNamespaces) Finalize(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error) {
|
||||
action := core.CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = namespacesResource
|
||||
|
||||
@@ -108,15 +108,15 @@ func (c *FakeNodes) UpdateStatus(ctx context.Context, node *corev1.Node, opts v1
|
||||
}
|
||||
|
||||
// Delete takes name of the node and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeNodes) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeNodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(nodesResource, name), &corev1.Node{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeNodes) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(nodesResource, listOptions)
|
||||
func (c *FakeNodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(nodesResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.NodeList{})
|
||||
return err
|
||||
|
||||
@@ -108,15 +108,15 @@ func (c *FakePersistentVolumes) UpdateStatus(ctx context.Context, persistentVolu
|
||||
}
|
||||
|
||||
// Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs.
|
||||
func (c *FakePersistentVolumes) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakePersistentVolumes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(persistentvolumesResource, name), &corev1.PersistentVolume{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakePersistentVolumes) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions)
|
||||
func (c *FakePersistentVolumes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(persistentvolumesResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.PersistentVolumeList{})
|
||||
return err
|
||||
|
||||
@@ -115,7 +115,7 @@ func (c *FakePersistentVolumeClaims) UpdateStatus(ctx context.Context, persisten
|
||||
}
|
||||
|
||||
// Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs.
|
||||
func (c *FakePersistentVolumeClaims) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakePersistentVolumeClaims) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &corev1.PersistentVolumeClaim{})
|
||||
|
||||
@@ -123,8 +123,8 @@ func (c *FakePersistentVolumeClaims) Delete(ctx context.Context, name string, op
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakePersistentVolumeClaims) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions)
|
||||
func (c *FakePersistentVolumeClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.PersistentVolumeClaimList{})
|
||||
return err
|
||||
|
||||
@@ -115,7 +115,7 @@ func (c *FakePods) UpdateStatus(ctx context.Context, pod *corev1.Pod, opts v1.Up
|
||||
}
|
||||
|
||||
// Delete takes name of the pod and deletes it. Returns an error if one occurs.
|
||||
func (c *FakePods) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakePods) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(podsResource, c.ns, name), &corev1.Pod{})
|
||||
|
||||
@@ -123,8 +123,8 @@ func (c *FakePods) Delete(ctx context.Context, name string, options *v1.DeleteOp
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakePods) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(podsResource, c.ns, listOptions)
|
||||
func (c *FakePods) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(podsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.PodList{})
|
||||
return err
|
||||
|
||||
@@ -17,13 +17,16 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
policy "k8s.io/api/policy/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
restclient "k8s.io/client-go/rest"
|
||||
core "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
func (c *FakePods) Bind(binding *v1.Binding) error {
|
||||
func (c *FakePods) Bind(ctx context.Context, binding *v1.Binding, opts metav1.CreateOptions) error {
|
||||
action := core.CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Namespace = binding.Namespace
|
||||
@@ -57,7 +60,7 @@ func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Requ
|
||||
return &restclient.Request{}
|
||||
}
|
||||
|
||||
func (c *FakePods) Evict(eviction *policy.Eviction) error {
|
||||
func (c *FakePods) Evict(ctx context.Context, eviction *policy.Eviction) error {
|
||||
action := core.CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Namespace = c.ns
|
||||
|
||||
@@ -103,7 +103,7 @@ func (c *FakePodTemplates) Update(ctx context.Context, podTemplate *corev1.PodTe
|
||||
}
|
||||
|
||||
// Delete takes name of the podTemplate and deletes it. Returns an error if one occurs.
|
||||
func (c *FakePodTemplates) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakePodTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(podtemplatesResource, c.ns, name), &corev1.PodTemplate{})
|
||||
|
||||
@@ -111,8 +111,8 @@ func (c *FakePodTemplates) Delete(ctx context.Context, name string, options *v1.
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakePodTemplates) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOptions)
|
||||
func (c *FakePodTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.PodTemplateList{})
|
||||
return err
|
||||
|
||||
@@ -116,7 +116,7 @@ func (c *FakeReplicationControllers) UpdateStatus(ctx context.Context, replicati
|
||||
}
|
||||
|
||||
// Delete takes name of the replicationController and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeReplicationControllers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeReplicationControllers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(replicationcontrollersResource, c.ns, name), &corev1.ReplicationController{})
|
||||
|
||||
@@ -124,8 +124,8 @@ func (c *FakeReplicationControllers) Delete(ctx context.Context, name string, op
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeReplicationControllers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOptions)
|
||||
func (c *FakeReplicationControllers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.ReplicationControllerList{})
|
||||
return err
|
||||
|
||||
@@ -115,7 +115,7 @@ func (c *FakeResourceQuotas) UpdateStatus(ctx context.Context, resourceQuota *co
|
||||
}
|
||||
|
||||
// Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeResourceQuotas) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeResourceQuotas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(resourcequotasResource, c.ns, name), &corev1.ResourceQuota{})
|
||||
|
||||
@@ -123,8 +123,8 @@ func (c *FakeResourceQuotas) Delete(ctx context.Context, name string, options *v
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeResourceQuotas) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOptions)
|
||||
func (c *FakeResourceQuotas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.ResourceQuotaList{})
|
||||
return err
|
||||
|
||||
@@ -103,7 +103,7 @@ func (c *FakeSecrets) Update(ctx context.Context, secret *corev1.Secret, opts v1
|
||||
}
|
||||
|
||||
// Delete takes name of the secret and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeSecrets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeSecrets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(secretsResource, c.ns, name), &corev1.Secret{})
|
||||
|
||||
@@ -111,8 +111,8 @@ func (c *FakeSecrets) Delete(ctx context.Context, name string, options *v1.Delet
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeSecrets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(secretsResource, c.ns, listOptions)
|
||||
func (c *FakeSecrets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(secretsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.SecretList{})
|
||||
return err
|
||||
|
||||
@@ -115,7 +115,7 @@ func (c *FakeServices) UpdateStatus(ctx context.Context, service *corev1.Service
|
||||
}
|
||||
|
||||
// Delete takes name of the service and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeServices) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(servicesResource, c.ns, name), &corev1.Service{})
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ func (c *FakeServiceAccounts) Update(ctx context.Context, serviceAccount *corev1
|
||||
}
|
||||
|
||||
// Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeServiceAccounts) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeServiceAccounts) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(serviceaccountsResource, c.ns, name), &corev1.ServiceAccount{})
|
||||
|
||||
@@ -112,8 +112,8 @@ func (c *FakeServiceAccounts) Delete(ctx context.Context, name string, options *
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeServiceAccounts) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOptions)
|
||||
func (c *FakeServiceAccounts) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.ServiceAccountList{})
|
||||
return err
|
||||
|
||||
@@ -40,8 +40,8 @@ type LimitRangesGetter interface {
|
||||
type LimitRangeInterface interface {
|
||||
Create(ctx context.Context, limitRange *v1.LimitRange, opts metav1.CreateOptions) (*v1.LimitRange, error)
|
||||
Update(ctx context.Context, limitRange *v1.LimitRange, opts metav1.UpdateOptions) (*v1.LimitRange, error)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.LimitRange, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.LimitRangeList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
@@ -136,28 +136,28 @@ func (c *limitRanges) Update(ctx context.Context, limitRange *v1.LimitRange, opt
|
||||
}
|
||||
|
||||
// Delete takes name of the limitRange and deletes it. Returns an error if one occurs.
|
||||
func (c *limitRanges) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
|
||||
func (c *limitRanges) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("limitranges").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *limitRanges) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
func (c *limitRanges) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("limitranges").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ type NamespaceInterface interface {
|
||||
Create(ctx context.Context, namespace *v1.Namespace, opts metav1.CreateOptions) (*v1.Namespace, error)
|
||||
Update(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error)
|
||||
UpdateStatus(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error)
|
||||
Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Namespace, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.NamespaceList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
@@ -144,11 +144,11 @@ func (c *namespaces) UpdateStatus(ctx context.Context, namespace *v1.Namespace,
|
||||
}
|
||||
|
||||
// Delete takes name of the namespace and deletes it. Returns an error if one occurs.
|
||||
func (c *namespaces) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
|
||||
func (c *namespaces) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("namespaces").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
@@ -20,16 +20,18 @@ import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
)
|
||||
|
||||
// The NamespaceExpansion interface allows manually adding extra methods to the NamespaceInterface.
|
||||
type NamespaceExpansion interface {
|
||||
Finalize(item *v1.Namespace) (*v1.Namespace, error)
|
||||
Finalize(ctx context.Context, item *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error)
|
||||
}
|
||||
|
||||
// Finalize takes the representation of a namespace to update. Returns the server's representation of the namespace, and an error, if it occurs.
|
||||
func (c *namespaces) Finalize(namespace *v1.Namespace) (result *v1.Namespace, err error) {
|
||||
func (c *namespaces) Finalize(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (result *v1.Namespace, err error) {
|
||||
result = &v1.Namespace{}
|
||||
err = c.client.Put().Resource("namespaces").Name(namespace.Name).SubResource("finalize").Body(namespace).Do(context.TODO()).Into(result)
|
||||
err = c.client.Put().Resource("namespaces").Name(namespace.Name).VersionedParams(&opts, scheme.ParameterCodec).SubResource("finalize").Body(namespace).Do(ctx).Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user