From 7a08020ed2517bdb058df950bf98d20aae8542ec Mon Sep 17 00:00:00 2001 From: Mikhail Mazurskiy Date: Sat, 21 Aug 2021 12:20:30 +1000 Subject: [PATCH 001/111] Make sleep interruptible Kubernetes-commit: b705a521d8814b38faabea218097cac65d6ab5c5 --- tools/watch/retrywatcher.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/watch/retrywatcher.go b/tools/watch/retrywatcher.go index 1ed46ccb9..e4806d2ea 100644 --- a/tools/watch/retrywatcher.go +++ b/tools/watch/retrywatcher.go @@ -268,7 +268,13 @@ func (rw *RetryWatcher) receive() { return } - time.Sleep(retryAfter) + timer := time.NewTimer(retryAfter) + select { + case <-ctx.Done(): + timer.Stop() + return + case <-timer.C: + } klog.V(4).Infof("Restarting RetryWatcher at RV=%q", rw.lastResourceVersion) }, rw.minRestartDelay) From f582d43dbda40c8cc2da8aa6f14b19d3d94b7428 Mon Sep 17 00:00:00 2001 From: John Howard Date: Thu, 30 Sep 2021 16:32:23 -0700 Subject: [PATCH 002/111] Make metadata fake client implement testing.FakeClient This mirrors most (maybe all?) other fake clients. Example of a real world use case this would have been useful: https://github.com/istio/istio/pull/35434 Kubernetes-commit: 86c9fef160b37ce834b680e49cf237917d2e5c6c --- metadata/fake/simple.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/metadata/fake/simple.go b/metadata/fake/simple.go index adf0ce9a1..ca7712374 100644 --- a/metadata/fake/simple.go +++ b/metadata/fake/simple.go @@ -60,7 +60,7 @@ func NewSimpleMetadataClient(scheme *runtime.Scheme, objects ...runtime.Object) } } - cs := &FakeMetadataClient{scheme: scheme} + cs := &FakeMetadataClient{scheme: scheme, tracker: o} cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { gvr := action.GetResource() @@ -80,7 +80,8 @@ func NewSimpleMetadataClient(scheme *runtime.Scheme, objects ...runtime.Object) // you want to test easier. type FakeMetadataClient struct { testing.Fake - scheme *runtime.Scheme + scheme *runtime.Scheme + tracker testing.ObjectTracker } type metadataResourceClient struct { @@ -89,7 +90,14 @@ type metadataResourceClient struct { resource schema.GroupVersionResource } -var _ metadata.Interface = &FakeMetadataClient{} +var ( + _ metadata.Interface = &FakeMetadataClient{} + _ testing.FakeClient = &FakeMetadataClient{} +) + +func (c *FakeMetadataClient) Tracker() testing.ObjectTracker { + return c.tracker +} // Resource returns an interface for accessing the provided resource. func (c *FakeMetadataClient) Resource(resource schema.GroupVersionResource) metadata.Getter { From 547d6c809a170d07c423dd089997920590373f95 Mon Sep 17 00:00:00 2001 From: hyschumi Date: Thu, 4 Nov 2021 21:11:53 +0800 Subject: [PATCH 003/111] refactor: remove dup code Signed-off-by: hyschumi Kubernetes-commit: da5d0a72d9d2a0948e21b746a8c6951dc40c0ce9 --- tools/cache/thread_safe_store.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/cache/thread_safe_store.go b/tools/cache/thread_safe_store.go index ea34e9035..aaf0741d0 100644 --- a/tools/cache/thread_safe_store.go +++ b/tools/cache/thread_safe_store.go @@ -71,11 +71,7 @@ type threadSafeMap struct { } func (c *threadSafeMap) Add(key string, obj interface{}) { - c.lock.Lock() - defer c.lock.Unlock() - oldObject := c.items[key] - c.items[key] = obj - c.updateIndices(oldObject, obj, key) + c.Update(key, obj) } func (c *threadSafeMap) Update(key string, obj interface{}) { From a8ff96d88763d248c5313807e10044f7279277f9 Mon Sep 17 00:00:00 2001 From: astraw99 Date: Fri, 19 Nov 2021 11:06:14 +0800 Subject: [PATCH 004/111] fix log typo Kubernetes-commit: abce7ab534d0c667dd1438ff24bb3130d17d3f6e --- tools/cache/shared_informer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cache/shared_informer.go b/tools/cache/shared_informer.go index 4b7fc04e3..2ff493ecb 100644 --- a/tools/cache/shared_informer.go +++ b/tools/cache/shared_informer.go @@ -244,7 +244,7 @@ func WaitForNamedCacheSync(controllerName string, stopCh <-chan struct{}, cacheS return false } - klog.Infof("Caches are synced for %s ", controllerName) + klog.Infof("Caches are synced for %s", controllerName) return true } From 0e6a989bc472a657d7e41efd5411b92a40dd8081 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Thu, 18 Nov 2021 03:37:02 -0800 Subject: [PATCH 005/111] Merge pull request #99728 from mattcary/control StatefulSet PVC auto-delete implementation Kubernetes-commit: b8af116327cd5d8e5411cbac04e7d4d11d22485d --- go.mod | 10 +++++----- go.sum | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 2b6c6a489..d37b507fa 100644 --- a/go.mod +++ b/go.mod @@ -30,16 +30,16 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20211124232210-4c321cf829a0 - k8s.io/apimachinery v0.0.0-20211124232001-ffb9472ec51a + k8s.io/api v0.0.0-20211118113702-cf43cc39e223 + k8s.io/apimachinery v0.0.0-20211117172554-9edaf59fbc7f k8s.io/klog/v2 v2.30.0 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b - sigs.k8s.io/structured-merge-diff/v4 v4.1.2 + sigs.k8s.io/structured-merge-diff/v4 v4.2.0 sigs.k8s.io/yaml v1.2.0 ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20211124232210-4c321cf829a0 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211124232001-ffb9472ec51a + k8s.io/api => k8s.io/api v0.0.0-20211118113702-cf43cc39e223 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211117172554-9edaf59fbc7f ) diff --git a/go.sum b/go.sum index fe85423d9..eede8cd3f 100644 --- a/go.sum +++ b/go.sum @@ -610,10 +610,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20211124232210-4c321cf829a0 h1:hTJnV20bAHUQZIzigjK3CvWqQuzeQP/C7AP72fzzEIo= -k8s.io/api v0.0.0-20211124232210-4c321cf829a0/go.mod h1:Iod80qmyxDiUr9X93OyKup/yGuYZGx8VK8nLuWpK9Yc= -k8s.io/apimachinery v0.0.0-20211124232001-ffb9472ec51a h1:IggksFfccO+DgJNByne5JOJ+jfqpcMZRsYkwYGZ6qkA= -k8s.io/apimachinery v0.0.0-20211124232001-ffb9472ec51a/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= +k8s.io/api v0.0.0-20211118113702-cf43cc39e223 h1:NbKZuHNugpeedzhagEDq1jjdz9jH5eIJ0lheOTw1RRo= +k8s.io/api v0.0.0-20211118113702-cf43cc39e223/go.mod h1:jjLPxdhz5fcSYOYCjjSuZOxHbLef2fqdB4sx+X5cbPA= +k8s.io/apimachinery v0.0.0-20211117172554-9edaf59fbc7f h1:gvsqJqL6FCUf5MHZMT0oSXH0JlvV34DroJIEbm8tz7E= +k8s.io/apimachinery v0.0.0-20211117172554-9edaf59fbc7f/go.mod h1:SqloDTPqePPNhEp8K4qUgqpKc3tE+ymn05iIUbSAQ7g= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= @@ -630,7 +630,7 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= From 38ad8362273bb105eb6a04c3ad15b3ef29d668cf Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Wed, 24 Nov 2021 10:32:24 -0500 Subject: [PATCH 006/111] Revert sigs.k8s.io/structured-merge-diff/v4 to v4.1.2 Kubernetes-commit: ed68909177eca588731bc153d2f69dd235e8fe10 --- go.mod | 11 ++++++----- go.sum | 8 ++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index d37b507fa..2f2b32aeb 100644 --- a/go.mod +++ b/go.mod @@ -30,16 +30,17 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20211118113702-cf43cc39e223 - k8s.io/apimachinery v0.0.0-20211117172554-9edaf59fbc7f + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.30.0 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b - sigs.k8s.io/structured-merge-diff/v4 v4.2.0 + sigs.k8s.io/structured-merge-diff/v4 v4.1.2 sigs.k8s.io/yaml v1.2.0 ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20211118113702-cf43cc39e223 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211117172554-9edaf59fbc7f + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index eede8cd3f..b96522876 100644 --- a/go.sum +++ b/go.sum @@ -610,10 +610,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20211118113702-cf43cc39e223 h1:NbKZuHNugpeedzhagEDq1jjdz9jH5eIJ0lheOTw1RRo= -k8s.io/api v0.0.0-20211118113702-cf43cc39e223/go.mod h1:jjLPxdhz5fcSYOYCjjSuZOxHbLef2fqdB4sx+X5cbPA= -k8s.io/apimachinery v0.0.0-20211117172554-9edaf59fbc7f h1:gvsqJqL6FCUf5MHZMT0oSXH0JlvV34DroJIEbm8tz7E= -k8s.io/apimachinery v0.0.0-20211117172554-9edaf59fbc7f/go.mod h1:SqloDTPqePPNhEp8K4qUgqpKc3tE+ymn05iIUbSAQ7g= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= @@ -630,7 +626,7 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= From c8a8ad54a6056a3e311abb2c2f95f5619eba919a Mon Sep 17 00:00:00 2001 From: DingShujie Date: Thu, 25 Nov 2021 09:29:03 +0800 Subject: [PATCH 007/111] update k/utils to v0.0.0-20211116205334-6203023598ed Kubernetes-commit: 25cf49770c8a91a837aa7e791eb2b177305d9610 --- go.mod | 11 ++++++----- go.sum | 8 ++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 29eb07df0..f82671d27 100644 --- a/go.mod +++ b/go.mod @@ -30,16 +30,17 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20211203085948-25b7aa9e86de - k8s.io/apimachinery v0.0.0-20211203013834-5f072755815a + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.30.0 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 - k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b + k8s.io/utils v0.0.0-20211116205334-6203023598ed sigs.k8s.io/structured-merge-diff/v4 v4.1.2 sigs.k8s.io/yaml v1.2.0 ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20211203085948-25b7aa9e86de - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211203013834-5f072755815a + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index cc4c6d377..0faf613a1 100644 --- a/go.sum +++ b/go.sum @@ -610,10 +610,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20211203085948-25b7aa9e86de h1:sonP3TZF8wLYB7pZ9U+cFOmU+aowMk08AOJQLLLlE+c= -k8s.io/api v0.0.0-20211203085948-25b7aa9e86de/go.mod h1:UuggGDUdGB3f6prC8FzrBGPJ+A+oIqVWmF5HV1VeEIM= -k8s.io/apimachinery v0.0.0-20211203013834-5f072755815a h1:oZgEV6uZiZ8pZC+VIbTkAuc0WF32K3tprAzYQXluxAk= -k8s.io/apimachinery v0.0.0-20211203013834-5f072755815a/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= @@ -622,8 +618,8 @@ k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= -k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE= +k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From 1218545a5b5b99dbb0002184770eaf7346edd8f7 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Wed, 24 Nov 2021 13:37:31 -0800 Subject: [PATCH 008/111] Merge pull request #106660 from liggitt/smd-merge Revert sigs.k8s.io/structured-merge-diff/v4 to v4.1.2 Kubernetes-commit: aff056d8a197f6a404ad5e02210ca662d16c3dbe --- go.mod | 9 ++++----- go.sum | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 2f2b32aeb..2b6c6a489 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0 - k8s.io/apimachinery v0.0.0 + k8s.io/api v0.0.0-20211124232210-4c321cf829a0 + k8s.io/apimachinery v0.0.0-20211124232001-ffb9472ec51a k8s.io/klog/v2 v2.30.0 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b @@ -40,7 +40,6 @@ require ( ) replace ( - k8s.io/api => ../api - k8s.io/apimachinery => ../apimachinery - k8s.io/client-go => ../client-go + k8s.io/api => k8s.io/api v0.0.0-20211124232210-4c321cf829a0 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211124232001-ffb9472ec51a ) diff --git a/go.sum b/go.sum index b96522876..fe85423d9 100644 --- a/go.sum +++ b/go.sum @@ -610,6 +610,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.0.0-20211124232210-4c321cf829a0 h1:hTJnV20bAHUQZIzigjK3CvWqQuzeQP/C7AP72fzzEIo= +k8s.io/api v0.0.0-20211124232210-4c321cf829a0/go.mod h1:Iod80qmyxDiUr9X93OyKup/yGuYZGx8VK8nLuWpK9Yc= +k8s.io/apimachinery v0.0.0-20211124232001-ffb9472ec51a h1:IggksFfccO+DgJNByne5JOJ+jfqpcMZRsYkwYGZ6qkA= +k8s.io/apimachinery v0.0.0-20211124232001-ffb9472ec51a/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 115ee0e4756cfec89f5e8e1593d5348205e2783d Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Mon, 29 Nov 2021 15:37:31 +0100 Subject: [PATCH 009/111] bump TestHTTP1DoNotReuseRequestAfterTimeout timeout the test TestHTTP1DoNotReuseRequestAfterTimeout has to wait for request to time out to assert that subsequent requests does not reuse the TCP connection. It seems that current value of 100ms causes issues on some CI environments and bumping the timeout seems to solve this flakiness, We can bump the timeout value because is really low compared to real scenarios and the bump still keeps it in the millisecond order. Kubernetes-commit: 85797eba7075d83b116b5c91ff3b17c2d5118d01 --- rest/request_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest/request_test.go b/rest/request_test.go index 30ae87d8f..8e9bb92b5 100644 --- a/rest/request_test.go +++ b/rest/request_test.go @@ -2995,7 +2995,7 @@ func TestHTTP1DoNotReuseRequestAfterTimeout(t *testing.T) { config := &Config{ Host: ts.URL, Transport: utilnet.SetTransportDefaults(transport), - Timeout: 100 * time.Millisecond, + Timeout: 1 * time.Second, // These fields are required to create a REST client. ContentConfig: ContentConfig{ GroupVersion: &schema.GroupVersion{}, From 91177d7e4d99916703db2747f79dd9123ade7560 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Mon, 29 Nov 2021 13:23:22 -0800 Subject: [PATCH 010/111] Merge pull request #106716 from aojea/http1_flake_timeout bump TestHTTP1DoNotReuseRequestAfterTimeout timeout Kubernetes-commit: c1153d3353bd4f4b68d85245d53d2745586be474 From 2f5ae78650b6d44acecea976ac2191bddfd550cb Mon Sep 17 00:00:00 2001 From: Sergey Kanzhelev Date: Wed, 1 Dec 2021 18:25:37 +0000 Subject: [PATCH 011/111] generated files for the grpc field rename Kubernetes-commit: 4c9d77d724069ec56140b686d3e8e280f5ab0274 --- applyconfigurations/core/v1/probehandler.go | 2 +- applyconfigurations/internal/internal.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/applyconfigurations/core/v1/probehandler.go b/applyconfigurations/core/v1/probehandler.go index 2da752c56..54f3344ac 100644 --- a/applyconfigurations/core/v1/probehandler.go +++ b/applyconfigurations/core/v1/probehandler.go @@ -24,7 +24,7 @@ type ProbeHandlerApplyConfiguration struct { Exec *ExecActionApplyConfiguration `json:"exec,omitempty"` HTTPGet *HTTPGetActionApplyConfiguration `json:"httpGet,omitempty"` TCPSocket *TCPSocketActionApplyConfiguration `json:"tcpSocket,omitempty"` - GRPC *GRPCActionApplyConfiguration `json:"gRPC,omitempty"` + GRPC *GRPCActionApplyConfiguration `json:"grpc,omitempty"` } // ProbeHandlerApplyConfiguration constructs an declarative configuration of the ProbeHandler type for use with diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index edf6e7a97..824c5e958 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -5984,7 +5984,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: failureThreshold type: scalar: numeric - - name: gRPC + - name: grpc type: namedType: io.k8s.api.core.v1.GRPCAction - name: httpGet From d85d0d914a32b2cd96ebfd5f65f2087d6272f70c Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Wed, 1 Dec 2021 12:11:18 -0800 Subject: [PATCH 012/111] Merge pull request #106774 from SergeyKanzhelev/grpcFieldRename Grpc field rename Kubernetes-commit: 0fe049cb93683e488b9829316ac889bc4c2e42fc --- go.mod | 4 ++-- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 2b6c6a489..b4d4edba7 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20211124232210-4c321cf829a0 + k8s.io/api v0.0.0-20211201201118-1a737294b818 k8s.io/apimachinery v0.0.0-20211124232001-ffb9472ec51a k8s.io/klog/v2 v2.30.0 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 @@ -40,6 +40,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20211124232210-4c321cf829a0 + k8s.io/api => k8s.io/api v0.0.0-20211201201118-1a737294b818 k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211124232001-ffb9472ec51a ) diff --git a/go.sum b/go.sum index fe85423d9..16fc7f6a0 100644 --- a/go.sum +++ b/go.sum @@ -610,8 +610,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20211124232210-4c321cf829a0 h1:hTJnV20bAHUQZIzigjK3CvWqQuzeQP/C7AP72fzzEIo= -k8s.io/api v0.0.0-20211124232210-4c321cf829a0/go.mod h1:Iod80qmyxDiUr9X93OyKup/yGuYZGx8VK8nLuWpK9Yc= +k8s.io/api v0.0.0-20211201201118-1a737294b818 h1:lqSDxT22/4cN4aRWwCD+1iOiIwTzc5JMV1UQl+4MoIM= +k8s.io/api v0.0.0-20211201201118-1a737294b818/go.mod h1:Iod80qmyxDiUr9X93OyKup/yGuYZGx8VK8nLuWpK9Yc= k8s.io/apimachinery v0.0.0-20211124232001-ffb9472ec51a h1:IggksFfccO+DgJNByne5JOJ+jfqpcMZRsYkwYGZ6qkA= k8s.io/apimachinery v0.0.0-20211124232001-ffb9472ec51a/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= From 276ea3ed979947d7cdd4b3d708862245ddcd8883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Tue, 7 Dec 2021 16:38:32 +0100 Subject: [PATCH 013/111] Remove support for Endpoints and ConfigMaps lock from leader election Kubernetes-commit: 29d9683cd0fb3cc81810a8b39715e5eb4c68b00e --- tools/leaderelection/leaderelection_test.go | 92 ++----------------- .../resourcelock/configmaplock.go | 14 +-- .../resourcelock/endpointslock.go | 14 +-- .../leaderelection/resourcelock/interface.go | 86 +++++++++++++++-- 4 files changed, 99 insertions(+), 107 deletions(-) diff --git a/tools/leaderelection/leaderelection_test.go b/tools/leaderelection/leaderelection_test.go index 8fba412ce..9691c8e02 100644 --- a/tools/leaderelection/leaderelection_test.go +++ b/tools/leaderelection/leaderelection_test.go @@ -66,11 +66,6 @@ func createLockObject(t *testing.T, objectType, namespace, name string, record * return } -// Will test leader election using endpoints as the resource -func TestTryAcquireOrRenewEndpoints(t *testing.T) { - testTryAcquireOrRenew(t, "endpoints") -} - type Reactor struct { verb string objectType string @@ -259,24 +254,14 @@ func testTryAcquireOrRenew(t *testing.T, objectType string) { }) switch objectType { - case "endpoints": - lock = &rl.EndpointsLock{ - EndpointsMeta: objectMeta, - LockConfig: resourceLockConfig, - Client: c.CoreV1(), - } - case "configmaps": - lock = &rl.ConfigMapLock{ - ConfigMapMeta: objectMeta, - LockConfig: resourceLockConfig, - Client: c.CoreV1(), - } case "leases": lock = &rl.LeaseLock{ LeaseMeta: objectMeta, LockConfig: resourceLockConfig, Client: c.CoordinationV1(), } + default: + t.Fatalf("Unknown objectType: %v", objectType) } lec := LeaderElectionConfig{ @@ -325,11 +310,6 @@ func testTryAcquireOrRenew(t *testing.T, objectType string) { } } -// Will test leader election using configmap as the resource -func TestTryAcquireOrRenewConfigMaps(t *testing.T) { - testTryAcquireOrRenew(t, "configmaps") -} - // Will test leader election using lease as the resource func TestTryAcquireOrRenewLeases(t *testing.T) { testTryAcquireOrRenew(t, "leases") @@ -364,9 +344,9 @@ func TestLeaseSpecToLeaderElectionRecordRoundTrip(t *testing.T) { func multiLockType(t *testing.T, objectType string) (primaryType, secondaryType string) { switch objectType { case rl.EndpointsLeasesResourceLock: - return rl.EndpointsResourceLock, rl.LeasesResourceLock + return "endpoints", rl.LeasesResourceLock case rl.ConfigMapsLeasesResourceLock: - return rl.ConfigMapsResourceLock, rl.LeasesResourceLock + return "configmaps", rl.LeasesResourceLock default: t.Fatal("unexpected objType:" + objectType) } @@ -818,9 +798,7 @@ func testTryAcquireOrRenewMultiLock(t *testing.T, objectType string) { var wg sync.WaitGroup wg.Add(1) var reportedLeader string - var lock rl.Interface - objectMeta := metav1.ObjectMeta{Namespace: "foo", Name: "bar"} resourceLockConfig := rl.ResourceLockConfig{ Identity: "baz", EventRecorder: &record.FakeRecorder{}, @@ -834,33 +812,9 @@ func testTryAcquireOrRenewMultiLock(t *testing.T, objectType string) { return true, nil, fmt.Errorf("unreachable action") }) - switch objectType { - case rl.EndpointsLeasesResourceLock: - lock = &rl.MultiLock{ - Primary: &rl.EndpointsLock{ - EndpointsMeta: objectMeta, - LockConfig: resourceLockConfig, - Client: c.CoreV1(), - }, - Secondary: &rl.LeaseLock{ - LeaseMeta: objectMeta, - LockConfig: resourceLockConfig, - Client: c.CoordinationV1(), - }, - } - case rl.ConfigMapsLeasesResourceLock: - lock = &rl.MultiLock{ - Primary: &rl.ConfigMapLock{ - ConfigMapMeta: objectMeta, - LockConfig: resourceLockConfig, - Client: c.CoreV1(), - }, - Secondary: &rl.LeaseLock{ - LeaseMeta: objectMeta, - LockConfig: resourceLockConfig, - Client: c.CoordinationV1(), - }, - } + lock, err := rl.New(objectType, "foo", "bar", c.CoreV1(), c.CoordinationV1(), resourceLockConfig) + if err != nil { + t.Fatalf("Couldn't create lock: %v", err) } lec := LeaderElectionConfig{ @@ -983,24 +937,14 @@ func testReleaseLease(t *testing.T, objectType string) { }) switch objectType { - case "endpoints": - lock = &rl.EndpointsLock{ - EndpointsMeta: objectMeta, - LockConfig: resourceLockConfig, - Client: c.CoreV1(), - } - case "configmaps": - lock = &rl.ConfigMapLock{ - ConfigMapMeta: objectMeta, - LockConfig: resourceLockConfig, - Client: c.CoreV1(), - } case "leases": lock = &rl.LeaseLock{ LeaseMeta: objectMeta, LockConfig: resourceLockConfig, Client: c.CoordinationV1(), } + default: + t.Fatalf("Unknown objectType: %v", objectType) } lec := LeaderElectionConfig{ @@ -1058,29 +1002,11 @@ func testReleaseLease(t *testing.T, objectType string) { } } -// Will test leader election using endpoints as the resource -func TestReleaseLeaseEndpoints(t *testing.T) { - testReleaseLease(t, "endpoints") -} - -// Will test leader election using endpoints as the resource -func TestReleaseLeaseConfigMaps(t *testing.T) { - testReleaseLease(t, "configmaps") -} - // Will test leader election using endpoints as the resource func TestReleaseLeaseLeases(t *testing.T) { testReleaseLease(t, "leases") } -func TestReleaseOnCancellation_Endpoints(t *testing.T) { - testReleaseOnCancellation(t, "endpoints") -} - -func TestReleaseOnCancellation_ConfigMaps(t *testing.T) { - testReleaseOnCancellation(t, "configmaps") -} - func TestReleaseOnCancellation_Leases(t *testing.T) { testReleaseOnCancellation(t, "leases") } diff --git a/tools/leaderelection/resourcelock/configmaplock.go b/tools/leaderelection/resourcelock/configmaplock.go index 552280d2d..570272898 100644 --- a/tools/leaderelection/resourcelock/configmaplock.go +++ b/tools/leaderelection/resourcelock/configmaplock.go @@ -32,7 +32,7 @@ import ( // and use ConfigMaps as the means to pass that configuration // data we will likely move to deprecate the Endpoints lock. -type ConfigMapLock struct { +type configMapLock struct { // ConfigMapMeta should contain a Name and a Namespace of a // ConfigMapMeta object that the LeaderElector will attempt to lead. ConfigMapMeta metav1.ObjectMeta @@ -42,7 +42,7 @@ type ConfigMapLock struct { } // Get returns the election record from a ConfigMap Annotation -func (cml *ConfigMapLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) { +func (cml *configMapLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) { var record LeaderElectionRecord var err error cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Get(ctx, cml.ConfigMapMeta.Name, metav1.GetOptions{}) @@ -63,7 +63,7 @@ func (cml *ConfigMapLock) Get(ctx context.Context) (*LeaderElectionRecord, []byt } // Create attempts to create a LeaderElectionRecord annotation -func (cml *ConfigMapLock) Create(ctx context.Context, ler LeaderElectionRecord) error { +func (cml *configMapLock) Create(ctx context.Context, ler LeaderElectionRecord) error { recordBytes, err := json.Marshal(ler) if err != nil { return err @@ -81,7 +81,7 @@ func (cml *ConfigMapLock) Create(ctx context.Context, ler LeaderElectionRecord) } // Update will update an existing annotation on a given resource. -func (cml *ConfigMapLock) Update(ctx context.Context, ler LeaderElectionRecord) error { +func (cml *configMapLock) Update(ctx context.Context, ler LeaderElectionRecord) error { if cml.cm == nil { return errors.New("configmap not initialized, call get or create first") } @@ -102,7 +102,7 @@ func (cml *ConfigMapLock) Update(ctx context.Context, ler LeaderElectionRecord) } // RecordEvent in leader election while adding meta-data -func (cml *ConfigMapLock) RecordEvent(s string) { +func (cml *configMapLock) RecordEvent(s string) { if cml.LockConfig.EventRecorder == nil { return } @@ -116,11 +116,11 @@ func (cml *ConfigMapLock) RecordEvent(s string) { // Describe is used to convert details on current resource lock // into a string -func (cml *ConfigMapLock) Describe() string { +func (cml *configMapLock) Describe() string { return fmt.Sprintf("%v/%v", cml.ConfigMapMeta.Namespace, cml.ConfigMapMeta.Name) } // Identity returns the Identity of the lock -func (cml *ConfigMapLock) Identity() string { +func (cml *configMapLock) Identity() string { return cml.LockConfig.Identity } diff --git a/tools/leaderelection/resourcelock/endpointslock.go b/tools/leaderelection/resourcelock/endpointslock.go index dcd2026ef..af3fa1626 100644 --- a/tools/leaderelection/resourcelock/endpointslock.go +++ b/tools/leaderelection/resourcelock/endpointslock.go @@ -27,7 +27,7 @@ import ( corev1client "k8s.io/client-go/kubernetes/typed/core/v1" ) -type EndpointsLock struct { +type endpointsLock struct { // EndpointsMeta should contain a Name and a Namespace of an // Endpoints object that the LeaderElector will attempt to lead. EndpointsMeta metav1.ObjectMeta @@ -37,7 +37,7 @@ type EndpointsLock struct { } // Get returns the election record from a Endpoints Annotation -func (el *EndpointsLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) { +func (el *endpointsLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) { var record LeaderElectionRecord var err error el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Get(ctx, el.EndpointsMeta.Name, metav1.GetOptions{}) @@ -58,7 +58,7 @@ func (el *EndpointsLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte } // Create attempts to create a LeaderElectionRecord annotation -func (el *EndpointsLock) Create(ctx context.Context, ler LeaderElectionRecord) error { +func (el *endpointsLock) Create(ctx context.Context, ler LeaderElectionRecord) error { recordBytes, err := json.Marshal(ler) if err != nil { return err @@ -76,7 +76,7 @@ func (el *EndpointsLock) Create(ctx context.Context, ler LeaderElectionRecord) e } // Update will update and existing annotation on a given resource. -func (el *EndpointsLock) Update(ctx context.Context, ler LeaderElectionRecord) error { +func (el *endpointsLock) Update(ctx context.Context, ler LeaderElectionRecord) error { if el.e == nil { return errors.New("endpoint not initialized, call get or create first") } @@ -97,7 +97,7 @@ func (el *EndpointsLock) Update(ctx context.Context, ler LeaderElectionRecord) e } // RecordEvent in leader election while adding meta-data -func (el *EndpointsLock) RecordEvent(s string) { +func (el *endpointsLock) RecordEvent(s string) { if el.LockConfig.EventRecorder == nil { return } @@ -111,11 +111,11 @@ func (el *EndpointsLock) RecordEvent(s string) { // Describe is used to convert details on current resource lock // into a string -func (el *EndpointsLock) Describe() string { +func (el *endpointsLock) Describe() string { return fmt.Sprintf("%v/%v", el.EndpointsMeta.Namespace, el.EndpointsMeta.Name) } // Identity returns the Identity of the lock -func (el *EndpointsLock) Identity() string { +func (el *endpointsLock) Identity() string { return el.LockConfig.Identity } diff --git a/tools/leaderelection/resourcelock/interface.go b/tools/leaderelection/resourcelock/interface.go index bc77c2eda..c6e23bda1 100644 --- a/tools/leaderelection/resourcelock/interface.go +++ b/tools/leaderelection/resourcelock/interface.go @@ -31,11 +31,77 @@ import ( const ( LeaderElectionRecordAnnotationKey = "control-plane.alpha.kubernetes.io/leader" - EndpointsResourceLock = "endpoints" - ConfigMapsResourceLock = "configmaps" + endpointsResourceLock = "endpoints" + configMapsResourceLock = "configmaps" LeasesResourceLock = "leases" - EndpointsLeasesResourceLock = "endpointsleases" - ConfigMapsLeasesResourceLock = "configmapsleases" + // When using EndpointsLeasesResourceLock, you need to ensure that + // API Priority & Fairness is configured with non-default flow-schema + // that will catch the necessary operations on leader-election related + // endpoint objects. + // + // The example of such flow scheme could look like this: + // apiVersion: flowcontrol.apiserver.k8s.io/v1beta2 + // kind: FlowSchema + // metadata: + // name: my-leader-election + // spec: + // distinguisherMethod: + // type: ByUser + // matchingPrecedence: 200 + // priorityLevelConfiguration: + // name: leader-election # reference the PL + // rules: + // - resourceRules: + // - apiGroups: + // - "" + // namespaces: + // - '*' + // resources: + // - endpoints + // verbs: + // - get + // - create + // - update + // subjects: + // - kind: ServiceAccount + // serviceAccount: + // name: '*' + // namespace: kube-system + EndpointsLeasesResourceLock = "endpointsleases" + // When using EndpointsLeasesResourceLock, you need to ensure that + // API Priority & Fairness is configured with non-default flow-schema + // that will catch the necessary operations on leader-election related + // configmap objects. + // + // The example of such flow scheme could look like this: + // apiVersion: flowcontrol.apiserver.k8s.io/v1beta2 + // kind: FlowSchema + // metadata: + // name: my-leader-election + // spec: + // distinguisherMethod: + // type: ByUser + // matchingPrecedence: 200 + // priorityLevelConfiguration: + // name: leader-election # reference the PL + // rules: + // - resourceRules: + // - apiGroups: + // - "" + // namespaces: + // - '*' + // resources: + // - configmaps + // verbs: + // - get + // - create + // - update + // subjects: + // - kind: ServiceAccount + // serviceAccount: + // name: '*' + // namespace: kube-system + ConfigMapsLeasesResourceLock = "configmapsleases" ) // LeaderElectionRecord is the record that is stored in the leader election annotation. @@ -98,7 +164,7 @@ type Interface interface { // Manufacture will create a lock of a given type according to the input parameters func New(lockType string, ns string, name string, coreClient corev1.CoreV1Interface, coordinationClient coordinationv1.CoordinationV1Interface, rlc ResourceLockConfig) (Interface, error) { - endpointsLock := &EndpointsLock{ + endpointsLock := &endpointsLock{ EndpointsMeta: metav1.ObjectMeta{ Namespace: ns, Name: name, @@ -106,7 +172,7 @@ func New(lockType string, ns string, name string, coreClient corev1.CoreV1Interf Client: coreClient, LockConfig: rlc, } - configmapLock := &ConfigMapLock{ + configmapLock := &configMapLock{ ConfigMapMeta: metav1.ObjectMeta{ Namespace: ns, Name: name, @@ -123,10 +189,10 @@ func New(lockType string, ns string, name string, coreClient corev1.CoreV1Interf LockConfig: rlc, } switch lockType { - case EndpointsResourceLock: - return endpointsLock, nil - case ConfigMapsResourceLock: - return configmapLock, nil + case endpointsResourceLock: + return nil, fmt.Errorf("endpoints lock is removed, migrate to %s", EndpointsLeasesResourceLock) + case configMapsResourceLock: + return nil, fmt.Errorf("configmaps lock is removed, migrate to %s", ConfigMapsLeasesResourceLock) case LeasesResourceLock: return leaseLock, nil case EndpointsLeasesResourceLock: From 2b59dabd4c328b7ae5fac020c35e295572b7c024 Mon Sep 17 00:00:00 2001 From: Margo Crawford Date: Tue, 7 Dec 2021 15:58:46 -0800 Subject: [PATCH 014/111] Check whether static cert is already configured in UpdateTransportConfig - Also update test-cmd.sh to pass a signing ca to the kube controller manager, so CSRs work properly in integration tests. Signed-off-by: Margo Crawford Kubernetes-commit: f015fd66ce95d02cd66efc263eb9e5441b42a17d --- plugin/pkg/client/auth/exec/exec.go | 6 +++--- plugin/pkg/client/auth/exec/exec_test.go | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/plugin/pkg/client/auth/exec/exec.go b/plugin/pkg/client/auth/exec/exec.go index e405e3dc1..9747d5074 100644 --- a/plugin/pkg/client/auth/exec/exec.go +++ b/plugin/pkg/client/auth/exec/exec.go @@ -290,8 +290,8 @@ func (a *Authenticator) UpdateTransportConfig(c *transport.Config) error { // also configured to allow client certificates for authentication. For requests // like "kubectl get --token (token) pods" we should assume the intention is to // use the provided token for authentication. The same can be said for when the - // user specifies basic auth. - if c.HasTokenAuth() || c.HasBasicAuth() { + // user specifies basic auth or cert auth. + if c.HasTokenAuth() || c.HasBasicAuth() || c.HasCertAuth() { return nil } @@ -299,7 +299,7 @@ func (a *Authenticator) UpdateTransportConfig(c *transport.Config) error { return &roundTripper{a, rt} }) - if c.TLS.GetCert != nil { + if c.HasCertCallback() { return errors.New("can't add TLS certificate callback: transport.Config.TLS.GetCert already set") } c.TLS.GetCert = a.cert diff --git a/plugin/pkg/client/auth/exec/exec_test.go b/plugin/pkg/client/auth/exec/exec_test.go index 6698fb4e8..b1fa9f4d9 100644 --- a/plugin/pkg/client/auth/exec/exec_test.go +++ b/plugin/pkg/client/auth/exec/exec_test.go @@ -1206,6 +1206,13 @@ func TestAuthorizationHeaderPresentCancelsExecAction(t *testing.T) { config.Password = "zelda" }, }, + { + name: "cert auth", + setTransportConfig: func(config *transport.Config) { + config.TLS.CertData = []byte("some-cert-data") + config.TLS.KeyData = []byte("some-key-data") + }, + }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { From 110639035d33957104d9451fda54697ba98aca68 Mon Sep 17 00:00:00 2001 From: Madhav Jivrajani Date: Thu, 9 Dec 2021 16:16:27 +0530 Subject: [PATCH 015/111] Bump k8s.io/utils Signed-off-by: Madhav Jivrajani Kubernetes-commit: 4ca13e6f0ee3ee66d863203cb2d042842dc88cd7 --- go.mod | 11 ++++++----- go.sum | 8 ++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 3a6f5e219..b479684e8 100644 --- a/go.mod +++ b/go.mod @@ -30,16 +30,17 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20211209050727-ec2f4f7d4ad2 - k8s.io/apimachinery v0.0.0-20211209050516-32df71429c45 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.30.0 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 - k8s.io/utils v0.0.0-20211116205334-6203023598ed + k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 sigs.k8s.io/structured-merge-diff/v4 v4.1.2 sigs.k8s.io/yaml v1.2.0 ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20211209050727-ec2f4f7d4ad2 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211209050516-32df71429c45 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index 94f3c581e..a8582833b 100644 --- a/go.sum +++ b/go.sum @@ -610,10 +610,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20211209050727-ec2f4f7d4ad2 h1:K7XrhDMlL3l1fa79pTgl/rOUqsvgrokAQCMV6iEUhu4= -k8s.io/api v0.0.0-20211209050727-ec2f4f7d4ad2/go.mod h1:Iftwsb4HgAp+73+OldsV1PsP728VX/kwI96jfm6U5MQ= -k8s.io/apimachinery v0.0.0-20211209050516-32df71429c45 h1:tnCAxnlmlzf6zVsfwe54w3mCcJkLJRto2r2RORXWreQ= -k8s.io/apimachinery v0.0.0-20211209050516-32df71429c45/go.mod h1:YqsOx0mBvDWmYVdhHnAJldPBPZj0y2SbDILDmaySFuU= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= @@ -622,8 +618,8 @@ k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE= -k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 h1:ZKMMxTvduyf5WUtREOqg5LiXaN1KO/+0oOQPRFrClpo= +k8s.io/utils v0.0.0-20211208161948-7d6a63dca704/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From cbd965eeb4c809efb11aa8aa38d3a96961c44b49 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Thu, 9 Dec 2021 06:06:10 -0800 Subject: [PATCH 016/111] Merge pull request #106850 from MadhavJivrajani/deprecate-clock-pkg Deprecate types in k8s.io/apimachinery/util/clock Kubernetes-commit: c16b2afc1d3c32462f068ea08cdc4791bd97b947 --- go.mod | 9 ++++----- go.sum | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index b479684e8..09b0b0488 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0 - k8s.io/apimachinery v0.0.0 + k8s.io/api v0.0.0-20211209170646-f3ee22923504 + k8s.io/apimachinery v0.0.0-20211209170455-0cb2c3db59f8 k8s.io/klog/v2 v2.30.0 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 @@ -40,7 +40,6 @@ require ( ) replace ( - k8s.io/api => ../api - k8s.io/apimachinery => ../apimachinery - k8s.io/client-go => ../client-go + k8s.io/api => k8s.io/api v0.0.0-20211209170646-f3ee22923504 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211209170455-0cb2c3db59f8 ) diff --git a/go.sum b/go.sum index a8582833b..8732a9010 100644 --- a/go.sum +++ b/go.sum @@ -610,6 +610,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.0.0-20211209170646-f3ee22923504 h1:6JLaPOkS6LYTHaPd+7I3maNLIPr+LNxwP44VgbGHLcw= +k8s.io/api v0.0.0-20211209170646-f3ee22923504/go.mod h1:vT/yvHJSEI2jdvhiOHO4SoXZ/Hmo14g9cqa8sBvRTdg= +k8s.io/apimachinery v0.0.0-20211209170455-0cb2c3db59f8 h1:SHH6kFVtEvxNSZez5MyZwrsCT9202hBuKAmC7KNcWO4= +k8s.io/apimachinery v0.0.0-20211209170455-0cb2c3db59f8/go.mod h1:pBvrJ8lBABNOJi8S/j3bmYSmYDsfR3UBj+1Ky64b1JY= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 464c8e2c41c58aa4c2ab4afa66e793db76e9b263 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Thu, 9 Dec 2021 14:20:03 -0500 Subject: [PATCH 017/111] Update golang.org/x/tools to a specific tag and avoid SHA Signed-off-by: Davanum Srinivas Kubernetes-commit: 627c50661e988ad8ac0708b1d94fdfc385e88449 --- go.mod | 11 ++++++----- go.sum | 12 ++++-------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 09b0b0488..99bf679a6 100644 --- a/go.mod +++ b/go.mod @@ -25,13 +25,13 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect - golang.org/x/net v0.0.0-20210825183410-e898025ed96a + golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20211209170646-f3ee22923504 - k8s.io/apimachinery v0.0.0-20211209170455-0cb2c3db59f8 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.30.0 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 @@ -40,6 +40,7 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20211209170646-f3ee22923504 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211209170455-0cb2c3db59f8 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index 8732a9010..fe2d897ee 100644 --- a/go.sum +++ b/go.sum @@ -335,8 +335,8 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -405,8 +405,8 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e h1:XMgFehsDnnLGtjvjOfqWSUzt0alpTR1RSEuznObga2c= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -610,10 +610,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20211209170646-f3ee22923504 h1:6JLaPOkS6LYTHaPd+7I3maNLIPr+LNxwP44VgbGHLcw= -k8s.io/api v0.0.0-20211209170646-f3ee22923504/go.mod h1:vT/yvHJSEI2jdvhiOHO4SoXZ/Hmo14g9cqa8sBvRTdg= -k8s.io/apimachinery v0.0.0-20211209170455-0cb2c3db59f8 h1:SHH6kFVtEvxNSZez5MyZwrsCT9202hBuKAmC7KNcWO4= -k8s.io/apimachinery v0.0.0-20211209170455-0cb2c3db59f8/go.mod h1:pBvrJ8lBABNOJi8S/j3bmYSmYDsfR3UBj+1Ky64b1JY= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 5a537879c2483a4752dcd6baecd5978d6a5f5b7e Mon Sep 17 00:00:00 2001 From: Spencer Peterson Date: Thu, 9 Dec 2021 16:59:54 -0800 Subject: [PATCH 018/111] Document when workqueue metrics are dropped Two simple choices for workqueues do not document that they do not emit metrics. Using their named variants fixes this, but was undocumented. Change-Id: I100ad08a4859513987941ed35d12abb4cbb39873 Kubernetes-commit: f468bee672b0ccf9b97a85f17ec1f5645aced926 --- util/workqueue/delaying_queue.go | 4 +++- util/workqueue/rate_limiting_queue.go | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/util/workqueue/delaying_queue.go b/util/workqueue/delaying_queue.go index 61c4da530..26eacc2ba 100644 --- a/util/workqueue/delaying_queue.go +++ b/util/workqueue/delaying_queue.go @@ -33,7 +33,9 @@ type DelayingInterface interface { AddAfter(item interface{}, duration time.Duration) } -// NewDelayingQueue constructs a new workqueue with delayed queuing ability +// NewDelayingQueue constructs a new workqueue with delayed queuing ability. +// NewDelayingQueue does not emit metrics. For use with a MetricsProvider, please use +// NewNamedDelayingQueue instead. func NewDelayingQueue() DelayingInterface { return NewDelayingQueueWithCustomClock(clock.RealClock{}, "") } diff --git a/util/workqueue/rate_limiting_queue.go b/util/workqueue/rate_limiting_queue.go index 8321876ac..267f4ff40 100644 --- a/util/workqueue/rate_limiting_queue.go +++ b/util/workqueue/rate_limiting_queue.go @@ -34,6 +34,8 @@ type RateLimitingInterface interface { // NewRateLimitingQueue constructs a new workqueue with rateLimited queuing ability // Remember to call Forget! If you don't, you may end up tracking failures forever. +// NewRateLimitingQueue does not emit metrics. For use with a MetricsProvider, please use +// NewNamedRateLimitingQueue instead. func NewRateLimitingQueue(rateLimiter RateLimiter) RateLimitingInterface { return &rateLimitingType{ DelayingInterface: NewDelayingQueue(), From 70f09c49434d96c49f7d4cd573a85707dbda8034 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Thu, 9 Dec 2021 21:31:26 -0500 Subject: [PATCH 019/111] Check in OWNERS modified by update-yamlfmt.sh Signed-off-by: Davanum Srinivas Kubernetes-commit: 9405e9b55ebcd461f161859a698b949ea3bde31d --- OWNERS | 32 ++++++------ kubernetes/typed/authentication/OWNERS | 7 ++- kubernetes/typed/authorization/OWNERS | 7 ++- kubernetes/typed/rbac/OWNERS | 7 ++- listers/authentication/OWNERS | 7 ++- listers/authorization/OWNERS | 7 ++- listers/rbac/OWNERS | 7 ++- pkg/apis/clientauthentication/OWNERS | 7 ++- plugin/pkg/client/auth/OWNERS | 7 ++- plugin/pkg/client/auth/gcp/OWNERS | 8 +-- rest/OWNERS | 38 +++++++------- tools/auth/OWNERS | 7 ++- tools/cache/OWNERS | 68 +++++++++++++------------- tools/events/OWNERS | 12 ++--- tools/leaderelection/OWNERS | 16 +++--- tools/metrics/OWNERS | 6 +-- tools/record/OWNERS | 4 +- transport/OWNERS | 12 ++--- util/cert/OWNERS | 7 ++- util/certificate/OWNERS | 7 ++- util/keyutil/OWNERS | 7 ++- util/retry/OWNERS | 2 +- 22 files changed, 135 insertions(+), 147 deletions(-) diff --git a/OWNERS b/OWNERS index 913c35cea..45868d912 100644 --- a/OWNERS +++ b/OWNERS @@ -1,21 +1,21 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- caesarxuchao -- deads2k -- lavalamp -- liggitt -- smarterclayton -- sttts -- yliaog + - caesarxuchao + - deads2k + - lavalamp + - liggitt + - smarterclayton + - sttts + - yliaog reviewers: -- caesarxuchao -- deads2k -- jpbetz -- lavalamp -- liggitt -- soltysh -- sttts -- yliaog + - caesarxuchao + - deads2k + - jpbetz + - lavalamp + - liggitt + - soltysh + - sttts + - yliaog labels: -- sig/api-machinery + - sig/api-machinery diff --git a/kubernetes/typed/authentication/OWNERS b/kubernetes/typed/authentication/OWNERS index 3e05d309b..c4ea6463d 100644 --- a/kubernetes/typed/authentication/OWNERS +++ b/kubernetes/typed/authentication/OWNERS @@ -1,9 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sig-auth-authenticators-approvers + - sig-auth-authenticators-approvers reviewers: -- sig-auth-authenticators-reviewers + - sig-auth-authenticators-reviewers labels: -- sig/auth - + - sig/auth diff --git a/kubernetes/typed/authorization/OWNERS b/kubernetes/typed/authorization/OWNERS index 7b3130fdc..55d3fb23c 100644 --- a/kubernetes/typed/authorization/OWNERS +++ b/kubernetes/typed/authorization/OWNERS @@ -1,9 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sig-auth-authorizers-approvers + - sig-auth-authorizers-approvers reviewers: -- sig-auth-authorizers-reviewers + - sig-auth-authorizers-reviewers labels: -- sig/auth - + - sig/auth diff --git a/kubernetes/typed/rbac/OWNERS b/kubernetes/typed/rbac/OWNERS index 7b3130fdc..55d3fb23c 100644 --- a/kubernetes/typed/rbac/OWNERS +++ b/kubernetes/typed/rbac/OWNERS @@ -1,9 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sig-auth-authorizers-approvers + - sig-auth-authorizers-approvers reviewers: -- sig-auth-authorizers-reviewers + - sig-auth-authorizers-reviewers labels: -- sig/auth - + - sig/auth diff --git a/listers/authentication/OWNERS b/listers/authentication/OWNERS index 3e05d309b..c4ea6463d 100644 --- a/listers/authentication/OWNERS +++ b/listers/authentication/OWNERS @@ -1,9 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sig-auth-authenticators-approvers + - sig-auth-authenticators-approvers reviewers: -- sig-auth-authenticators-reviewers + - sig-auth-authenticators-reviewers labels: -- sig/auth - + - sig/auth diff --git a/listers/authorization/OWNERS b/listers/authorization/OWNERS index 7b3130fdc..55d3fb23c 100644 --- a/listers/authorization/OWNERS +++ b/listers/authorization/OWNERS @@ -1,9 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sig-auth-authorizers-approvers + - sig-auth-authorizers-approvers reviewers: -- sig-auth-authorizers-reviewers + - sig-auth-authorizers-reviewers labels: -- sig/auth - + - sig/auth diff --git a/listers/rbac/OWNERS b/listers/rbac/OWNERS index 7b3130fdc..55d3fb23c 100644 --- a/listers/rbac/OWNERS +++ b/listers/rbac/OWNERS @@ -1,9 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sig-auth-authorizers-approvers + - sig-auth-authorizers-approvers reviewers: -- sig-auth-authorizers-reviewers + - sig-auth-authorizers-reviewers labels: -- sig/auth - + - sig/auth diff --git a/pkg/apis/clientauthentication/OWNERS b/pkg/apis/clientauthentication/OWNERS index e0ec62deb..4dfbb98ae 100644 --- a/pkg/apis/clientauthentication/OWNERS +++ b/pkg/apis/clientauthentication/OWNERS @@ -2,8 +2,7 @@ # approval on api packages bubbles to api-approvers reviewers: -- sig-auth-authenticators-approvers -- sig-auth-authenticators-reviewers + - sig-auth-authenticators-approvers + - sig-auth-authenticators-reviewers labels: -- sig/auth - + - sig/auth diff --git a/plugin/pkg/client/auth/OWNERS b/plugin/pkg/client/auth/OWNERS index 3e05d309b..c4ea6463d 100644 --- a/plugin/pkg/client/auth/OWNERS +++ b/plugin/pkg/client/auth/OWNERS @@ -1,9 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sig-auth-authenticators-approvers + - sig-auth-authenticators-approvers reviewers: -- sig-auth-authenticators-reviewers + - sig-auth-authenticators-reviewers labels: -- sig/auth - + - sig/auth diff --git a/plugin/pkg/client/auth/gcp/OWNERS b/plugin/pkg/client/auth/gcp/OWNERS index 97fcd3dd3..458fcf47f 100644 --- a/plugin/pkg/client/auth/gcp/OWNERS +++ b/plugin/pkg/client/auth/gcp/OWNERS @@ -1,8 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- cjcullen -- jlowdermilk + - cjcullen + - jlowdermilk reviewers: -- cjcullen -- jlowdermilk + - cjcullen + - jlowdermilk diff --git a/rest/OWNERS b/rest/OWNERS index 597484b4a..21e998ed1 100644 --- a/rest/OWNERS +++ b/rest/OWNERS @@ -1,22 +1,22 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: -- thockin -- smarterclayton -- caesarxuchao -- wojtek-t -- deads2k -- brendandburns -- liggitt -- sttts -- luxas -- dims -- errordeveloper -- hongchaodeng -- krousey -- resouer -- cjcullen -- rmmh -- asalkeld -- juanvallejo -- lojies + - thockin + - smarterclayton + - caesarxuchao + - wojtek-t + - deads2k + - brendandburns + - liggitt + - sttts + - luxas + - dims + - errordeveloper + - hongchaodeng + - krousey + - resouer + - cjcullen + - rmmh + - asalkeld + - juanvallejo + - lojies diff --git a/tools/auth/OWNERS b/tools/auth/OWNERS index 3e05d309b..c4ea6463d 100644 --- a/tools/auth/OWNERS +++ b/tools/auth/OWNERS @@ -1,9 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sig-auth-authenticators-approvers + - sig-auth-authenticators-approvers reviewers: -- sig-auth-authenticators-reviewers + - sig-auth-authenticators-reviewers labels: -- sig/auth - + - sig/auth diff --git a/tools/cache/OWNERS b/tools/cache/OWNERS index c4824d6bc..a8134f181 100644 --- a/tools/cache/OWNERS +++ b/tools/cache/OWNERS @@ -1,38 +1,38 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- caesarxuchao -- liggitt -- ncdc + - thockin + - lavalamp + - smarterclayton + - wojtek-t + - deads2k + - caesarxuchao + - liggitt + - ncdc reviewers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- brendandburns -- derekwaynecarr -- caesarxuchao -- mikedanese -- liggitt -- davidopp -- pmorie -- janetkuo -- justinsb -- soltysh -- jsafrane -- dims -- hongchaodeng -- krousey -- xiang90 -- ingvagabund -- resouer -- jessfraz -- mfojtik -- sdminonne -- ncdc + - thockin + - lavalamp + - smarterclayton + - wojtek-t + - deads2k + - brendandburns + - derekwaynecarr + - caesarxuchao + - mikedanese + - liggitt + - davidopp + - pmorie + - janetkuo + - justinsb + - soltysh + - jsafrane + - dims + - hongchaodeng + - krousey + - xiang90 + - ingvagabund + - resouer + - jessfraz + - mfojtik + - sdminonne + - ncdc diff --git a/tools/events/OWNERS b/tools/events/OWNERS index 05d68e687..9762040b6 100644 --- a/tools/events/OWNERS +++ b/tools/events/OWNERS @@ -1,10 +1,10 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sig-instrumentation-approvers -- yastij -- wojtek-t + - sig-instrumentation-approvers + - yastij + - wojtek-t reviewers: -- sig-instrumentation-reviewers -- yastij -- wojtek-t + - sig-instrumentation-reviewers + - yastij + - wojtek-t diff --git a/tools/leaderelection/OWNERS b/tools/leaderelection/OWNERS index 2ba793ee8..1517f9d99 100644 --- a/tools/leaderelection/OWNERS +++ b/tools/leaderelection/OWNERS @@ -1,12 +1,12 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- mikedanese -- timothysc + - mikedanese + - timothysc reviewers: -- wojtek-t -- deads2k -- mikedanese -- timothysc -- ingvagabund -- resouer + - wojtek-t + - deads2k + - mikedanese + - timothysc + - ingvagabund + - resouer diff --git a/tools/metrics/OWNERS b/tools/metrics/OWNERS index 77bcb5090..29d3d9857 100644 --- a/tools/metrics/OWNERS +++ b/tools/metrics/OWNERS @@ -1,6 +1,6 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: -- wojtek-t -- krousey -- jayunit100 + - wojtek-t + - krousey + - jayunit100 diff --git a/tools/record/OWNERS b/tools/record/OWNERS index e7e739b15..8105c4fe0 100644 --- a/tools/record/OWNERS +++ b/tools/record/OWNERS @@ -1,6 +1,6 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: -- sig-instrumentation-reviewers + - sig-instrumentation-reviewers approvers: -- sig-instrumentation-approvers + - sig-instrumentation-approvers diff --git a/transport/OWNERS b/transport/OWNERS index a52176903..dd38ada44 100644 --- a/transport/OWNERS +++ b/transport/OWNERS @@ -1,9 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: -- smarterclayton -- wojtek-t -- deads2k -- liggitt -- krousey -- caesarxuchao + - smarterclayton + - wojtek-t + - deads2k + - liggitt + - krousey + - caesarxuchao diff --git a/util/cert/OWNERS b/util/cert/OWNERS index 3cf036438..3c3b94c58 100644 --- a/util/cert/OWNERS +++ b/util/cert/OWNERS @@ -1,9 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sig-auth-certificates-approvers + - sig-auth-certificates-approvers reviewers: -- sig-auth-certificates-reviewers + - sig-auth-certificates-reviewers labels: -- sig/auth - + - sig/auth diff --git a/util/certificate/OWNERS b/util/certificate/OWNERS index 3cf036438..3c3b94c58 100644 --- a/util/certificate/OWNERS +++ b/util/certificate/OWNERS @@ -1,9 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sig-auth-certificates-approvers + - sig-auth-certificates-approvers reviewers: -- sig-auth-certificates-reviewers + - sig-auth-certificates-reviewers labels: -- sig/auth - + - sig/auth diff --git a/util/keyutil/OWNERS b/util/keyutil/OWNERS index 470b7a1c9..e6d229d5d 100644 --- a/util/keyutil/OWNERS +++ b/util/keyutil/OWNERS @@ -1,7 +1,6 @@ approvers: -- sig-auth-certificates-approvers + - sig-auth-certificates-approvers reviewers: -- sig-auth-certificates-reviewers + - sig-auth-certificates-reviewers labels: -- sig/auth - + - sig/auth diff --git a/util/retry/OWNERS b/util/retry/OWNERS index dec3e88d6..75736b5aa 100644 --- a/util/retry/OWNERS +++ b/util/retry/OWNERS @@ -1,4 +1,4 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: -- caesarxuchao + - caesarxuchao From b63089930a466e06ad090a04afc276cb25bf2961 Mon Sep 17 00:00:00 2001 From: Carlos Panato Date: Fri, 10 Dec 2021 12:54:55 +0100 Subject: [PATCH 020/111] dependencies: Update golang.org/x/net to v0.0.0-20211209124913-491a49abca63 Signed-off-by: Carlos Panato Kubernetes-commit: 37dda91186924fc29acc16c1c0743ed747cf6d6c --- go.mod | 11 ++++++----- go.sum | 8 ++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index aeebc6315..44bbcf104 100644 --- a/go.mod +++ b/go.mod @@ -25,13 +25,13 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect - golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f + golang.org/x/net v0.0.0-20211209124913-491a49abca63 golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20211210171937-217eb4a1d1b7 - k8s.io/apimachinery v0.0.0-20211210171607-32abfd864090 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.30.0 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 @@ -40,6 +40,7 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20211210171937-217eb4a1d1b7 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211210171607-32abfd864090 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index 594ee782f..fb2576c0e 100644 --- a/go.sum +++ b/go.sum @@ -335,8 +335,8 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= +golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -610,10 +610,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20211210171937-217eb4a1d1b7 h1:ELLlIWXQNQIq1sDxKahwCoyn1VGtN+7wVXLFVslz/GM= -k8s.io/api v0.0.0-20211210171937-217eb4a1d1b7/go.mod h1:WvPDCnOFUICoENlhLs3pQWzAtqw64do84rZx1S/nGFw= -k8s.io/apimachinery v0.0.0-20211210171607-32abfd864090 h1:45YEFnUSfA7F42GEt7FH5/H/7jrMkU6Zbb4XsdHtZ40= -k8s.io/apimachinery v0.0.0-20211210171607-32abfd864090/go.mod h1:CIrrPvxpAwyfOEWI3WlNnDpkZ8X0ahWBopk0ogxTXts= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 73f2731e23b7a211eec91d943796bea4ecf1690a Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Fri, 10 Dec 2021 15:18:50 -0500 Subject: [PATCH 021/111] Cleanup OWNERS files (No Activity in the last year) Signed-off-by: Davanum Srinivas Kubernetes-commit: 497e9c1971c9e7d0193bc6d11503ec4ad527f1d5 --- plugin/pkg/client/auth/gcp/OWNERS | 2 +- rest/OWNERS | 5 ----- tools/cache/OWNERS | 5 ----- tools/metrics/OWNERS | 1 - transport/OWNERS | 1 - 5 files changed, 1 insertion(+), 13 deletions(-) diff --git a/plugin/pkg/client/auth/gcp/OWNERS b/plugin/pkg/client/auth/gcp/OWNERS index 458fcf47f..727c970ae 100644 --- a/plugin/pkg/client/auth/gcp/OWNERS +++ b/plugin/pkg/client/auth/gcp/OWNERS @@ -2,7 +2,7 @@ approvers: - cjcullen - - jlowdermilk reviewers: - cjcullen +emeritus_approvers: - jlowdermilk diff --git a/rest/OWNERS b/rest/OWNERS index 21e998ed1..92d0694f1 100644 --- a/rest/OWNERS +++ b/rest/OWNERS @@ -12,11 +12,6 @@ reviewers: - luxas - dims - errordeveloper - - hongchaodeng - - krousey - resouer - cjcullen - - rmmh - - asalkeld - - juanvallejo - lojies diff --git a/tools/cache/OWNERS b/tools/cache/OWNERS index a8134f181..7f5fcf712 100644 --- a/tools/cache/OWNERS +++ b/tools/cache/OWNERS @@ -20,19 +20,14 @@ reviewers: - caesarxuchao - mikedanese - liggitt - - davidopp - pmorie - janetkuo - justinsb - soltysh - jsafrane - dims - - hongchaodeng - - krousey - - xiang90 - ingvagabund - resouer - - jessfraz - mfojtik - sdminonne - ncdc diff --git a/tools/metrics/OWNERS b/tools/metrics/OWNERS index 29d3d9857..2c9488a5f 100644 --- a/tools/metrics/OWNERS +++ b/tools/metrics/OWNERS @@ -2,5 +2,4 @@ reviewers: - wojtek-t - - krousey - jayunit100 diff --git a/transport/OWNERS b/transport/OWNERS index dd38ada44..34adee5ec 100644 --- a/transport/OWNERS +++ b/transport/OWNERS @@ -5,5 +5,4 @@ reviewers: - wojtek-t - deads2k - liggitt - - krousey - caesarxuchao From df7985199b1177830442f7de0988da11f83a7c9b Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Mon, 13 Dec 2021 09:38:11 -0500 Subject: [PATCH 022/111] bump sigs.k8s.io/json Kubernetes-commit: 0c5ed62c792826a547dd5a55639de150080c355b --- go.mod | 9 +++++---- go.sum | 8 ++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 6ca184b8b..44bbcf104 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20211210171938-b3fcc5e80fda - k8s.io/apimachinery v0.0.0-20211210171608-6df201a29764 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.30.0 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 @@ -40,6 +40,7 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20211210171938-b3fcc5e80fda - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211210171608-6df201a29764 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index a6c291f83..b5d74d3c5 100644 --- a/go.sum +++ b/go.sum @@ -610,10 +610,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20211210171938-b3fcc5e80fda h1:i/EgAwGxmVVIGsJWCCe04Wi07baXnEvPMQC4NiWz83g= -k8s.io/api v0.0.0-20211210171938-b3fcc5e80fda/go.mod h1:NFlXrk1vJE3TgCy35AgIeIYbYw0tF2sD6MAxgf6Mc4o= -k8s.io/apimachinery v0.0.0-20211210171608-6df201a29764 h1:37q05/gV1lmVaF0BfBc5CKdGyImfp7cf5eT1dagHC+Y= -k8s.io/apimachinery v0.0.0-20211210171608-6df201a29764/go.mod h1:Sgx1X9PR8YlVvfP6GtAQzCsmgWEbdpNReyoB9ZtVAgA= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= @@ -627,8 +623,8 @@ k8s.io/utils v0.0.0-20211208161948-7d6a63dca704/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= From 056a9de353972f9c0217ba447f00a5b3b734cb05 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Mon, 13 Dec 2021 09:09:58 -0800 Subject: [PATCH 023/111] Merge pull request #106568 from liggitt/json-fieldpath include field paths in unknown/duplicate errors Kubernetes-commit: 66ca4b0a70a3d43c45603ba441b2a368dcb38722 --- go.mod | 9 ++++----- go.sum | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 44bbcf104..ca36e5c9b 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0 - k8s.io/apimachinery v0.0.0 + k8s.io/api v0.0.0-20211213171716-0820d150f9ee + k8s.io/apimachinery v0.0.0-20211213171520-e65876e14280 k8s.io/klog/v2 v2.30.0 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 @@ -40,7 +40,6 @@ require ( ) replace ( - k8s.io/api => ../api - k8s.io/apimachinery => ../apimachinery - k8s.io/client-go => ../client-go + k8s.io/api => k8s.io/api v0.0.0-20211213171716-0820d150f9ee + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211213171520-e65876e14280 ) diff --git a/go.sum b/go.sum index b5d74d3c5..c2c5d3c15 100644 --- a/go.sum +++ b/go.sum @@ -610,6 +610,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.0.0-20211213171716-0820d150f9ee h1:/v+7rD7h8qwNabJfpXzvxuE1pY6wcJODhRknvg+nQi4= +k8s.io/api v0.0.0-20211213171716-0820d150f9ee/go.mod h1:vmCvbkzTfBQjlMNSgh69E+3vHHcFdYVCXF20g8xtEaE= +k8s.io/apimachinery v0.0.0-20211213171520-e65876e14280 h1:1Vi6MSKuJbfiiUckP6GaHTGYZtqayWlyf/JItZRH8Rg= +k8s.io/apimachinery v0.0.0-20211213171520-e65876e14280/go.mod h1:YpCy0BWvwSGZKMwmvPxCsfFJfl6vAwQdfVnPOJoUT2E= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 416ac2010798b26de1cb1f9725abc4f5c1bde8b7 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 17 Dec 2021 14:23:59 +0100 Subject: [PATCH 024/111] dependencies: update klog to v2.40.1 The new release adds support for multi-line string output (required for contextual logging) and Verbose.InfoSDepth (required to properly attach verbosity to some log messages in helper code). Kubernetes-commit: cb17b76d4d0a1c8021b427cd15b5d504bb468ee6 --- go.mod | 11 ++++++----- go.sum | 8 ++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 65e08c2a7..06b045eac 100644 --- a/go.mod +++ b/go.mod @@ -30,9 +30,9 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20211217212405-236866c4c265 - k8s.io/apimachinery v0.0.0-20211215211714-e7b02e651498 - k8s.io/klog/v2 v2.30.0 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 + k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 sigs.k8s.io/structured-merge-diff/v4 v4.1.2 @@ -40,6 +40,7 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20211217212405-236866c4c265 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211215211714-e7b02e651498 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index 1d6f3fc4e..578953611 100644 --- a/go.sum +++ b/go.sum @@ -610,15 +610,11 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20211217212405-236866c4c265 h1:4yrbMQUZVVX2JHcpJuCaxQwhXB1QuUW7BmK/PKKax2o= -k8s.io/api v0.0.0-20211217212405-236866c4c265/go.mod h1:kH5z5h8lnbGVPS6+JweP/T3Hd4aXG2QxsxPT9RmDg3Q= -k8s.io/apimachinery v0.0.0-20211215211714-e7b02e651498 h1:Gx+CxWyEfYzIYDyNgZuGHeszYhsZdIYF0v7/DGO83Bc= -k8s.io/apimachinery v0.0.0-20211215211714-e7b02e651498/go.mod h1:YpCy0BWvwSGZKMwmvPxCsfFJfl6vAwQdfVnPOJoUT2E= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= -k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.40.1 h1:P4RRucWk/lFOlDdkAr3mc7iWFkgKrZY9qZMAgek06S4= +k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From a6257fdee400a8942dac8219248fe267d09f5a8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arda=20G=C3=BC=C3=A7l=C3=BC?= Date: Mon, 20 Dec 2021 21:12:56 +0300 Subject: [PATCH 025/111] Enable setting proxyurl in kubeconfig via kubectl config (#105566) * Enable setting proxyurl in kubeconfig via kubectl config This PR enables setting `proxy-url` in kubeconfig via kubectl config. * Add godoc for proxy-url unit tests Kubernetes-commit: afdde383210294c3da573decc44b5ce55cffcb94 --- go.mod | 4 ++-- go.sum | 4 ++-- tools/clientcmd/overrides.go | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 4622971a6..65e08c2a7 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20211215212153-038a002081e5 + k8s.io/api v0.0.0-20211217212405-236866c4c265 k8s.io/apimachinery v0.0.0-20211215211714-e7b02e651498 k8s.io/klog/v2 v2.30.0 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 @@ -40,6 +40,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20211215212153-038a002081e5 + k8s.io/api => k8s.io/api v0.0.0-20211217212405-236866c4c265 k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211215211714-e7b02e651498 ) diff --git a/go.sum b/go.sum index a2e7bc1b3..1d6f3fc4e 100644 --- a/go.sum +++ b/go.sum @@ -610,8 +610,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20211215212153-038a002081e5 h1:uZaBzUjpiQ1X1YPtzRA3I5+kqx7zYkD1uUZ7Ea7hc0k= -k8s.io/api v0.0.0-20211215212153-038a002081e5/go.mod h1:kH5z5h8lnbGVPS6+JweP/T3Hd4aXG2QxsxPT9RmDg3Q= +k8s.io/api v0.0.0-20211217212405-236866c4c265 h1:4yrbMQUZVVX2JHcpJuCaxQwhXB1QuUW7BmK/PKKax2o= +k8s.io/api v0.0.0-20211217212405-236866c4c265/go.mod h1:kH5z5h8lnbGVPS6+JweP/T3Hd4aXG2QxsxPT9RmDg3Q= k8s.io/apimachinery v0.0.0-20211215211714-e7b02e651498 h1:Gx+CxWyEfYzIYDyNgZuGHeszYhsZdIYF0v7/DGO83Bc= k8s.io/apimachinery v0.0.0-20211215211714-e7b02e651498/go.mod h1:YpCy0BWvwSGZKMwmvPxCsfFJfl6vAwQdfVnPOJoUT2E= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= diff --git a/tools/clientcmd/overrides.go b/tools/clientcmd/overrides.go index ff643cc13..4c290db55 100644 --- a/tools/clientcmd/overrides.go +++ b/tools/clientcmd/overrides.go @@ -73,6 +73,7 @@ type ClusterOverrideFlags struct { CertificateAuthority FlagInfo InsecureSkipTLSVerify FlagInfo TLSServerName FlagInfo + ProxyURL FlagInfo } // FlagInfo contains information about how to register a flag. This struct is useful if you want to provide a way for an extender to @@ -160,6 +161,7 @@ const ( FlagUsername = "username" FlagPassword = "password" FlagTimeout = "request-timeout" + FlagProxyURL = "proxy-url" ) // RecommendedConfigOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing @@ -195,6 +197,7 @@ func RecommendedClusterOverrideFlags(prefix string) ClusterOverrideFlags { CertificateAuthority: FlagInfo{prefix + FlagCAFile, "", "", "Path to a cert file for the certificate authority"}, InsecureSkipTLSVerify: FlagInfo{prefix + FlagInsecure, "", "false", "If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure"}, TLSServerName: FlagInfo{prefix + FlagTLSServerName, "", "", "If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used."}, + ProxyURL: FlagInfo{prefix + FlagProxyURL, "", "", "If provided, this URL will be used to connect via proxy"}, } } @@ -234,6 +237,7 @@ func BindClusterFlags(clusterInfo *clientcmdapi.Cluster, flags *pflag.FlagSet, f flagNames.CertificateAuthority.BindStringFlag(flags, &clusterInfo.CertificateAuthority) flagNames.InsecureSkipTLSVerify.BindBoolFlag(flags, &clusterInfo.InsecureSkipTLSVerify) flagNames.TLSServerName.BindStringFlag(flags, &clusterInfo.TLSServerName) + flagNames.ProxyURL.BindStringFlag(flags, &clusterInfo.ProxyURL) } // BindFlags is a convenience method to bind the specified flags to their associated variables From 5754d8fddffe1455a26887436957510cd39f3ccb Mon Sep 17 00:00:00 2001 From: Shaun Crampton Date: Tue, 4 Jan 2022 16:05:32 +0000 Subject: [PATCH 026/111] client-go: Clear the ResourceVersionMatch on paged list calls API server rejects continuations with ResourceVersionMatch set. Kubernetes-commit: 8ac5e9b065cd9aef1543080cce1cf99cc8bb4ce9 --- tools/pager/pager.go | 5 ++++- tools/pager/pager_test.go | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/pager/pager.go b/tools/pager/pager.go index f6c6a0129..805859e09 100644 --- a/tools/pager/pager.go +++ b/tools/pager/pager.go @@ -78,6 +78,7 @@ func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runti options.Limit = p.PageSize } requestedResourceVersion := options.ResourceVersion + requestedResourceVersionMatch := options.ResourceVersionMatch var list *metainternalversion.List paginatedResult := false @@ -102,6 +103,7 @@ func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runti options.Limit = 0 options.Continue = "" options.ResourceVersion = requestedResourceVersion + options.ResourceVersionMatch = requestedResourceVersionMatch result, err := p.PageFn(ctx, options) return result, paginatedResult, err } @@ -135,10 +137,11 @@ func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runti // set the next loop up options.Continue = m.GetContinue() - // Clear the ResourceVersion on the subsequent List calls to avoid the + // Clear the ResourceVersion(Match) on the subsequent List calls to avoid the // `specifying resource version is not allowed when using continue` error. // See https://github.com/kubernetes/kubernetes/issues/85221#issuecomment-553748143. options.ResourceVersion = "" + options.ResourceVersionMatch = "" // At this point, result is already paginated. paginatedResult = true } diff --git a/tools/pager/pager_test.go b/tools/pager/pager_test.go index 86ec9f6e5..2b63e55f7 100644 --- a/tools/pager/pager_test.go +++ b/tools/pager/pager_test.go @@ -76,6 +76,10 @@ func (p *testPager) PagedList(ctx context.Context, options metav1.ListOptions) ( p.t.Errorf("invariant violated, specifying resource version (%s) is not allowed when using continue (%s).", options.ResourceVersion, options.Continue) return nil, fmt.Errorf("invariant violated") } + if options.Continue != "" && options.ResourceVersionMatch != "" { + p.t.Errorf("invariant violated, specifying resource version match type (%s) is not allowed when using continue (%s).", options.ResourceVersionMatch, options.Continue) + return nil, fmt.Errorf("invariant violated") + } var list metainternalversion.List total := options.Limit if total == 0 { @@ -201,6 +205,13 @@ func TestListPager_List(t *testing.T) { want: list(11, "rv:20"), wantPaged: true, }, + { + name: "two pages with resourceVersion and resourceVersionMatch", + fields: fields{PageSize: 10, PageFn: (&testPager{t: t, expectPage: 10, remaining: 11, rv: "rv:20"}).PagedList}, + args: args{options: metav1.ListOptions{ResourceVersion: "rv:10", ResourceVersionMatch: metav1.ResourceVersionMatchNotOlderThan}}, + want: list(11, "rv:20"), + wantPaged: true, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { From 8344b1c856d6484a78135387551c2c88a3f65a1e Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Tue, 4 Jan 2022 11:27:53 -0800 Subject: [PATCH 027/111] Merge pull request #107311 from fasaxc/fix-resource-ver-match client-go: Clear the ResourceVersionMatch on paged list calls Kubernetes-commit: b0f0aad2cedc1168bc44387e5a3d6d7745ae580b --- go.mod | 8 ++++---- go.sum | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index d89867b6b..9c3ca87db 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20211222011751-18d22ba40911 - k8s.io/apimachinery v0.0.0-20211222011548-de7147de41c9 + k8s.io/api v0.0.0-20220104023900-7289fed567b9 + k8s.io/apimachinery v0.0.0-20220104211627-ea11419e6b79 k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 @@ -40,6 +40,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20211222011751-18d22ba40911 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211222011548-de7147de41c9 + k8s.io/api => k8s.io/api v0.0.0-20220104023900-7289fed567b9 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220104211627-ea11419e6b79 ) diff --git a/go.sum b/go.sum index 86eef7247..5c39a417f 100644 --- a/go.sum +++ b/go.sum @@ -610,10 +610,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20211222011751-18d22ba40911 h1:HIg5qZfEYq2CyQiF4fk1gLQ47/bLhLVnwR+dgIGwZn0= -k8s.io/api v0.0.0-20211222011751-18d22ba40911/go.mod h1:nKerto6bPj5aBqqPdGEHYEtwdsvWd6LAIUE0QPgQzoE= -k8s.io/apimachinery v0.0.0-20211222011548-de7147de41c9 h1:uX5KolgrT2PZUWmhEp3JnMSrCQgo52BC3nFlaAXs2Rg= -k8s.io/apimachinery v0.0.0-20211222011548-de7147de41c9/go.mod h1:vcZg0n5bcYADuuKUza0y2en2OCM/UIxFaAI7N0cN6Ik= +k8s.io/api v0.0.0-20220104023900-7289fed567b9 h1:HghyPmUKTDSohvaoMdU8NmSTLV3GMrwWfUjJX33U7aE= +k8s.io/api v0.0.0-20220104023900-7289fed567b9/go.mod h1:nKerto6bPj5aBqqPdGEHYEtwdsvWd6LAIUE0QPgQzoE= +k8s.io/apimachinery v0.0.0-20220104211627-ea11419e6b79 h1:vLDmYX/AUxrvjZE7baCJ4xdUMMM2R4hFAOiOTBtNjrk= +k8s.io/apimachinery v0.0.0-20220104211627-ea11419e6b79/go.mod h1:vcZg0n5bcYADuuKUza0y2en2OCM/UIxFaAI7N0cN6Ik= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 3480737c9ed8dddd483f733473f04310d7a7a395 Mon Sep 17 00:00:00 2001 From: wq Date: Sat, 8 Jan 2022 23:39:23 +0900 Subject: [PATCH 028/111] fix typos in comment Kubernetes-commit: 3e2932179084fa322ba1bc53997d44e1d383db00 --- tools/cache/controller.go | 4 ++-- tools/cache/reflector.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/cache/controller.go b/tools/cache/controller.go index c85c29db3..bb4e1ad24 100644 --- a/tools/cache/controller.go +++ b/tools/cache/controller.go @@ -370,8 +370,8 @@ type TransformFunc func(interface{}) (interface{}, error) // the returned Store for Get/List operations; Add/Modify/Deletes will cause // the event notifications to be faulty. // The given transform function will be called on all objects before they will -// put put into the Store and corresponding Add/Modify/Delete handlers will -// be invokved for them. +// put into the Store and corresponding Add/Modify/Delete handlers will +// be invoked for them. func NewTransformingInformer( lw ListerWatcher, objType runtime.Object, diff --git a/tools/cache/reflector.go b/tools/cache/reflector.go index 0708a6e8b..a17462857 100644 --- a/tools/cache/reflector.go +++ b/tools/cache/reflector.go @@ -401,7 +401,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { timeoutSeconds := int64(minWatchTimeout.Seconds() * (rand.Float64() + 1.0)) options = metav1.ListOptions{ ResourceVersion: resourceVersion, - // We want to avoid situations of hanging watchers. Stop any wachers that do not + // We want to avoid situations of hanging watchers. Stop any watchers that do not // receive any events within the timeout window. TimeoutSeconds: &timeoutSeconds, // To reduce load on kube-apiserver on watch restarts, you may enable watch bookmarks. From b025abaeaaa9eb262a07d1ab4faefb1542330b2c Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Mon, 10 Jan 2022 00:07:11 -0800 Subject: [PATCH 029/111] Merge pull request #107420 from 21kyu/fix-typos fix typos in comment Kubernetes-commit: ba82add41a06d1fceeaf01fc71d3d5da910c41d9 --- go.mod | 8 ++++---- go.sum | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 9c3ca87db..3221b25ee 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220104023900-7289fed567b9 - k8s.io/apimachinery v0.0.0-20220104211627-ea11419e6b79 + k8s.io/api v0.0.0-20220107211824-37748cca5822 + k8s.io/apimachinery v0.0.0-20220106211624-e9b426bb59b7 k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 @@ -40,6 +40,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220104023900-7289fed567b9 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220104211627-ea11419e6b79 + k8s.io/api => k8s.io/api v0.0.0-20220107211824-37748cca5822 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220106211624-e9b426bb59b7 ) diff --git a/go.sum b/go.sum index 5c39a417f..df18b0be6 100644 --- a/go.sum +++ b/go.sum @@ -610,10 +610,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220104023900-7289fed567b9 h1:HghyPmUKTDSohvaoMdU8NmSTLV3GMrwWfUjJX33U7aE= -k8s.io/api v0.0.0-20220104023900-7289fed567b9/go.mod h1:nKerto6bPj5aBqqPdGEHYEtwdsvWd6LAIUE0QPgQzoE= -k8s.io/apimachinery v0.0.0-20220104211627-ea11419e6b79 h1:vLDmYX/AUxrvjZE7baCJ4xdUMMM2R4hFAOiOTBtNjrk= -k8s.io/apimachinery v0.0.0-20220104211627-ea11419e6b79/go.mod h1:vcZg0n5bcYADuuKUza0y2en2OCM/UIxFaAI7N0cN6Ik= +k8s.io/api v0.0.0-20220107211824-37748cca5822 h1:d1KQR08t9t+gqf4tpUPjY8fnKCk1ZMSljZZxP2XfWXc= +k8s.io/api v0.0.0-20220107211824-37748cca5822/go.mod h1:+wrzIHIZSa2Xtc2kuTFMJ6SjVuB2/f8qmhcmVEkhHM8= +k8s.io/apimachinery v0.0.0-20220106211624-e9b426bb59b7 h1:IHAn08cVL/qPDtyS6VLVORr8iKiJl9UJgTFpPxM+gNs= +k8s.io/apimachinery v0.0.0-20220106211624-e9b426bb59b7/go.mod h1:vcZg0n5bcYADuuKUza0y2en2OCM/UIxFaAI7N0cN6Ik= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 3bf0eac2745860a5728c3d4e23e914af404ef6ea Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 3 Jan 2022 10:59:47 -0500 Subject: [PATCH 030/111] OWNERS cleanup - Jan 2021 Week 1 Signed-off-by: Davanum Srinivas Kubernetes-commit: 9682b7248fb69733c2a0ee53618856e87b067f16 --- rest/OWNERS | 3 --- tools/cache/OWNERS | 5 ----- tools/events/OWNERS | 4 ++-- tools/leaderelection/OWNERS | 5 ++--- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/rest/OWNERS b/rest/OWNERS index 92d0694f1..7b23294c4 100644 --- a/rest/OWNERS +++ b/rest/OWNERS @@ -6,12 +6,9 @@ reviewers: - caesarxuchao - wojtek-t - deads2k - - brendandburns - liggitt - sttts - luxas - dims - - errordeveloper - - resouer - cjcullen - lojies diff --git a/tools/cache/OWNERS b/tools/cache/OWNERS index 7f5fcf712..726205b3d 100644 --- a/tools/cache/OWNERS +++ b/tools/cache/OWNERS @@ -15,19 +15,14 @@ reviewers: - smarterclayton - wojtek-t - deads2k - - brendandburns - derekwaynecarr - caesarxuchao - mikedanese - liggitt - - pmorie - janetkuo - justinsb - soltysh - jsafrane - dims - ingvagabund - - resouer - - mfojtik - - sdminonne - ncdc diff --git a/tools/events/OWNERS b/tools/events/OWNERS index 9762040b6..8c1137f41 100644 --- a/tools/events/OWNERS +++ b/tools/events/OWNERS @@ -2,9 +2,9 @@ approvers: - sig-instrumentation-approvers - - yastij - wojtek-t reviewers: - sig-instrumentation-reviewers - - yastij - wojtek-t +emeritus_approvers: + - yastij diff --git a/tools/leaderelection/OWNERS b/tools/leaderelection/OWNERS index 1517f9d99..908bdacdf 100644 --- a/tools/leaderelection/OWNERS +++ b/tools/leaderelection/OWNERS @@ -2,11 +2,10 @@ approvers: - mikedanese - - timothysc reviewers: - wojtek-t - deads2k - mikedanese - - timothysc - ingvagabund - - resouer +emeritus_approvers: + - timothysc From a806c6e4fd021193e648e3c687eb4f33f64b8cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Thu, 13 Jan 2022 11:33:26 +0100 Subject: [PATCH 031/111] Remove selflink references in different testing-related files Kubernetes-commit: 551790729f1d26d75c1d3fa1411e341eb367f9f3 --- testing/fixture_test.go | 1 - tools/events/eventseries_test.go | 2 -- tools/record/event_test.go | 9 ++------- tools/reference/ref_test.go | 4 ++-- util/jsonpath/jsonpath_test.go | 3 +-- 5 files changed, 5 insertions(+), 14 deletions(-) diff --git a/testing/fixture_test.go b/testing/fixture_test.go index 5aab05aa6..fb947f818 100644 --- a/testing/fixture_test.go +++ b/testing/fixture_test.go @@ -46,7 +46,6 @@ func getArbitraryResource(s schema.GroupVersionResource, name, namespace string) "generateName": "test_generateName", "uid": "test_uid", "resourceVersion": "test_resourceVersion", - "selfLink": "test_selfLink", }, "data": strconv.Itoa(rand.Int()), }, diff --git a/tools/events/eventseries_test.go b/tools/events/eventseries_test.go index 3fe01a294..17097aae5 100644 --- a/tools/events/eventseries_test.go +++ b/tools/events/eventseries_test.go @@ -216,7 +216,6 @@ func TestFinishSeries(t *testing.T) { hostname, _ := os.Hostname() testPod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/baz/pods/foo", Name: "foo", Namespace: "baz", UID: "bar", @@ -288,7 +287,6 @@ func TestRefreshExistingEventSeries(t *testing.T) { hostname, _ := os.Hostname() testPod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/baz/pods/foo", Name: "foo", Namespace: "baz", UID: "bar", diff --git a/tools/record/event_test.go b/tools/record/event_test.go index f003b1d37..54435bca6 100644 --- a/tools/record/event_test.go +++ b/tools/record/event_test.go @@ -129,7 +129,6 @@ func TestNonRacyShutdown(t *testing.T) { func TestEventf(t *testing.T) { testPod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/baz/pods/foo", Name: "foo", Namespace: "baz", UID: "bar", @@ -137,7 +136,6 @@ func TestEventf(t *testing.T) { } testPod2 := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/baz/pods/foo", Name: "foo", Namespace: "baz", UID: "differentUid", @@ -554,9 +552,8 @@ func TestLotsOfEvents(t *testing.T) { func TestEventfNoNamespace(t *testing.T) { testPod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/default/pods/foo", - Name: "foo", - UID: "bar", + Name: "foo", + UID: "bar", }, } testRef, err := ref.GetPartialReference(scheme.Scheme, testPod, "spec.containers[2]") @@ -651,7 +648,6 @@ func TestEventfNoNamespace(t *testing.T) { func TestMultiSinkCache(t *testing.T) { testPod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/baz/pods/foo", Name: "foo", Namespace: "baz", UID: "bar", @@ -659,7 +655,6 @@ func TestMultiSinkCache(t *testing.T) { } testPod2 := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/baz/pods/foo", Name: "foo", Namespace: "baz", UID: "differentUid", diff --git a/tools/reference/ref_test.go b/tools/reference/ref_test.go index 7a478374e..c7042c621 100644 --- a/tools/reference/ref_test.go +++ b/tools/reference/ref_test.go @@ -43,7 +43,7 @@ func TestGetReferenceRefVersion(t *testing.T) { { name: "v1 GV from scheme", input: &TestRuntimeObj{ - ObjectMeta: metav1.ObjectMeta{SelfLink: "/bad-selflink/unused"}, + ObjectMeta: metav1.ObjectMeta{}, }, groupVersion: schema.GroupVersion{Group: "", Version: "v1"}, expectedRefVersion: "v1", @@ -51,7 +51,7 @@ func TestGetReferenceRefVersion(t *testing.T) { { name: "foo.group/v3 GV from scheme", input: &TestRuntimeObj{ - ObjectMeta: metav1.ObjectMeta{SelfLink: "/bad-selflink/unused"}, + ObjectMeta: metav1.ObjectMeta{}, }, groupVersion: schema.GroupVersion{Group: "foo.group", Version: "v3"}, expectedRefVersion: "foo.group/v3", diff --git a/util/jsonpath/jsonpath_test.go b/util/jsonpath/jsonpath_test.go index 197e73e84..6473d2590 100644 --- a/util/jsonpath/jsonpath_test.go +++ b/util/jsonpath/jsonpath_test.go @@ -793,8 +793,7 @@ func TestRunningPodsJSONPathOutput(t *testing.T) { } }, { - "resourceVersion": "", - "selfLink": "" + "resourceVersion": "" } ] }`) From 23e2d9e87eca9c2db83adee18e0661adcbf0e2cd Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Thu, 13 Jan 2022 10:30:30 -0800 Subject: [PATCH 032/111] Merge pull request #107293 from dims/jan-1-owners-cleanup Cleanup OWNERS files - Jan 2021 Week 1 Kubernetes-commit: 3bd422dc76559c1e03e8aea894c6143d32ebd644 --- go.mod | 8 ++++---- go.sum | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 3221b25ee..658911014 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220107211824-37748cca5822 - k8s.io/apimachinery v0.0.0-20220106211624-e9b426bb59b7 + k8s.io/api v0.0.0-20220113211846-a75b0b5d422b + k8s.io/apimachinery v0.0.0-20220113183030-80d954b85ad3 k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 @@ -40,6 +40,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220107211824-37748cca5822 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220106211624-e9b426bb59b7 + k8s.io/api => k8s.io/api v0.0.0-20220113211846-a75b0b5d422b + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220113183030-80d954b85ad3 ) diff --git a/go.sum b/go.sum index df18b0be6..16ffd8999 100644 --- a/go.sum +++ b/go.sum @@ -610,10 +610,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220107211824-37748cca5822 h1:d1KQR08t9t+gqf4tpUPjY8fnKCk1ZMSljZZxP2XfWXc= -k8s.io/api v0.0.0-20220107211824-37748cca5822/go.mod h1:+wrzIHIZSa2Xtc2kuTFMJ6SjVuB2/f8qmhcmVEkhHM8= -k8s.io/apimachinery v0.0.0-20220106211624-e9b426bb59b7 h1:IHAn08cVL/qPDtyS6VLVORr8iKiJl9UJgTFpPxM+gNs= -k8s.io/apimachinery v0.0.0-20220106211624-e9b426bb59b7/go.mod h1:vcZg0n5bcYADuuKUza0y2en2OCM/UIxFaAI7N0cN6Ik= +k8s.io/api v0.0.0-20220113211846-a75b0b5d422b h1:8fkYzgrIFpR9JQUPkZtPVhyutH6nOxIidTDLS4wiXBk= +k8s.io/api v0.0.0-20220113211846-a75b0b5d422b/go.mod h1:fUvEeJsH9l+ZxaqspWiBMGy+KsoIBu5lrLGsqP0ObNs= +k8s.io/apimachinery v0.0.0-20220113183030-80d954b85ad3 h1:sGOAAwlC7JwTwyesgXqg74tNpB6Qf+dULzBRoyVToCE= +k8s.io/apimachinery v0.0.0-20220113183030-80d954b85ad3/go.mod h1:vcZg0n5bcYADuuKUza0y2en2OCM/UIxFaAI7N0cN6Ik= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From aab0bb899ea1559c22134c75046ecbcd1b7dc5ef Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Fri, 14 Jan 2022 11:41:07 -0500 Subject: [PATCH 033/111] Handle invalid selectors properly Kubernetes-commit: c0af728f43025bb47b209ebbb45604f9c0424354 --- listers/apps/v1/daemonset_expansion.go | 7 ++++--- listers/apps/v1/replicaset_expansion.go | 3 ++- listers/apps/v1/statefulset_expansion.go | 3 ++- listers/apps/v1beta1/statefulset_expansion.go | 3 ++- listers/apps/v1beta2/daemonset_expansion.go | 7 ++++--- listers/apps/v1beta2/replicaset_expansion.go | 3 ++- listers/apps/v1beta2/statefulset_expansion.go | 3 ++- listers/batch/v1/job_expansion.go | 6 +++++- listers/extensions/v1beta1/daemonset_expansion.go | 7 ++++--- listers/extensions/v1beta1/replicaset_expansion.go | 3 ++- listers/policy/v1/poddisruptionbudget_expansion.go | 3 +-- listers/policy/v1beta1/poddisruptionbudget_expansion.go | 4 +--- 12 files changed, 31 insertions(+), 21 deletions(-) diff --git a/listers/apps/v1/daemonset_expansion.go b/listers/apps/v1/daemonset_expansion.go index 83435561a..667d6fb88 100644 --- a/listers/apps/v1/daemonset_expansion.go +++ b/listers/apps/v1/daemonset_expansion.go @@ -60,8 +60,8 @@ func (s *daemonSetLister) GetPodDaemonSets(pod *v1.Pod) ([]*apps.DaemonSet, erro } selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector) if err != nil { - // this should not happen if the DaemonSet passed validation - return nil, err + // This object has an invalid selector, it does not match the pod + continue } // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. @@ -96,7 +96,8 @@ func (s *daemonSetLister) GetHistoryDaemonSets(history *apps.ControllerRevision) for _, ds := range list { selector, err := metav1.LabelSelectorAsSelector(ds.Spec.Selector) if err != nil { - return nil, fmt.Errorf("invalid label selector: %v", err) + // This object has an invalid selector, it does not match the history + continue } // If a DaemonSet with a nil or empty selector creeps in, it should match nothing, not everything. if selector.Empty() || !selector.Matches(labels.Set(history.Labels)) { diff --git a/listers/apps/v1/replicaset_expansion.go b/listers/apps/v1/replicaset_expansion.go index 675e615ae..8e093de0a 100644 --- a/listers/apps/v1/replicaset_expansion.go +++ b/listers/apps/v1/replicaset_expansion.go @@ -55,7 +55,8 @@ func (s *replicaSetLister) GetPodReplicaSets(pod *v1.Pod) ([]*apps.ReplicaSet, e } selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector) if err != nil { - return nil, fmt.Errorf("invalid selector: %v", err) + // This object has an invalid selector, it does not match the pod + continue } // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything. diff --git a/listers/apps/v1/statefulset_expansion.go b/listers/apps/v1/statefulset_expansion.go index b4912976b..e79f8a2b4 100644 --- a/listers/apps/v1/statefulset_expansion.go +++ b/listers/apps/v1/statefulset_expansion.go @@ -59,7 +59,8 @@ func (s *statefulSetLister) GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet } selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector) if err != nil { - return nil, fmt.Errorf("invalid selector: %v", err) + // This object has an invalid selector, it does not match the pod + continue } // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything. diff --git a/listers/apps/v1beta1/statefulset_expansion.go b/listers/apps/v1beta1/statefulset_expansion.go index 0741792ac..7d2c4d9b0 100644 --- a/listers/apps/v1beta1/statefulset_expansion.go +++ b/listers/apps/v1beta1/statefulset_expansion.go @@ -59,7 +59,8 @@ func (s *statefulSetLister) GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet } selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector) if err != nil { - return nil, fmt.Errorf("invalid selector: %v", err) + // This object has an invalid selector, it does not match the pod + continue } // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything. diff --git a/listers/apps/v1beta2/daemonset_expansion.go b/listers/apps/v1beta2/daemonset_expansion.go index 3b01aaa48..e722b63b6 100644 --- a/listers/apps/v1beta2/daemonset_expansion.go +++ b/listers/apps/v1beta2/daemonset_expansion.go @@ -60,8 +60,8 @@ func (s *daemonSetLister) GetPodDaemonSets(pod *v1.Pod) ([]*apps.DaemonSet, erro } selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector) if err != nil { - // this should not happen if the DaemonSet passed validation - return nil, err + // This object has an invalid selector, it does not match the pod + continue } // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. @@ -96,7 +96,8 @@ func (s *daemonSetLister) GetHistoryDaemonSets(history *apps.ControllerRevision) for _, ds := range list { selector, err := metav1.LabelSelectorAsSelector(ds.Spec.Selector) if err != nil { - return nil, fmt.Errorf("invalid label selector: %v", err) + // This object has an invalid selector, it does not match the history object + continue } // If a DaemonSet with a nil or empty selector creeps in, it should match nothing, not everything. if selector.Empty() || !selector.Matches(labels.Set(history.Labels)) { diff --git a/listers/apps/v1beta2/replicaset_expansion.go b/listers/apps/v1beta2/replicaset_expansion.go index 7562fe996..bc014b5a6 100644 --- a/listers/apps/v1beta2/replicaset_expansion.go +++ b/listers/apps/v1beta2/replicaset_expansion.go @@ -55,7 +55,8 @@ func (s *replicaSetLister) GetPodReplicaSets(pod *v1.Pod) ([]*apps.ReplicaSet, e } selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector) if err != nil { - return nil, fmt.Errorf("invalid selector: %v", err) + // This object has an invalid selector, it does not match the pod + continue } // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything. diff --git a/listers/apps/v1beta2/statefulset_expansion.go b/listers/apps/v1beta2/statefulset_expansion.go index 6fa6b9144..eae31b82f 100644 --- a/listers/apps/v1beta2/statefulset_expansion.go +++ b/listers/apps/v1beta2/statefulset_expansion.go @@ -59,7 +59,8 @@ func (s *statefulSetLister) GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet } selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector) if err != nil { - return nil, fmt.Errorf("invalid selector: %v", err) + // This object has an invalid selector, it does not match the pod + continue } // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything. diff --git a/listers/batch/v1/job_expansion.go b/listers/batch/v1/job_expansion.go index fdcd5f32e..8dc5db788 100644 --- a/listers/batch/v1/job_expansion.go +++ b/listers/batch/v1/job_expansion.go @@ -51,7 +51,11 @@ func (l *jobLister) GetPodJobs(pod *v1.Pod) (jobs []batch.Job, err error) { return } for _, job := range list { - selector, _ := metav1.LabelSelectorAsSelector(job.Spec.Selector) + selector, err := metav1.LabelSelectorAsSelector(job.Spec.Selector) + if err != nil { + // This object has an invalid selector, it does not match the pod + continue + } if !selector.Matches(labels.Set(pod.Labels)) { continue } diff --git a/listers/extensions/v1beta1/daemonset_expansion.go b/listers/extensions/v1beta1/daemonset_expansion.go index 336a4ed83..f6dd7a963 100644 --- a/listers/extensions/v1beta1/daemonset_expansion.go +++ b/listers/extensions/v1beta1/daemonset_expansion.go @@ -61,8 +61,8 @@ func (s *daemonSetLister) GetPodDaemonSets(pod *v1.Pod) ([]*v1beta1.DaemonSet, e } selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector) if err != nil { - // this should not happen if the DaemonSet passed validation - return nil, err + // This object has an invalid selector, it does not match the pod + continue } // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. @@ -97,7 +97,8 @@ func (s *daemonSetLister) GetHistoryDaemonSets(history *apps.ControllerRevision) for _, ds := range list { selector, err := metav1.LabelSelectorAsSelector(ds.Spec.Selector) if err != nil { - return nil, fmt.Errorf("invalid label selector: %v", err) + // This object has an invalid selector, it does not match the history object + continue } // If a DaemonSet with a nil or empty selector creeps in, it should match nothing, not everything. if selector.Empty() || !selector.Matches(labels.Set(history.Labels)) { diff --git a/listers/extensions/v1beta1/replicaset_expansion.go b/listers/extensions/v1beta1/replicaset_expansion.go index 1f72644cc..74114c2bd 100644 --- a/listers/extensions/v1beta1/replicaset_expansion.go +++ b/listers/extensions/v1beta1/replicaset_expansion.go @@ -55,7 +55,8 @@ func (s *replicaSetLister) GetPodReplicaSets(pod *v1.Pod) ([]*extensions.Replica } selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector) if err != nil { - return nil, fmt.Errorf("invalid selector: %v", err) + // This object has an invalid selector, it does not match the pod + continue } // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything. diff --git a/listers/policy/v1/poddisruptionbudget_expansion.go b/listers/policy/v1/poddisruptionbudget_expansion.go index f63851ad4..115ee3f00 100644 --- a/listers/policy/v1/poddisruptionbudget_expansion.go +++ b/listers/policy/v1/poddisruptionbudget_expansion.go @@ -23,7 +23,6 @@ import ( policy "k8s.io/api/policy/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/klog/v2" ) // PodDisruptionBudgetListerExpansion allows custom methods to be added to @@ -50,7 +49,7 @@ func (s *podDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *v1.Pod) ([]* pdb := list[i] selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector) if err != nil { - klog.Warningf("invalid selector: %v", err) + // This object has an invalid selector, it does not match the pod continue } diff --git a/listers/policy/v1beta1/poddisruptionbudget_expansion.go b/listers/policy/v1beta1/poddisruptionbudget_expansion.go index dce5dca82..994947c4f 100644 --- a/listers/policy/v1beta1/poddisruptionbudget_expansion.go +++ b/listers/policy/v1beta1/poddisruptionbudget_expansion.go @@ -23,7 +23,6 @@ import ( policy "k8s.io/api/policy/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/klog/v2" ) // PodDisruptionBudgetListerExpansion allows custom methods to be added to @@ -50,8 +49,7 @@ func (s *podDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *v1.Pod) ([]* pdb := list[i] selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector) if err != nil { - klog.Warningf("invalid selector: %v", err) - // TODO(mml): add an event to the PDB + // This object has an invalid selector, it does not match the pod continue } From 3c9082ae5bacc1514cedb480494e3c9accae5304 Mon Sep 17 00:00:00 2001 From: Jiahui Feng Date: Fri, 14 Jan 2022 10:30:23 -0800 Subject: [PATCH 034/111] upgrade sigs.k8s.io/structured-merge-diff/v4 to v4.2.1 Kubernetes-commit: 821912a75198f0d516fc2744bed335afac8034e9 --- go.mod | 11 ++++++----- go.sum | 4 ---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index a262783d6..04d78daee 100644 --- a/go.mod +++ b/go.mod @@ -30,16 +30,17 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220113211846-688ca8d0fa27 - k8s.io/apimachinery v0.0.0-20220113183030-80d954b85ad3 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 - sigs.k8s.io/structured-merge-diff/v4 v4.1.2 + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 sigs.k8s.io/yaml v1.2.0 ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220113211846-688ca8d0fa27 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220113183030-80d954b85ad3 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index a966c5cf3..578953611 100644 --- a/go.sum +++ b/go.sum @@ -610,10 +610,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220113211846-688ca8d0fa27 h1:f8r5a/34RUVPT61kPSZ9NTGCL9kbob8EWtHfJnteL7o= -k8s.io/api v0.0.0-20220113211846-688ca8d0fa27/go.mod h1:fUvEeJsH9l+ZxaqspWiBMGy+KsoIBu5lrLGsqP0ObNs= -k8s.io/apimachinery v0.0.0-20220113183030-80d954b85ad3 h1:sGOAAwlC7JwTwyesgXqg74tNpB6Qf+dULzBRoyVToCE= -k8s.io/apimachinery v0.0.0-20220113183030-80d954b85ad3/go.mod h1:vcZg0n5bcYADuuKUza0y2en2OCM/UIxFaAI7N0cN6Ik= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 61ce20e08d2dbca383a7e6b186172cf1d51643e2 Mon Sep 17 00:00:00 2001 From: Jiahui Feng Date: Fri, 14 Jan 2022 10:31:44 -0800 Subject: [PATCH 035/111] generated: ./hack/update-vendor.sh Kubernetes-commit: 31205dc7d9b271ede68ef90d09f416588ea3afdd --- go.sum | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.sum b/go.sum index 578953611..395fc8b12 100644 --- a/go.sum +++ b/go.sum @@ -626,7 +626,7 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= From 092b54e6e535dfed6d39173e4596b48e47f65262 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Fri, 14 Jan 2022 12:32:26 -0800 Subject: [PATCH 036/111] Merge pull request #107565 from jiahuif-forks/deps/structured-merged-diff upgrade sigs.k8s.io/structured-merge-diff/v4 to v4.2.1 Kubernetes-commit: cf18d80d035780739575b8cc889e8f26bf36779f --- go.mod | 9 ++++----- go.sum | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 04d78daee..d24ac58fe 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0 - k8s.io/apimachinery v0.0.0 + k8s.io/api v0.0.0-20220114212057-37c9308dad1e + k8s.io/apimachinery v0.0.0-20220114211744-3c16f3dcfb0b k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 @@ -40,7 +40,6 @@ require ( ) replace ( - k8s.io/api => ../api - k8s.io/apimachinery => ../apimachinery - k8s.io/client-go => ../client-go + k8s.io/api => k8s.io/api v0.0.0-20220114212057-37c9308dad1e + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220114211744-3c16f3dcfb0b ) diff --git a/go.sum b/go.sum index 395fc8b12..80130387e 100644 --- a/go.sum +++ b/go.sum @@ -610,6 +610,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.0.0-20220114212057-37c9308dad1e h1:yq1koxef1IPugvWJ0datOgWkA3bq6EQ/laIdBCRNV2M= +k8s.io/api v0.0.0-20220114212057-37c9308dad1e/go.mod h1:ydI/EZB8sQSGGgqIugVCax6qT4v8+NZ6Hbduo30cjbo= +k8s.io/apimachinery v0.0.0-20220114211744-3c16f3dcfb0b h1:7lh+0FnYetRD5shepu42q+Su/LHlUy2VgoeoQN1sd3Y= +k8s.io/apimachinery v0.0.0-20220114211744-3c16f3dcfb0b/go.mod h1:v8xabFQhCZrrX2Lm1DcO0GldEoXSxCi8KODudZ/jv5s= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 664b1a6c8ce9c92ce65bef3f9833b402449c98d2 Mon Sep 17 00:00:00 2001 From: Ismayil Mirzali Date: Tue, 18 Jan 2022 12:03:08 +0200 Subject: [PATCH 037/111] client-go: refactor: Fix styling issues (#107248) * client-go: Remove unreachable return Due to the way the switch statement is done, the return at the end of the function will neverbe reached. Signed-off-by: Ismayil Mirzali * client-go: Refactor for clarity Fixed one instance where the error message should be lowercase. Made the fields in the struct literal more explicit Signed-off-by: Ismayil Mirzali Kubernetes-commit: 75c0987de3cb9a0380873745f68dea2f0835a7a2 --- tools/cache/reflector.go | 6 +++--- tools/cache/reflector_test.go | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/cache/reflector.go b/tools/cache/reflector.go index a17462857..84f242116 100644 --- a/tools/cache/reflector.go +++ b/tools/cache/reflector.go @@ -231,7 +231,7 @@ var ( // Used to indicate that watching stopped because of a signal from the stop // channel passed in from a client of the reflector. - errorStopRequested = errors.New("Stop requested") + errorStopRequested = errors.New("stop requested") ) // resyncChan returns a channel which will receive something when a resync is @@ -258,7 +258,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { options := metav1.ListOptions{ResourceVersion: r.relistResourceVersion()} if err := func() error { - initTrace := trace.New("Reflector ListAndWatch", trace.Field{"name", r.name}) + initTrace := trace.New("Reflector ListAndWatch", trace.Field{Key: "name", Value: r.name}) defer initTrace.LogIfLong(10 * time.Second) var list runtime.Object var paginatedResult bool @@ -319,7 +319,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { panic(r) case <-listCh: } - initTrace.Step("Objects listed", trace.Field{"error", err}) + initTrace.Step("Objects listed", trace.Field{Key: "error", Value: err}) if err != nil { klog.Warningf("%s: failed to list %v: %v", r.name, r.expectedTypeName, err) return fmt.Errorf("failed to list %v: %v", r.expectedTypeName, err) diff --git a/tools/cache/reflector_test.go b/tools/cache/reflector_test.go index 49f76bf06..9f35b682c 100644 --- a/tools/cache/reflector_test.go +++ b/tools/cache/reflector_test.go @@ -813,7 +813,6 @@ func TestReflectorFullListIfExpired(t *testing.T) { t.Error(err) return nil, err } - return nil, nil }, } r := NewReflector(lw, &v1.Pod{}, s, 0) From ae5b2b8fbfd2f8d2756ef71e198fb83688096a55 Mon Sep 17 00:00:00 2001 From: -e Date: Wed, 19 Jan 2022 22:30:33 +0800 Subject: [PATCH 038/111] upgrade prometheus/client_golang to v1.12.0(common to v0.32.1) Kubernetes-commit: 8a4e66049edd6ade4e9107b4ea092580b626545a --- go.mod | 9 +++++---- go.sum | 8 ++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index ce414dd1a..04d78daee 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220118151121-94676c7a1e94 - k8s.io/apimachinery v0.0.0-20220118200222-162a22fc9219 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 @@ -40,6 +40,7 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220118151121-94676c7a1e94 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220118200222-162a22fc9219 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index 9e2f38bef..97154e468 100644 --- a/go.sum +++ b/go.sum @@ -405,8 +405,8 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -610,10 +610,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220118151121-94676c7a1e94 h1:K7V5wkq10suJgLBaL+f2EueXASB7EHppMWM8YbbE3ac= -k8s.io/api v0.0.0-20220118151121-94676c7a1e94/go.mod h1:ydI/EZB8sQSGGgqIugVCax6qT4v8+NZ6Hbduo30cjbo= -k8s.io/apimachinery v0.0.0-20220118200222-162a22fc9219 h1:loxHul3sbedOz2qdU+RyfXKJ9ykk3hjHYPbbKwYBg8I= -k8s.io/apimachinery v0.0.0-20220118200222-162a22fc9219/go.mod h1:v8xabFQhCZrrX2Lm1DcO0GldEoXSxCi8KODudZ/jv5s= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From f157a09b378d4cd0f11c845a24b9e4685c70605c Mon Sep 17 00:00:00 2001 From: Romain Aviolat Date: Mon, 17 Jan 2022 15:28:44 +0100 Subject: [PATCH 039/111] feat: add missing SOCKS5 features Goal of this commit is to add some missing features when the Kubernetes API is accessed through a SOCKS5 proxy. That's for example the case when port-forwarding is used (`kubectl port-forward`) or when exec'ing inside a container (`kubectl exec`), with this commit it'll now be possible to use both. Signed-off-by: Romain Aviolat Signed-off-by: Romain Jufer Kubernetes-commit: 0a98875e9572d998fbdf3bcdaef4961715b8bc06 --- go.mod | 9 +++++---- go.sum | 6 ++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index a04cf7c19..04d78daee 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220121011925-35d41aaac2bf - k8s.io/apimachinery v0.0.0-20220121011720-73cb56485259 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 @@ -40,6 +40,7 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220121011925-35d41aaac2bf - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220121011720-73cb56485259 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index b0a04c99d..6b0cda115 100644 --- a/go.sum +++ b/go.sum @@ -56,6 +56,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -610,10 +612,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220121011925-35d41aaac2bf h1:YfvP4cnW6dKo6VJI9j770wf9HFNstlL1lTZSv8Po3P0= -k8s.io/api v0.0.0-20220121011925-35d41aaac2bf/go.mod h1:6NbRkVCqMWJ9t2zDss/u/CQNhbj5JfBsIGC6hW1VsgM= -k8s.io/apimachinery v0.0.0-20220121011720-73cb56485259 h1:Ju5fq+ZSlfEETrJWX8Wa0QMAqvUmkQ1QFgivCxdowmo= -k8s.io/apimachinery v0.0.0-20220121011720-73cb56485259/go.mod h1:y1fv8sTaVIr58F1alwS9QI0fqvgejZBb/1QmzsmqptU= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 54928eef9f824667b23a938188498992d437156a Mon Sep 17 00:00:00 2001 From: Alexander Zielenski Date: Wed, 19 Jan 2022 11:40:42 -0800 Subject: [PATCH 040/111] modify SharedIndexInformer to use newInformer constructor which supports transformers avoids code duplication, allows transformer to be used with SharedIndexInformer Kubernetes-commit: 754bf3b3d02c66d1dd030460b03dddd3d6c7196d --- tools/cache/controller.go | 78 ++++++++++++--------- tools/cache/shared_informer.go | 103 ++++++++++++++++++---------- tools/cache/shared_informer_test.go | 35 +++++++++- 3 files changed, 148 insertions(+), 68 deletions(-) diff --git a/tools/cache/controller.go b/tools/cache/controller.go index bb4e1ad24..ff4c22de0 100644 --- a/tools/cache/controller.go +++ b/tools/cache/controller.go @@ -17,6 +17,7 @@ limitations under the License. package cache import ( + "errors" "sync" "time" @@ -406,6 +407,49 @@ func NewTransformingIndexerInformer( return clientState, newInformer(lw, objType, resyncPeriod, h, clientState, transformer) } +// Multiplexes updates in the form of a list of Deltas into a Store, and informs +// a given handler of events OnUpdate, OnAdd, OnDelete +func processDeltas( + // Object which receives event notifications from the given deltas + handler ResourceEventHandler, + clientState Store, + transformer TransformFunc, + deltas Deltas, +) error { + // from oldest to newest + for _, d := range deltas { + obj := d.Object + if transformer != nil { + var err error + obj, err = transformer(obj) + if err != nil { + return err + } + } + + switch d.Type { + case Sync, Replaced, Added, Updated: + if old, exists, err := clientState.Get(obj); err == nil && exists { + if err := clientState.Update(obj); err != nil { + return err + } + handler.OnUpdate(old, obj) + } else { + if err := clientState.Add(obj); err != nil { + return err + } + handler.OnAdd(obj) + } + case Deleted: + if err := clientState.Delete(obj); err != nil { + return err + } + handler.OnDelete(obj) + } + } + return nil +} + // newInformer returns a controller for populating the store while also // providing event notifications. // @@ -444,38 +488,10 @@ func newInformer( RetryOnError: false, Process: func(obj interface{}) error { - // from oldest to newest - for _, d := range obj.(Deltas) { - obj := d.Object - if transformer != nil { - var err error - obj, err = transformer(obj) - if err != nil { - return err - } - } - - switch d.Type { - case Sync, Replaced, Added, Updated: - if old, exists, err := clientState.Get(obj); err == nil && exists { - if err := clientState.Update(obj); err != nil { - return err - } - h.OnUpdate(old, obj) - } else { - if err := clientState.Add(obj); err != nil { - return err - } - h.OnAdd(obj) - } - case Deleted: - if err := clientState.Delete(obj); err != nil { - return err - } - h.OnDelete(obj) - } + if deltas, ok := obj.(Deltas); ok { + return processDeltas(h, clientState, transformer, deltas) } - return nil + return errors.New("object given as Process argument is not Deltas") }, } return New(cfg) diff --git a/tools/cache/shared_informer.go b/tools/cache/shared_informer.go index 2ff493ecb..9f42782d1 100644 --- a/tools/cache/shared_informer.go +++ b/tools/cache/shared_informer.go @@ -17,6 +17,7 @@ limitations under the License. package cache import ( + "errors" "fmt" "sync" "time" @@ -180,6 +181,20 @@ type SharedInformer interface { // The handler should return quickly - any expensive processing should be // offloaded. SetWatchErrorHandler(handler WatchErrorHandler) error + + // The TransformFunc is called for each object which is about to be stored. + // + // This function is intended for you to take the opportunity to + // remove, transform, or normalize fields. One use case is to strip unused + // metadata fields out of objects to save on RAM cost. + // + // Must be set before starting the informer. + // + // Note: Since the object given to the handler may be already shared with + // other goroutines, it is advisable to copy the object being + // transform before mutating it at all and returning the copy to prevent + // data races. + SetTransform(handler TransformFunc) error } // SharedIndexInformer provides add and get Indexers ability based on SharedInformer. @@ -318,6 +333,8 @@ type sharedIndexInformer struct { // Called whenever the ListAndWatch drops the connection with an error. watchErrorHandler WatchErrorHandler + + transform TransformFunc } // dummyController hides the fact that a SharedInformer is different from a dedicated one @@ -365,6 +382,18 @@ func (s *sharedIndexInformer) SetWatchErrorHandler(handler WatchErrorHandler) er return nil } +func (s *sharedIndexInformer) SetTransform(handler TransformFunc) error { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if s.started { + return fmt.Errorf("informer has already started") + } + + s.transform = handler + return nil +} + func (s *sharedIndexInformer) Run(stopCh <-chan struct{}) { defer utilruntime.HandleCrash() @@ -538,45 +567,47 @@ func (s *sharedIndexInformer) HandleDeltas(obj interface{}) error { s.blockDeltas.Lock() defer s.blockDeltas.Unlock() - // from oldest to newest - for _, d := range obj.(Deltas) { - switch d.Type { - case Sync, Replaced, Added, Updated: - s.cacheMutationDetector.AddObject(d.Object) - if old, exists, err := s.indexer.Get(d.Object); err == nil && exists { - if err := s.indexer.Update(d.Object); err != nil { - return err - } + if deltas, ok := obj.(Deltas); ok { + return processDeltas(s, s.indexer, s.transform, deltas) + } + return errors.New("object given as Process argument is not Deltas") +} - isSync := false - switch { - case d.Type == Sync: - // Sync events are only propagated to listeners that requested resync - isSync = true - case d.Type == Replaced: - if accessor, err := meta.Accessor(d.Object); err == nil { - if oldAccessor, err := meta.Accessor(old); err == nil { - // Replaced events that didn't change resourceVersion are treated as resync events - // and only propagated to listeners that requested resync - isSync = accessor.GetResourceVersion() == oldAccessor.GetResourceVersion() - } - } - } - s.processor.distribute(updateNotification{oldObj: old, newObj: d.Object}, isSync) - } else { - if err := s.indexer.Add(d.Object); err != nil { - return err - } - s.processor.distribute(addNotification{newObj: d.Object}, false) - } - case Deleted: - if err := s.indexer.Delete(d.Object); err != nil { - return err - } - s.processor.distribute(deleteNotification{oldObj: d.Object}, false) +// Conforms to ResourceEventHandler +func (s *sharedIndexInformer) OnAdd(obj interface{}) { + // Invocation of this function is locked under s.blockDeltas, so it is + // save to distribute the notification + s.cacheMutationDetector.AddObject(obj) + s.processor.distribute(addNotification{newObj: obj}, false) +} + +// Conforms to ResourceEventHandler +func (s *sharedIndexInformer) OnUpdate(old, new interface{}) { + isSync := false + + // If is a Sync event, isSync should be true + // If is a Replaced event, isSync is true if resource version is unchanged. + // If RV is unchanged: this is a Sync/Replaced event, so isSync is true + + if accessor, err := meta.Accessor(new); err == nil { + if oldAccessor, err := meta.Accessor(old); err == nil { + // Events that didn't change resourceVersion are treated as resync events + // and only propagated to listeners that requested resync + isSync = accessor.GetResourceVersion() == oldAccessor.GetResourceVersion() } } - return nil + + // Invocation of this function is locked under s.blockDeltas, so it is + // save to distribute the notification + s.cacheMutationDetector.AddObject(new) + s.processor.distribute(updateNotification{oldObj: old, newObj: new}, isSync) +} + +// Conforms to ResourceEventHandler +func (s *sharedIndexInformer) OnDelete(old interface{}) { + // Invocation of this function is locked under s.blockDeltas, so it is + // save to distribute the notification + s.processor.distribute(deleteNotification{oldObj: old}, false) } // sharedProcessor has a collection of processorListener and can diff --git a/tools/cache/shared_informer_test.go b/tools/cache/shared_informer_test.go index ce129bd30..3f2ac71bf 100644 --- a/tools/cache/shared_informer_test.go +++ b/tools/cache/shared_informer_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" @@ -357,3 +357,36 @@ func TestSharedInformerErrorHandling(t *testing.T) { } close(stop) } + +func TestSharedInformerTransformer(t *testing.T) { + // source simulates an apiserver object endpoint. + source := fcache.NewFakeControllerSource() + + source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod1", UID: "pod1", ResourceVersion: "1"}}) + source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod2", UID: "pod2", ResourceVersion: "2"}}) + + informer := NewSharedInformer(source, &v1.Pod{}, 1*time.Second).(*sharedIndexInformer) + informer.SetTransform(func(obj interface{}) (interface{}, error) { + if pod, ok := obj.(*v1.Pod); ok { + name := pod.GetName() + + if upper := strings.ToUpper(name); upper != name { + copied := pod.DeepCopyObject().(*v1.Pod) + copied.SetName(upper) + return copied, nil + } + } + return obj, nil + }) + + listenerTransformer := newTestListener("listenerTransformer", 0, "POD1", "POD2") + informer.AddEventHandler(listenerTransformer) + + stop := make(chan struct{}) + go informer.Run(stop) + defer close(stop) + + if !listenerTransformer.ok() { + t.Errorf("%s: expected %v, got %v", listenerTransformer.name, listenerTransformer.expectedItemNames, listenerTransformer.receivedItemNames) + } +} From 3255cdcd9cf0ce5ea718c97f4aea519130649aca Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Fri, 21 Jan 2022 15:01:06 -0800 Subject: [PATCH 041/111] Merge pull request #105632 from xens/fix/kubectl-socks5-proxy2 Add SOCKS5 proxy support for kubectl exec Kubernetes-commit: d10161b45b751df45701e343599476e27d533d58 --- go.mod | 9 ++++----- go.sum | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 04d78daee..838785db9 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0 - k8s.io/apimachinery v0.0.0 + k8s.io/api v0.0.0-20220122011914-e6d62ddcb184 + k8s.io/apimachinery v0.0.0-20220122011717-3d7c63b4de4f k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 @@ -40,7 +40,6 @@ require ( ) replace ( - k8s.io/api => ../api - k8s.io/apimachinery => ../apimachinery - k8s.io/client-go => ../client-go + k8s.io/api => k8s.io/api v0.0.0-20220122011914-e6d62ddcb184 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220122011717-3d7c63b4de4f ) diff --git a/go.sum b/go.sum index 6b0cda115..dee59e823 100644 --- a/go.sum +++ b/go.sum @@ -612,6 +612,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.0.0-20220122011914-e6d62ddcb184 h1:a1wkQXZrIEgcgVgsnIgfLTZKfJaCHnOaAcg++AK2VdU= +k8s.io/api v0.0.0-20220122011914-e6d62ddcb184/go.mod h1:9BHCEbOkylgh9XPJAareQz6PA4lvlzao3FSiw9D9hIg= +k8s.io/apimachinery v0.0.0-20220122011717-3d7c63b4de4f h1:LDS86PISylkCZIAp15eBSScOVdrsPLclxgvezdAJCjo= +k8s.io/apimachinery v0.0.0-20220122011717-3d7c63b4de4f/go.mod h1:x0yrIIAdS2/JR9TKFHtSn8dYQDIw8mTIeAqPvOuEozA= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 93a63158d4aa9116dd9cf027e3793f2f74bbdf11 Mon Sep 17 00:00:00 2001 From: Di Yi Date: Thu, 27 Jan 2022 14:28:26 +0800 Subject: [PATCH 042/111] add fieldPath back to event logs Kubernetes-commit: 94245af8f4a144e0aceb5a4be0d3ae4993e19be7 --- tools/record/event.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/record/event.go b/tools/record/event.go index 4b61d0052..18555acc1 100644 --- a/tools/record/event.go +++ b/tools/record/event.go @@ -291,7 +291,7 @@ func (e *eventBroadcasterImpl) StartLogging(logf func(format string, args ...int func (e *eventBroadcasterImpl) StartStructuredLogging(verbosity klog.Level) watch.Interface { return e.StartEventWatcher( func(e *v1.Event) { - klog.V(verbosity).InfoS("Event occurred", "object", klog.KRef(e.InvolvedObject.Namespace, e.InvolvedObject.Name), "kind", e.InvolvedObject.Kind, "apiVersion", e.InvolvedObject.APIVersion, "type", e.Type, "reason", e.Reason, "message", e.Message) + klog.V(verbosity).InfoS("Event occurred", "object", klog.KRef(e.InvolvedObject.Namespace, e.InvolvedObject.Name), "fieldPath", e.InvolvedObject.fieldPath, "kind", e.InvolvedObject.Kind, "apiVersion", e.InvolvedObject.APIVersion, "type", e.Type, "reason", e.Reason, "message", e.Message) }) } From 5b56e4a504b3017bcfbb8e753b8b09640babe481 Mon Sep 17 00:00:00 2001 From: Di Yi Date: Fri, 28 Jan 2022 15:50:43 +0800 Subject: [PATCH 043/111] resolve casing issue Kubernetes-commit: 9996c154cba000346db940c90e234265d67dd8a9 --- tools/record/event.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/record/event.go b/tools/record/event.go index 18555acc1..b901d2e8a 100644 --- a/tools/record/event.go +++ b/tools/record/event.go @@ -291,7 +291,7 @@ func (e *eventBroadcasterImpl) StartLogging(logf func(format string, args ...int func (e *eventBroadcasterImpl) StartStructuredLogging(verbosity klog.Level) watch.Interface { return e.StartEventWatcher( func(e *v1.Event) { - klog.V(verbosity).InfoS("Event occurred", "object", klog.KRef(e.InvolvedObject.Namespace, e.InvolvedObject.Name), "fieldPath", e.InvolvedObject.fieldPath, "kind", e.InvolvedObject.Kind, "apiVersion", e.InvolvedObject.APIVersion, "type", e.Type, "reason", e.Reason, "message", e.Message) + klog.V(verbosity).InfoS("Event occurred", "object", klog.KRef(e.InvolvedObject.Namespace, e.InvolvedObject.Name), "fieldPath", e.InvolvedObject.FieldPath, "kind", e.InvolvedObject.Kind, "apiVersion", e.InvolvedObject.APIVersion, "type", e.Type, "reason", e.Reason, "message", e.Message) }) } From 1f90b31573706290f9ab217326b4828bb8ca300b Mon Sep 17 00:00:00 2001 From: SataQiu Date: Fri, 28 Jan 2022 17:01:32 +0800 Subject: [PATCH 044/111] code-generator: fix the bug that ApplyConfiguration constructor missing WithKind/WithAPIVersion methods Kubernetes-commit: ce50eed94122b780c8e438c3cb30a76fd2012464 --- applyconfigurations/apps/v1beta2/scale.go | 5 ++++- applyconfigurations/autoscaling/v1/scale.go | 5 ++++- applyconfigurations/extensions/v1beta1/scale.go | 5 ++++- applyconfigurations/meta/v1/deleteoptions.go | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/applyconfigurations/apps/v1beta2/scale.go b/applyconfigurations/apps/v1beta2/scale.go index d4901edf9..9b98fbb85 100644 --- a/applyconfigurations/apps/v1beta2/scale.go +++ b/applyconfigurations/apps/v1beta2/scale.go @@ -37,7 +37,10 @@ type ScaleApplyConfiguration struct { // ScaleApplyConfiguration constructs an declarative configuration of the Scale type for use with // apply. func Scale() *ScaleApplyConfiguration { - return &ScaleApplyConfiguration{} + b := &ScaleApplyConfiguration{} + b.WithKind("Scale") + b.WithAPIVersion("apps/v1beta2") + return b } // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/applyconfigurations/autoscaling/v1/scale.go b/applyconfigurations/autoscaling/v1/scale.go index 2d2cfeb97..27862e9c9 100644 --- a/applyconfigurations/autoscaling/v1/scale.go +++ b/applyconfigurations/autoscaling/v1/scale.go @@ -36,7 +36,10 @@ type ScaleApplyConfiguration struct { // ScaleApplyConfiguration constructs an declarative configuration of the Scale type for use with // apply. func Scale() *ScaleApplyConfiguration { - return &ScaleApplyConfiguration{} + b := &ScaleApplyConfiguration{} + b.WithKind("Scale") + b.WithAPIVersion("autoscaling/v1") + return b } // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/applyconfigurations/extensions/v1beta1/scale.go b/applyconfigurations/extensions/v1beta1/scale.go index 701145825..1f774e63f 100644 --- a/applyconfigurations/extensions/v1beta1/scale.go +++ b/applyconfigurations/extensions/v1beta1/scale.go @@ -37,7 +37,10 @@ type ScaleApplyConfiguration struct { // ScaleApplyConfiguration constructs an declarative configuration of the Scale type for use with // apply. func Scale() *ScaleApplyConfiguration { - return &ScaleApplyConfiguration{} + b := &ScaleApplyConfiguration{} + b.WithKind("Scale") + b.WithAPIVersion("extensions/v1beta1") + return b } // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/applyconfigurations/meta/v1/deleteoptions.go b/applyconfigurations/meta/v1/deleteoptions.go index 289bef43d..7a1d23114 100644 --- a/applyconfigurations/meta/v1/deleteoptions.go +++ b/applyconfigurations/meta/v1/deleteoptions.go @@ -36,7 +36,10 @@ type DeleteOptionsApplyConfiguration struct { // DeleteOptionsApplyConfiguration constructs an declarative configuration of the DeleteOptions type for use with // apply. func DeleteOptions() *DeleteOptionsApplyConfiguration { - return &DeleteOptionsApplyConfiguration{} + b := &DeleteOptionsApplyConfiguration{} + b.WithKind("DeleteOptions") + b.WithAPIVersion("meta.k8s.io/v1") + return b } // WithKind sets the Kind field in the declarative configuration to the given value From f4bf7599b4b1e64cd7ae55f92fd8640beb2de497 Mon Sep 17 00:00:00 2001 From: sabbey37 Date: Tue, 1 Feb 2022 15:31:10 -0500 Subject: [PATCH 045/111] Update azure auth plugin deprecation to warning Kubernetes-commit: c94b4bb2acd11bc0677eb867e6eff5b36bd205b4 --- plugin/pkg/client/auth/azure/azure.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin/pkg/client/auth/azure/azure.go b/plugin/pkg/client/auth/azure/azure.go index ad60243db..5b679b16d 100644 --- a/plugin/pkg/client/auth/azure/azure.go +++ b/plugin/pkg/client/auth/azure/azure.go @@ -88,9 +88,8 @@ var warnOnce sync.Once func newAzureAuthProvider(_ string, cfg map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { // deprecated in v1.22, remove in v1.25 - // this should be updated to use klog.Warningf in v1.24 to more actively warn consumers warnOnce.Do(func() { - klog.V(1).Infof(`WARNING: the azure auth plugin is deprecated in v1.22+, unavailable in v1.25+; use https://github.com/Azure/kubelogin instead. + klog.Warningf(`WARNING: the azure auth plugin is deprecated in v1.22+, unavailable in v1.25+; use https://github.com/Azure/kubelogin instead. To learn more, consult https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins`) }) From af150e16675ee618044a9f2332db70ff147ea7f2 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Tue, 1 Feb 2022 20:30:22 -0800 Subject: [PATCH 046/111] Merge pull request #107904 from sabbey37/update_azure_auth Update azure auth plugin deprecation to warning Kubernetes-commit: a4f559bfe10532bee534fefcaf4e6cc21c1e466c --- go.mod | 8 ++++---- go.sum | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 838785db9..50b6ec959 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220122011914-e6d62ddcb184 - k8s.io/apimachinery v0.0.0-20220122011717-3d7c63b4de4f + k8s.io/api v0.0.0-20220126052120-b2d630a65cb2 + k8s.io/apimachinery v0.0.0-20220129104801-df993592a122 k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 @@ -40,6 +40,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220122011914-e6d62ddcb184 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220122011717-3d7c63b4de4f + k8s.io/api => k8s.io/api v0.0.0-20220126052120-b2d630a65cb2 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220129104801-df993592a122 ) diff --git a/go.sum b/go.sum index dee59e823..94034c4a7 100644 --- a/go.sum +++ b/go.sum @@ -612,10 +612,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220122011914-e6d62ddcb184 h1:a1wkQXZrIEgcgVgsnIgfLTZKfJaCHnOaAcg++AK2VdU= -k8s.io/api v0.0.0-20220122011914-e6d62ddcb184/go.mod h1:9BHCEbOkylgh9XPJAareQz6PA4lvlzao3FSiw9D9hIg= -k8s.io/apimachinery v0.0.0-20220122011717-3d7c63b4de4f h1:LDS86PISylkCZIAp15eBSScOVdrsPLclxgvezdAJCjo= -k8s.io/apimachinery v0.0.0-20220122011717-3d7c63b4de4f/go.mod h1:x0yrIIAdS2/JR9TKFHtSn8dYQDIw8mTIeAqPvOuEozA= +k8s.io/api v0.0.0-20220126052120-b2d630a65cb2 h1:24pR4NHIBxlpFXgBCm8IN5bmu99X4gYfH7lDLUAsK0A= +k8s.io/api v0.0.0-20220126052120-b2d630a65cb2/go.mod h1:dNpXx9aCJUTKbIJ8TuZJwjNPhWcvlxnQMlXNzlbWdfE= +k8s.io/apimachinery v0.0.0-20220129104801-df993592a122 h1:14bzAwJDW8S86wqAvH5sVjI1ilnCWnAKWXomMStJ3Yo= +k8s.io/apimachinery v0.0.0-20220129104801-df993592a122/go.mod h1:x0yrIIAdS2/JR9TKFHtSn8dYQDIw8mTIeAqPvOuEozA= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 470c93d04c173220e2f4aa1acc082162ec8a4b0f Mon Sep 17 00:00:00 2001 From: jlsong01 Date: Mon, 31 Jan 2022 15:23:42 +0800 Subject: [PATCH 047/111] allocate a unique scheme for each test to fix concurrent usage issue Kubernetes-commit: d66b3edd65efba0760eb0a5668aac733f294903b --- metadata/fake/simple.go | 5 +++++ metadata/fake/simple_test.go | 11 ++++------- metadata/metadatainformer/informer_test.go | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/metadata/fake/simple.go b/metadata/fake/simple.go index ca7712374..5b585f3fd 100644 --- a/metadata/fake/simple.go +++ b/metadata/fake/simple.go @@ -41,6 +41,11 @@ type MetadataClient interface { UpdateFake(obj *metav1.PartialObjectMetadata, opts metav1.UpdateOptions, subresources ...string) (*metav1.PartialObjectMetadata, error) } +// NewTestScheme creates a unique Scheme for each test. +func NewTestScheme() *runtime.Scheme { + return runtime.NewScheme() +} + // NewSimpleMetadataClient creates a new client that will use the provided scheme and respond with the // provided objects when requests are made. It will track actions made to the client which can be checked // with GetActions(). diff --git a/metadata/fake/simple_test.go b/metadata/fake/simple_test.go index e6fdde3eb..219be4e7e 100644 --- a/metadata/fake/simple_test.go +++ b/metadata/fake/simple_test.go @@ -39,13 +39,6 @@ const ( testAPIVersion = "testgroup/testversion" ) -var scheme *runtime.Scheme - -func init() { - scheme = runtime.NewScheme() - metav1.AddMetaToScheme(scheme) -} - func newPartialObjectMetadata(apiVersion, kind, namespace, name string) *metav1.PartialObjectMetadata { return &metav1.PartialObjectMetadata{ TypeMeta: metav1.TypeMeta{ @@ -66,6 +59,8 @@ func newPartialObjectMetadataWithAnnotations(annotations map[string]string) *met } func TestList(t *testing.T) { + scheme := NewTestScheme() + metav1.AddMetaToScheme(scheme) client := NewSimpleMetadataClient(scheme, newPartialObjectMetadata("group/version", "TheKind", "ns-foo", "name-foo"), newPartialObjectMetadata("group2/version", "TheKind", "ns-foo", "name2-foo"), @@ -98,6 +93,8 @@ type patchTestCase struct { } func (tc *patchTestCase) runner(t *testing.T) { + scheme := NewTestScheme() + metav1.AddMetaToScheme(scheme) client := NewSimpleMetadataClient(scheme, tc.object) resourceInterface := client.Resource(schema.GroupVersionResource{Group: testGroup, Version: testVersion, Resource: testResource}).Namespace(testNamespace) diff --git a/metadata/metadatainformer/informer_test.go b/metadata/metadatainformer/informer_test.go index e268202e2..2c7b9ab42 100644 --- a/metadata/metadatainformer/informer_test.go +++ b/metadata/metadatainformer/informer_test.go @@ -125,7 +125,7 @@ func TestMetadataSharedInformerFactory(t *testing.T) { timeout := time.Duration(3 * time.Second) ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() - scheme := runtime.NewScheme() + scheme := fake.NewTestScheme() metav1.AddMetaToScheme(scheme) informerReciveObjectCh := make(chan *metav1.PartialObjectMetadata, 1) objs := []runtime.Object{} From 8f44946f6cbe967fbe2e2548e76987680a89428e Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Wed, 2 Feb 2022 09:20:21 -0800 Subject: [PATCH 048/111] Merge pull request #107876 from jlsong01/fix-concurrent-scheme-usage Fix concurrent usage issue of the same scheme Kubernetes-commit: cf9b5ab95a21e5b32b6aff72492a18ede37b785b From 6f7b0ae69e1968e7c6570a3d63f3eeb42d0b62c5 Mon Sep 17 00:00:00 2001 From: Raghav Roy Date: Fri, 11 Feb 2022 13:03:54 +0530 Subject: [PATCH 049/111] Updated k8s.io/utils dependency Signed-off-by: Raghav Roy Kubernetes-commit: e167d44a173991422b748afe1b9ed9a82bf6efa4 --- go.mod | 11 ++++++----- go.sum | 8 ++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 7f9ae2d73..53d6168d4 100644 --- a/go.mod +++ b/go.mod @@ -30,16 +30,17 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220205134657-8a75781aba70 - k8s.io/apimachinery v0.0.0-20220129104801-df993592a122 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 - k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 + k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 sigs.k8s.io/structured-merge-diff/v4 v4.2.1 sigs.k8s.io/yaml v1.2.0 ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220205134657-8a75781aba70 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220129104801-df993592a122 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index 727d0cd0e..0953338fe 100644 --- a/go.sum +++ b/go.sum @@ -612,10 +612,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220205134657-8a75781aba70 h1:jgiY6siw9lOsdz5+NyVqJ+FY9vqaebm9jVUKXG9R1Pg= -k8s.io/api v0.0.0-20220205134657-8a75781aba70/go.mod h1:X9EhUlkE1ihYyDWan4d+RhC/Au1Ha1sbt7DTzvBz8vY= -k8s.io/apimachinery v0.0.0-20220129104801-df993592a122 h1:14bzAwJDW8S86wqAvH5sVjI1ilnCWnAKWXomMStJ3Yo= -k8s.io/apimachinery v0.0.0-20220129104801-df993592a122/go.mod h1:x0yrIIAdS2/JR9TKFHtSn8dYQDIw8mTIeAqPvOuEozA= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= @@ -624,8 +620,8 @@ k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 h1:ZKMMxTvduyf5WUtREOqg5LiXaN1KO/+0oOQPRFrClpo= -k8s.io/utils v0.0.0-20211208161948-7d6a63dca704/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From b74c541cff29ff4ada7946964a139940e2397c03 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Fri, 11 Feb 2022 06:08:18 -0800 Subject: [PATCH 050/111] Merge pull request #108059 from RaghavRoy145/k8s-utils-update Vendor in k8s.io/utils Changes Kubernetes-commit: 8bae9bea45de30cc8eb3a3da604abd01376ffbd8 --- go.mod | 9 ++++----- go.sum | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 53d6168d4..00100bc2b 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0 - k8s.io/apimachinery v0.0.0 + k8s.io/api v0.0.0-20220211180231-29fd43e6ca1e + k8s.io/apimachinery v0.0.0-20220211180034-1a1682da6e3c k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -40,7 +40,6 @@ require ( ) replace ( - k8s.io/api => ../api - k8s.io/apimachinery => ../apimachinery - k8s.io/client-go => ../client-go + k8s.io/api => k8s.io/api v0.0.0-20220211180231-29fd43e6ca1e + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220211180034-1a1682da6e3c ) diff --git a/go.sum b/go.sum index 0953338fe..c9ad23d3b 100644 --- a/go.sum +++ b/go.sum @@ -612,6 +612,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.0.0-20220211180231-29fd43e6ca1e h1:yXpTN5xO/yZqIouUTCMDCacOcNa+0Ycy/1tVJltMGe0= +k8s.io/api v0.0.0-20220211180231-29fd43e6ca1e/go.mod h1:eqKeSWEJHaiCAExYjXn8c59z8QbcBfB1mDZxz2KB0bA= +k8s.io/apimachinery v0.0.0-20220211180034-1a1682da6e3c h1:yqNX4hYvquMkOzQ2ed1SdywKRMSE3ASNHXXTFpfUPH0= +k8s.io/apimachinery v0.0.0-20220211180034-1a1682da6e3c/go.mod h1:NkKr4Y6EHrxZYK5GCJIxxio58KsT/e3jmTsC9u1PYlA= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From dd71ff2e3904965c3b1697b1385735f4fc0f817c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Wed, 19 Jan 2022 17:55:39 +0100 Subject: [PATCH 051/111] Autogenerated Kubernetes-commit: d63b79ec47171a1b83fea162e26f7ba521e3c20e --- .../v1/mutatingwebhookconfiguration.go | 9 --------- .../v1/validatingwebhookconfiguration.go | 9 --------- .../v1beta1/mutatingwebhookconfiguration.go | 9 --------- .../v1beta1/validatingwebhookconfiguration.go | 9 --------- .../apiserverinternal/v1alpha1/storageversion.go | 9 --------- applyconfigurations/apps/v1/controllerrevision.go | 9 --------- applyconfigurations/apps/v1/daemonset.go | 9 --------- applyconfigurations/apps/v1/deployment.go | 9 --------- applyconfigurations/apps/v1/replicaset.go | 9 --------- applyconfigurations/apps/v1/statefulset.go | 9 --------- applyconfigurations/apps/v1beta1/controllerrevision.go | 9 --------- applyconfigurations/apps/v1beta1/deployment.go | 9 --------- applyconfigurations/apps/v1beta1/statefulset.go | 9 --------- applyconfigurations/apps/v1beta2/controllerrevision.go | 9 --------- applyconfigurations/apps/v1beta2/daemonset.go | 9 --------- applyconfigurations/apps/v1beta2/deployment.go | 9 --------- applyconfigurations/apps/v1beta2/replicaset.go | 9 --------- applyconfigurations/apps/v1beta2/scale.go | 9 --------- applyconfigurations/apps/v1beta2/statefulset.go | 9 --------- .../autoscaling/v1/horizontalpodautoscaler.go | 9 --------- applyconfigurations/autoscaling/v1/scale.go | 9 --------- .../autoscaling/v2/horizontalpodautoscaler.go | 9 --------- .../autoscaling/v2beta1/horizontalpodautoscaler.go | 9 --------- .../autoscaling/v2beta2/horizontalpodautoscaler.go | 9 --------- applyconfigurations/batch/v1/cronjob.go | 9 --------- applyconfigurations/batch/v1/job.go | 9 --------- applyconfigurations/batch/v1/jobtemplatespec.go | 9 --------- applyconfigurations/batch/v1beta1/cronjob.go | 9 --------- applyconfigurations/batch/v1beta1/jobtemplatespec.go | 9 --------- .../certificates/v1/certificatesigningrequest.go | 9 --------- .../certificates/v1beta1/certificatesigningrequest.go | 9 --------- applyconfigurations/coordination/v1/lease.go | 9 --------- applyconfigurations/coordination/v1beta1/lease.go | 9 --------- applyconfigurations/core/v1/componentstatus.go | 9 --------- applyconfigurations/core/v1/configmap.go | 9 --------- applyconfigurations/core/v1/endpoints.go | 9 --------- applyconfigurations/core/v1/event.go | 9 --------- applyconfigurations/core/v1/limitrange.go | 9 --------- applyconfigurations/core/v1/namespace.go | 9 --------- applyconfigurations/core/v1/node.go | 9 --------- applyconfigurations/core/v1/persistentvolume.go | 9 --------- applyconfigurations/core/v1/persistentvolumeclaim.go | 9 --------- .../core/v1/persistentvolumeclaimtemplate.go | 9 --------- applyconfigurations/core/v1/pod.go | 9 --------- applyconfigurations/core/v1/podtemplate.go | 9 --------- applyconfigurations/core/v1/podtemplatespec.go | 9 --------- applyconfigurations/core/v1/replicationcontroller.go | 9 --------- applyconfigurations/core/v1/resourcequota.go | 9 --------- applyconfigurations/core/v1/secret.go | 9 --------- applyconfigurations/core/v1/service.go | 9 --------- applyconfigurations/core/v1/serviceaccount.go | 9 --------- applyconfigurations/discovery/v1/endpointslice.go | 9 --------- applyconfigurations/discovery/v1beta1/endpointslice.go | 9 --------- applyconfigurations/events/v1/event.go | 9 --------- applyconfigurations/events/v1beta1/event.go | 9 --------- applyconfigurations/extensions/v1beta1/daemonset.go | 9 --------- applyconfigurations/extensions/v1beta1/deployment.go | 9 --------- applyconfigurations/extensions/v1beta1/ingress.go | 9 --------- applyconfigurations/extensions/v1beta1/networkpolicy.go | 9 --------- .../extensions/v1beta1/podsecuritypolicy.go | 9 --------- applyconfigurations/extensions/v1beta1/replicaset.go | 9 --------- applyconfigurations/extensions/v1beta1/scale.go | 9 --------- applyconfigurations/flowcontrol/v1alpha1/flowschema.go | 9 --------- .../flowcontrol/v1alpha1/prioritylevelconfiguration.go | 9 --------- applyconfigurations/flowcontrol/v1beta1/flowschema.go | 9 --------- .../flowcontrol/v1beta1/prioritylevelconfiguration.go | 9 --------- applyconfigurations/flowcontrol/v1beta2/flowschema.go | 9 --------- .../flowcontrol/v1beta2/prioritylevelconfiguration.go | 9 --------- applyconfigurations/imagepolicy/v1alpha1/imagereview.go | 9 --------- applyconfigurations/meta/v1/objectmeta.go | 9 --------- applyconfigurations/networking/v1/ingress.go | 9 --------- applyconfigurations/networking/v1/ingressclass.go | 9 --------- applyconfigurations/networking/v1/networkpolicy.go | 9 --------- applyconfigurations/networking/v1beta1/ingress.go | 9 --------- applyconfigurations/networking/v1beta1/ingressclass.go | 9 --------- applyconfigurations/node/v1/runtimeclass.go | 9 --------- applyconfigurations/node/v1alpha1/runtimeclass.go | 9 --------- applyconfigurations/node/v1beta1/runtimeclass.go | 9 --------- applyconfigurations/policy/v1/eviction.go | 9 --------- applyconfigurations/policy/v1/poddisruptionbudget.go | 9 --------- applyconfigurations/policy/v1beta1/eviction.go | 9 --------- .../policy/v1beta1/poddisruptionbudget.go | 9 --------- applyconfigurations/policy/v1beta1/podsecuritypolicy.go | 9 --------- applyconfigurations/rbac/v1/clusterrole.go | 9 --------- applyconfigurations/rbac/v1/clusterrolebinding.go | 9 --------- applyconfigurations/rbac/v1/role.go | 9 --------- applyconfigurations/rbac/v1/rolebinding.go | 9 --------- applyconfigurations/rbac/v1alpha1/clusterrole.go | 9 --------- applyconfigurations/rbac/v1alpha1/clusterrolebinding.go | 9 --------- applyconfigurations/rbac/v1alpha1/role.go | 9 --------- applyconfigurations/rbac/v1alpha1/rolebinding.go | 9 --------- applyconfigurations/rbac/v1beta1/clusterrole.go | 9 --------- applyconfigurations/rbac/v1beta1/clusterrolebinding.go | 9 --------- applyconfigurations/rbac/v1beta1/role.go | 9 --------- applyconfigurations/rbac/v1beta1/rolebinding.go | 9 --------- applyconfigurations/scheduling/v1/priorityclass.go | 9 --------- applyconfigurations/scheduling/v1alpha1/priorityclass.go | 9 --------- applyconfigurations/scheduling/v1beta1/priorityclass.go | 9 --------- applyconfigurations/storage/v1/csidriver.go | 9 --------- applyconfigurations/storage/v1/csinode.go | 9 --------- applyconfigurations/storage/v1/storageclass.go | 9 --------- applyconfigurations/storage/v1/volumeattachment.go | 9 --------- .../storage/v1alpha1/csistoragecapacity.go | 9 --------- applyconfigurations/storage/v1alpha1/volumeattachment.go | 9 --------- applyconfigurations/storage/v1beta1/csidriver.go | 9 --------- applyconfigurations/storage/v1beta1/csinode.go | 9 --------- .../storage/v1beta1/csistoragecapacity.go | 9 --------- applyconfigurations/storage/v1beta1/storageclass.go | 9 --------- applyconfigurations/storage/v1beta1/volumeattachment.go | 9 --------- 109 files changed, 981 deletions(-) diff --git a/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go b/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go index 7ae061e3c..df10171e8 100644 --- a/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -123,15 +123,6 @@ func (b *MutatingWebhookConfigurationApplyConfiguration) WithNamespace(value str return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *MutatingWebhookConfigurationApplyConfiguration) WithSelfLink(value string) *MutatingWebhookConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go b/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go index ae19ed81e..3bbdbacc2 100644 --- a/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go @@ -123,15 +123,6 @@ func (b *ValidatingWebhookConfigurationApplyConfiguration) WithNamespace(value s return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ValidatingWebhookConfigurationApplyConfiguration) WithSelfLink(value string) *ValidatingWebhookConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index 178745c23..af0b1ac0c 100644 --- a/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -123,15 +123,6 @@ func (b *MutatingWebhookConfigurationApplyConfiguration) WithNamespace(value str return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *MutatingWebhookConfigurationApplyConfiguration) WithSelfLink(value string) *MutatingWebhookConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go index e60d997f8..2de7bb2b3 100644 --- a/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -123,15 +123,6 @@ func (b *ValidatingWebhookConfigurationApplyConfiguration) WithNamespace(value s return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ValidatingWebhookConfigurationApplyConfiguration) WithSelfLink(value string) *ValidatingWebhookConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go b/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go index 180b77625..a0732d062 100644 --- a/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go +++ b/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go @@ -124,15 +124,6 @@ func (b *StorageVersionApplyConfiguration) WithNamespace(value string) *StorageV return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *StorageVersionApplyConfiguration) WithSelfLink(value string) *StorageVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1/controllerrevision.go b/applyconfigurations/apps/v1/controllerrevision.go index 28a0c582b..c818fd9fd 100644 --- a/applyconfigurations/apps/v1/controllerrevision.go +++ b/applyconfigurations/apps/v1/controllerrevision.go @@ -127,15 +127,6 @@ func (b *ControllerRevisionApplyConfiguration) WithNamespace(value string) *Cont return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ControllerRevisionApplyConfiguration) WithSelfLink(value string) *ControllerRevisionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1/daemonset.go b/applyconfigurations/apps/v1/daemonset.go index 6dd8c6e88..c88861900 100644 --- a/applyconfigurations/apps/v1/daemonset.go +++ b/applyconfigurations/apps/v1/daemonset.go @@ -126,15 +126,6 @@ func (b *DaemonSetApplyConfiguration) WithNamespace(value string) *DaemonSetAppl return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *DaemonSetApplyConfiguration) WithSelfLink(value string) *DaemonSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1/deployment.go b/applyconfigurations/apps/v1/deployment.go index d33321c52..4364ca65c 100644 --- a/applyconfigurations/apps/v1/deployment.go +++ b/applyconfigurations/apps/v1/deployment.go @@ -126,15 +126,6 @@ func (b *DeploymentApplyConfiguration) WithNamespace(value string) *DeploymentAp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *DeploymentApplyConfiguration) WithSelfLink(value string) *DeploymentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1/replicaset.go b/applyconfigurations/apps/v1/replicaset.go index 0affbf82f..f8e87da98 100644 --- a/applyconfigurations/apps/v1/replicaset.go +++ b/applyconfigurations/apps/v1/replicaset.go @@ -126,15 +126,6 @@ func (b *ReplicaSetApplyConfiguration) WithNamespace(value string) *ReplicaSetAp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ReplicaSetApplyConfiguration) WithSelfLink(value string) *ReplicaSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1/statefulset.go b/applyconfigurations/apps/v1/statefulset.go index 7cb5ec12c..ad8fef28b 100644 --- a/applyconfigurations/apps/v1/statefulset.go +++ b/applyconfigurations/apps/v1/statefulset.go @@ -126,15 +126,6 @@ func (b *StatefulSetApplyConfiguration) WithNamespace(value string) *StatefulSet return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *StatefulSetApplyConfiguration) WithSelfLink(value string) *StatefulSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1beta1/controllerrevision.go b/applyconfigurations/apps/v1beta1/controllerrevision.go index bcdfa44b2..4d5c851da 100644 --- a/applyconfigurations/apps/v1beta1/controllerrevision.go +++ b/applyconfigurations/apps/v1beta1/controllerrevision.go @@ -127,15 +127,6 @@ func (b *ControllerRevisionApplyConfiguration) WithNamespace(value string) *Cont return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ControllerRevisionApplyConfiguration) WithSelfLink(value string) *ControllerRevisionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1beta1/deployment.go b/applyconfigurations/apps/v1beta1/deployment.go index eddab1789..c04dd56ef 100644 --- a/applyconfigurations/apps/v1beta1/deployment.go +++ b/applyconfigurations/apps/v1beta1/deployment.go @@ -126,15 +126,6 @@ func (b *DeploymentApplyConfiguration) WithNamespace(value string) *DeploymentAp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *DeploymentApplyConfiguration) WithSelfLink(value string) *DeploymentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1beta1/statefulset.go b/applyconfigurations/apps/v1beta1/statefulset.go index a4f64cd85..b6b8100be 100644 --- a/applyconfigurations/apps/v1beta1/statefulset.go +++ b/applyconfigurations/apps/v1beta1/statefulset.go @@ -126,15 +126,6 @@ func (b *StatefulSetApplyConfiguration) WithNamespace(value string) *StatefulSet return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *StatefulSetApplyConfiguration) WithSelfLink(value string) *StatefulSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1beta2/controllerrevision.go b/applyconfigurations/apps/v1beta2/controllerrevision.go index f5d906162..147f52c7b 100644 --- a/applyconfigurations/apps/v1beta2/controllerrevision.go +++ b/applyconfigurations/apps/v1beta2/controllerrevision.go @@ -127,15 +127,6 @@ func (b *ControllerRevisionApplyConfiguration) WithNamespace(value string) *Cont return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ControllerRevisionApplyConfiguration) WithSelfLink(value string) *ControllerRevisionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1beta2/daemonset.go b/applyconfigurations/apps/v1beta2/daemonset.go index 92708f0a8..7786c2783 100644 --- a/applyconfigurations/apps/v1beta2/daemonset.go +++ b/applyconfigurations/apps/v1beta2/daemonset.go @@ -126,15 +126,6 @@ func (b *DaemonSetApplyConfiguration) WithNamespace(value string) *DaemonSetAppl return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *DaemonSetApplyConfiguration) WithSelfLink(value string) *DaemonSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1beta2/deployment.go b/applyconfigurations/apps/v1beta2/deployment.go index ad0c509db..197dd5114 100644 --- a/applyconfigurations/apps/v1beta2/deployment.go +++ b/applyconfigurations/apps/v1beta2/deployment.go @@ -126,15 +126,6 @@ func (b *DeploymentApplyConfiguration) WithNamespace(value string) *DeploymentAp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *DeploymentApplyConfiguration) WithSelfLink(value string) *DeploymentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1beta2/replicaset.go b/applyconfigurations/apps/v1beta2/replicaset.go index e2998f2c3..458b2513c 100644 --- a/applyconfigurations/apps/v1beta2/replicaset.go +++ b/applyconfigurations/apps/v1beta2/replicaset.go @@ -126,15 +126,6 @@ func (b *ReplicaSetApplyConfiguration) WithNamespace(value string) *ReplicaSetAp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ReplicaSetApplyConfiguration) WithSelfLink(value string) *ReplicaSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1beta2/scale.go b/applyconfigurations/apps/v1beta2/scale.go index 9b98fbb85..547bb6fb1 100644 --- a/applyconfigurations/apps/v1beta2/scale.go +++ b/applyconfigurations/apps/v1beta2/scale.go @@ -86,15 +86,6 @@ func (b *ScaleApplyConfiguration) WithNamespace(value string) *ScaleApplyConfigu return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ScaleApplyConfiguration) WithSelfLink(value string) *ScaleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/apps/v1beta2/statefulset.go b/applyconfigurations/apps/v1beta2/statefulset.go index 0a242310c..bda280d9d 100644 --- a/applyconfigurations/apps/v1beta2/statefulset.go +++ b/applyconfigurations/apps/v1beta2/statefulset.go @@ -126,15 +126,6 @@ func (b *StatefulSetApplyConfiguration) WithNamespace(value string) *StatefulSet return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *StatefulSetApplyConfiguration) WithSelfLink(value string) *StatefulSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go b/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go index bf04b0131..9ea70befa 100644 --- a/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go +++ b/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go @@ -126,15 +126,6 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithNamespace(value string) return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *HorizontalPodAutoscalerApplyConfiguration) WithSelfLink(value string) *HorizontalPodAutoscalerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/autoscaling/v1/scale.go b/applyconfigurations/autoscaling/v1/scale.go index 27862e9c9..9fea50d57 100644 --- a/applyconfigurations/autoscaling/v1/scale.go +++ b/applyconfigurations/autoscaling/v1/scale.go @@ -85,15 +85,6 @@ func (b *ScaleApplyConfiguration) WithNamespace(value string) *ScaleApplyConfigu return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ScaleApplyConfiguration) WithSelfLink(value string) *ScaleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go b/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go index af805488e..8008f6d1e 100644 --- a/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go +++ b/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go @@ -126,15 +126,6 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithNamespace(value string) return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *HorizontalPodAutoscalerApplyConfiguration) WithSelfLink(value string) *HorizontalPodAutoscalerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go b/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go index e2c24646b..18be79829 100644 --- a/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -126,15 +126,6 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithNamespace(value string) return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *HorizontalPodAutoscalerApplyConfiguration) WithSelfLink(value string) *HorizontalPodAutoscalerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go b/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go index 381925b23..e1e881183 100644 --- a/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -126,15 +126,6 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithNamespace(value string) return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *HorizontalPodAutoscalerApplyConfiguration) WithSelfLink(value string) *HorizontalPodAutoscalerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/batch/v1/cronjob.go b/applyconfigurations/batch/v1/cronjob.go index 749163cc3..95cd8bd46 100644 --- a/applyconfigurations/batch/v1/cronjob.go +++ b/applyconfigurations/batch/v1/cronjob.go @@ -126,15 +126,6 @@ func (b *CronJobApplyConfiguration) WithNamespace(value string) *CronJobApplyCon return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *CronJobApplyConfiguration) WithSelfLink(value string) *CronJobApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/batch/v1/job.go b/applyconfigurations/batch/v1/job.go index bb84a58b0..fe82f0a9c 100644 --- a/applyconfigurations/batch/v1/job.go +++ b/applyconfigurations/batch/v1/job.go @@ -126,15 +126,6 @@ func (b *JobApplyConfiguration) WithNamespace(value string) *JobApplyConfigurati return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *JobApplyConfiguration) WithSelfLink(value string) *JobApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/batch/v1/jobtemplatespec.go b/applyconfigurations/batch/v1/jobtemplatespec.go index 46df3722f..613036164 100644 --- a/applyconfigurations/batch/v1/jobtemplatespec.go +++ b/applyconfigurations/batch/v1/jobtemplatespec.go @@ -64,15 +64,6 @@ func (b *JobTemplateSpecApplyConfiguration) WithNamespace(value string) *JobTemp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *JobTemplateSpecApplyConfiguration) WithSelfLink(value string) *JobTemplateSpecApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/batch/v1beta1/cronjob.go b/applyconfigurations/batch/v1beta1/cronjob.go index 8b16bc55c..7477eccf4 100644 --- a/applyconfigurations/batch/v1beta1/cronjob.go +++ b/applyconfigurations/batch/v1beta1/cronjob.go @@ -126,15 +126,6 @@ func (b *CronJobApplyConfiguration) WithNamespace(value string) *CronJobApplyCon return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *CronJobApplyConfiguration) WithSelfLink(value string) *CronJobApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/batch/v1beta1/jobtemplatespec.go b/applyconfigurations/batch/v1beta1/jobtemplatespec.go index bad60e1fb..1a6670297 100644 --- a/applyconfigurations/batch/v1beta1/jobtemplatespec.go +++ b/applyconfigurations/batch/v1beta1/jobtemplatespec.go @@ -65,15 +65,6 @@ func (b *JobTemplateSpecApplyConfiguration) WithNamespace(value string) *JobTemp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *JobTemplateSpecApplyConfiguration) WithSelfLink(value string) *JobTemplateSpecApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/certificates/v1/certificatesigningrequest.go b/applyconfigurations/certificates/v1/certificatesigningrequest.go index 9d46541b7..152c16249 100644 --- a/applyconfigurations/certificates/v1/certificatesigningrequest.go +++ b/applyconfigurations/certificates/v1/certificatesigningrequest.go @@ -124,15 +124,6 @@ func (b *CertificateSigningRequestApplyConfiguration) WithNamespace(value string return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *CertificateSigningRequestApplyConfiguration) WithSelfLink(value string) *CertificateSigningRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go b/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go index 907b81983..d64b31a95 100644 --- a/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go +++ b/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go @@ -124,15 +124,6 @@ func (b *CertificateSigningRequestApplyConfiguration) WithNamespace(value string return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *CertificateSigningRequestApplyConfiguration) WithSelfLink(value string) *CertificateSigningRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/coordination/v1/lease.go b/applyconfigurations/coordination/v1/lease.go index fcaddb663..a21956977 100644 --- a/applyconfigurations/coordination/v1/lease.go +++ b/applyconfigurations/coordination/v1/lease.go @@ -125,15 +125,6 @@ func (b *LeaseApplyConfiguration) WithNamespace(value string) *LeaseApplyConfigu return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *LeaseApplyConfiguration) WithSelfLink(value string) *LeaseApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/coordination/v1beta1/lease.go b/applyconfigurations/coordination/v1beta1/lease.go index f63ddc29e..4bff597a0 100644 --- a/applyconfigurations/coordination/v1beta1/lease.go +++ b/applyconfigurations/coordination/v1beta1/lease.go @@ -125,15 +125,6 @@ func (b *LeaseApplyConfiguration) WithNamespace(value string) *LeaseApplyConfigu return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *LeaseApplyConfiguration) WithSelfLink(value string) *LeaseApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/componentstatus.go b/applyconfigurations/core/v1/componentstatus.go index 6983a689b..86c6f3885 100644 --- a/applyconfigurations/core/v1/componentstatus.go +++ b/applyconfigurations/core/v1/componentstatus.go @@ -123,15 +123,6 @@ func (b *ComponentStatusApplyConfiguration) WithNamespace(value string) *Compone return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ComponentStatusApplyConfiguration) WithSelfLink(value string) *ComponentStatusApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/configmap.go b/applyconfigurations/core/v1/configmap.go index 0664c1849..59011a259 100644 --- a/applyconfigurations/core/v1/configmap.go +++ b/applyconfigurations/core/v1/configmap.go @@ -127,15 +127,6 @@ func (b *ConfigMapApplyConfiguration) WithNamespace(value string) *ConfigMapAppl return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ConfigMapApplyConfiguration) WithSelfLink(value string) *ConfigMapApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/endpoints.go b/applyconfigurations/core/v1/endpoints.go index b3b302fe2..12844ad76 100644 --- a/applyconfigurations/core/v1/endpoints.go +++ b/applyconfigurations/core/v1/endpoints.go @@ -125,15 +125,6 @@ func (b *EndpointsApplyConfiguration) WithNamespace(value string) *EndpointsAppl return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *EndpointsApplyConfiguration) WithSelfLink(value string) *EndpointsApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/event.go b/applyconfigurations/core/v1/event.go index 3a0c53694..65bd7c00b 100644 --- a/applyconfigurations/core/v1/event.go +++ b/applyconfigurations/core/v1/event.go @@ -138,15 +138,6 @@ func (b *EventApplyConfiguration) WithNamespace(value string) *EventApplyConfigu return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *EventApplyConfiguration) WithSelfLink(value string) *EventApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/limitrange.go b/applyconfigurations/core/v1/limitrange.go index 03207b8ec..ab30ab665 100644 --- a/applyconfigurations/core/v1/limitrange.go +++ b/applyconfigurations/core/v1/limitrange.go @@ -125,15 +125,6 @@ func (b *LimitRangeApplyConfiguration) WithNamespace(value string) *LimitRangeAp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *LimitRangeApplyConfiguration) WithSelfLink(value string) *LimitRangeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/namespace.go b/applyconfigurations/core/v1/namespace.go index ec29bcfd9..636b948e7 100644 --- a/applyconfigurations/core/v1/namespace.go +++ b/applyconfigurations/core/v1/namespace.go @@ -124,15 +124,6 @@ func (b *NamespaceApplyConfiguration) WithNamespace(value string) *NamespaceAppl return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *NamespaceApplyConfiguration) WithSelfLink(value string) *NamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/node.go b/applyconfigurations/core/v1/node.go index b26e9f499..43c824d1e 100644 --- a/applyconfigurations/core/v1/node.go +++ b/applyconfigurations/core/v1/node.go @@ -124,15 +124,6 @@ func (b *NodeApplyConfiguration) WithNamespace(value string) *NodeApplyConfigura return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithSelfLink(value string) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/persistentvolume.go b/applyconfigurations/core/v1/persistentvolume.go index dcef6020f..a684d3b50 100644 --- a/applyconfigurations/core/v1/persistentvolume.go +++ b/applyconfigurations/core/v1/persistentvolume.go @@ -124,15 +124,6 @@ func (b *PersistentVolumeApplyConfiguration) WithNamespace(value string) *Persis return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PersistentVolumeApplyConfiguration) WithSelfLink(value string) *PersistentVolumeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/persistentvolumeclaim.go b/applyconfigurations/core/v1/persistentvolumeclaim.go index 8ed20fa29..759d06af2 100644 --- a/applyconfigurations/core/v1/persistentvolumeclaim.go +++ b/applyconfigurations/core/v1/persistentvolumeclaim.go @@ -126,15 +126,6 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithNamespace(value string) *P return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PersistentVolumeClaimApplyConfiguration) WithSelfLink(value string) *PersistentVolumeClaimApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go b/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go index ac1b6bf01..954184df6 100644 --- a/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go +++ b/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go @@ -64,15 +64,6 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithNamespace(value st return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithSelfLink(value string) *PersistentVolumeClaimTemplateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/pod.go b/applyconfigurations/core/v1/pod.go index c3649829a..db078fd0b 100644 --- a/applyconfigurations/core/v1/pod.go +++ b/applyconfigurations/core/v1/pod.go @@ -126,15 +126,6 @@ func (b *PodApplyConfiguration) WithNamespace(value string) *PodApplyConfigurati return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PodApplyConfiguration) WithSelfLink(value string) *PodApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/podtemplate.go b/applyconfigurations/core/v1/podtemplate.go index 1460977c0..9fb3958d5 100644 --- a/applyconfigurations/core/v1/podtemplate.go +++ b/applyconfigurations/core/v1/podtemplate.go @@ -125,15 +125,6 @@ func (b *PodTemplateApplyConfiguration) WithNamespace(value string) *PodTemplate return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PodTemplateApplyConfiguration) WithSelfLink(value string) *PodTemplateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/podtemplatespec.go b/applyconfigurations/core/v1/podtemplatespec.go index ff06ea4b3..ec0ca5556 100644 --- a/applyconfigurations/core/v1/podtemplatespec.go +++ b/applyconfigurations/core/v1/podtemplatespec.go @@ -64,15 +64,6 @@ func (b *PodTemplateSpecApplyConfiguration) WithNamespace(value string) *PodTemp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PodTemplateSpecApplyConfiguration) WithSelfLink(value string) *PodTemplateSpecApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/replicationcontroller.go b/applyconfigurations/core/v1/replicationcontroller.go index 6dd6ae267..98f84163e 100644 --- a/applyconfigurations/core/v1/replicationcontroller.go +++ b/applyconfigurations/core/v1/replicationcontroller.go @@ -126,15 +126,6 @@ func (b *ReplicationControllerApplyConfiguration) WithNamespace(value string) *R return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ReplicationControllerApplyConfiguration) WithSelfLink(value string) *ReplicationControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/resourcequota.go b/applyconfigurations/core/v1/resourcequota.go index 5cfb1988b..206606441 100644 --- a/applyconfigurations/core/v1/resourcequota.go +++ b/applyconfigurations/core/v1/resourcequota.go @@ -126,15 +126,6 @@ func (b *ResourceQuotaApplyConfiguration) WithNamespace(value string) *ResourceQ return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ResourceQuotaApplyConfiguration) WithSelfLink(value string) *ResourceQuotaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/secret.go b/applyconfigurations/core/v1/secret.go index 00d789f41..d7597ce75 100644 --- a/applyconfigurations/core/v1/secret.go +++ b/applyconfigurations/core/v1/secret.go @@ -128,15 +128,6 @@ func (b *SecretApplyConfiguration) WithNamespace(value string) *SecretApplyConfi return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *SecretApplyConfiguration) WithSelfLink(value string) *SecretApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/service.go b/applyconfigurations/core/v1/service.go index 31b47311f..bfd223038 100644 --- a/applyconfigurations/core/v1/service.go +++ b/applyconfigurations/core/v1/service.go @@ -126,15 +126,6 @@ func (b *ServiceApplyConfiguration) WithNamespace(value string) *ServiceApplyCon return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ServiceApplyConfiguration) WithSelfLink(value string) *ServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/core/v1/serviceaccount.go b/applyconfigurations/core/v1/serviceaccount.go index 459d025eb..a65899c73 100644 --- a/applyconfigurations/core/v1/serviceaccount.go +++ b/applyconfigurations/core/v1/serviceaccount.go @@ -127,15 +127,6 @@ func (b *ServiceAccountApplyConfiguration) WithNamespace(value string) *ServiceA return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ServiceAccountApplyConfiguration) WithSelfLink(value string) *ServiceAccountApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/discovery/v1/endpointslice.go b/applyconfigurations/discovery/v1/endpointslice.go index 6feaab25d..efcbf98f5 100644 --- a/applyconfigurations/discovery/v1/endpointslice.go +++ b/applyconfigurations/discovery/v1/endpointslice.go @@ -127,15 +127,6 @@ func (b *EndpointSliceApplyConfiguration) WithNamespace(value string) *EndpointS return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *EndpointSliceApplyConfiguration) WithSelfLink(value string) *EndpointSliceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/discovery/v1beta1/endpointslice.go b/applyconfigurations/discovery/v1beta1/endpointslice.go index bacc1134d..865f06273 100644 --- a/applyconfigurations/discovery/v1beta1/endpointslice.go +++ b/applyconfigurations/discovery/v1beta1/endpointslice.go @@ -127,15 +127,6 @@ func (b *EndpointSliceApplyConfiguration) WithNamespace(value string) *EndpointS return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *EndpointSliceApplyConfiguration) WithSelfLink(value string) *EndpointSliceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/events/v1/event.go b/applyconfigurations/events/v1/event.go index 19cc9e0ad..a5d567327 100644 --- a/applyconfigurations/events/v1/event.go +++ b/applyconfigurations/events/v1/event.go @@ -139,15 +139,6 @@ func (b *EventApplyConfiguration) WithNamespace(value string) *EventApplyConfigu return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *EventApplyConfiguration) WithSelfLink(value string) *EventApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/events/v1beta1/event.go b/applyconfigurations/events/v1beta1/event.go index f02bdd2b9..ea5fd10d9 100644 --- a/applyconfigurations/events/v1beta1/event.go +++ b/applyconfigurations/events/v1beta1/event.go @@ -139,15 +139,6 @@ func (b *EventApplyConfiguration) WithNamespace(value string) *EventApplyConfigu return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *EventApplyConfiguration) WithSelfLink(value string) *EventApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/extensions/v1beta1/daemonset.go b/applyconfigurations/extensions/v1beta1/daemonset.go index 145587325..1be0ab48e 100644 --- a/applyconfigurations/extensions/v1beta1/daemonset.go +++ b/applyconfigurations/extensions/v1beta1/daemonset.go @@ -126,15 +126,6 @@ func (b *DaemonSetApplyConfiguration) WithNamespace(value string) *DaemonSetAppl return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *DaemonSetApplyConfiguration) WithSelfLink(value string) *DaemonSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/extensions/v1beta1/deployment.go b/applyconfigurations/extensions/v1beta1/deployment.go index e64e4ca38..c518d1622 100644 --- a/applyconfigurations/extensions/v1beta1/deployment.go +++ b/applyconfigurations/extensions/v1beta1/deployment.go @@ -126,15 +126,6 @@ func (b *DeploymentApplyConfiguration) WithNamespace(value string) *DeploymentAp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *DeploymentApplyConfiguration) WithSelfLink(value string) *DeploymentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/extensions/v1beta1/ingress.go b/applyconfigurations/extensions/v1beta1/ingress.go index df4fbc2cd..cc2806643 100644 --- a/applyconfigurations/extensions/v1beta1/ingress.go +++ b/applyconfigurations/extensions/v1beta1/ingress.go @@ -126,15 +126,6 @@ func (b *IngressApplyConfiguration) WithNamespace(value string) *IngressApplyCon return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithSelfLink(value string) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/extensions/v1beta1/networkpolicy.go b/applyconfigurations/extensions/v1beta1/networkpolicy.go index 965292516..4603c699e 100644 --- a/applyconfigurations/extensions/v1beta1/networkpolicy.go +++ b/applyconfigurations/extensions/v1beta1/networkpolicy.go @@ -125,15 +125,6 @@ func (b *NetworkPolicyApplyConfiguration) WithNamespace(value string) *NetworkPo return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *NetworkPolicyApplyConfiguration) WithSelfLink(value string) *NetworkPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go b/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go index cceec69f9..f5ec80b43 100644 --- a/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go +++ b/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go @@ -123,15 +123,6 @@ func (b *PodSecurityPolicyApplyConfiguration) WithNamespace(value string) *PodSe return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PodSecurityPolicyApplyConfiguration) WithSelfLink(value string) *PodSecurityPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/extensions/v1beta1/replicaset.go b/applyconfigurations/extensions/v1beta1/replicaset.go index b57cefc9d..86a122fb5 100644 --- a/applyconfigurations/extensions/v1beta1/replicaset.go +++ b/applyconfigurations/extensions/v1beta1/replicaset.go @@ -126,15 +126,6 @@ func (b *ReplicaSetApplyConfiguration) WithNamespace(value string) *ReplicaSetAp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ReplicaSetApplyConfiguration) WithSelfLink(value string) *ReplicaSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/extensions/v1beta1/scale.go b/applyconfigurations/extensions/v1beta1/scale.go index 1f774e63f..5147e9655 100644 --- a/applyconfigurations/extensions/v1beta1/scale.go +++ b/applyconfigurations/extensions/v1beta1/scale.go @@ -86,15 +86,6 @@ func (b *ScaleApplyConfiguration) WithNamespace(value string) *ScaleApplyConfigu return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ScaleApplyConfiguration) WithSelfLink(value string) *ScaleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/flowcontrol/v1alpha1/flowschema.go b/applyconfigurations/flowcontrol/v1alpha1/flowschema.go index 2a76cf32e..07534f9dc 100644 --- a/applyconfigurations/flowcontrol/v1alpha1/flowschema.go +++ b/applyconfigurations/flowcontrol/v1alpha1/flowschema.go @@ -124,15 +124,6 @@ func (b *FlowSchemaApplyConfiguration) WithNamespace(value string) *FlowSchemaAp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *FlowSchemaApplyConfiguration) WithSelfLink(value string) *FlowSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go index 4f36afe53..4c683ac67 100644 --- a/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go @@ -124,15 +124,6 @@ func (b *PriorityLevelConfigurationApplyConfiguration) WithNamespace(value strin return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PriorityLevelConfigurationApplyConfiguration) WithSelfLink(value string) *PriorityLevelConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/flowcontrol/v1beta1/flowschema.go b/applyconfigurations/flowcontrol/v1beta1/flowschema.go index 794ff25a7..37155f632 100644 --- a/applyconfigurations/flowcontrol/v1beta1/flowschema.go +++ b/applyconfigurations/flowcontrol/v1beta1/flowschema.go @@ -124,15 +124,6 @@ func (b *FlowSchemaApplyConfiguration) WithNamespace(value string) *FlowSchemaAp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *FlowSchemaApplyConfiguration) WithSelfLink(value string) *FlowSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go b/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go index 57d1cd397..1b5624c75 100644 --- a/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go +++ b/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go @@ -124,15 +124,6 @@ func (b *PriorityLevelConfigurationApplyConfiguration) WithNamespace(value strin return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PriorityLevelConfigurationApplyConfiguration) WithSelfLink(value string) *PriorityLevelConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/flowcontrol/v1beta2/flowschema.go b/applyconfigurations/flowcontrol/v1beta2/flowschema.go index 323d7241d..df1f6ce77 100644 --- a/applyconfigurations/flowcontrol/v1beta2/flowschema.go +++ b/applyconfigurations/flowcontrol/v1beta2/flowschema.go @@ -124,15 +124,6 @@ func (b *FlowSchemaApplyConfiguration) WithNamespace(value string) *FlowSchemaAp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *FlowSchemaApplyConfiguration) WithSelfLink(value string) *FlowSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go b/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go index 4ac11bba6..21c046ebe 100644 --- a/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go +++ b/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go @@ -124,15 +124,6 @@ func (b *PriorityLevelConfigurationApplyConfiguration) WithNamespace(value strin return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PriorityLevelConfigurationApplyConfiguration) WithSelfLink(value string) *PriorityLevelConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/imagepolicy/v1alpha1/imagereview.go b/applyconfigurations/imagepolicy/v1alpha1/imagereview.go index a6eb53802..ec55eae52 100644 --- a/applyconfigurations/imagepolicy/v1alpha1/imagereview.go +++ b/applyconfigurations/imagepolicy/v1alpha1/imagereview.go @@ -124,15 +124,6 @@ func (b *ImageReviewApplyConfiguration) WithNamespace(value string) *ImageReview return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ImageReviewApplyConfiguration) WithSelfLink(value string) *ImageReviewApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/meta/v1/objectmeta.go b/applyconfigurations/meta/v1/objectmeta.go index 0aeaeba27..9aa840e8d 100644 --- a/applyconfigurations/meta/v1/objectmeta.go +++ b/applyconfigurations/meta/v1/objectmeta.go @@ -29,7 +29,6 @@ type ObjectMetaApplyConfiguration struct { Name *string `json:"name,omitempty"` GenerateName *string `json:"generateName,omitempty"` Namespace *string `json:"namespace,omitempty"` - SelfLink *string `json:"selfLink,omitempty"` UID *types.UID `json:"uid,omitempty"` ResourceVersion *string `json:"resourceVersion,omitempty"` Generation *int64 `json:"generation,omitempty"` @@ -73,14 +72,6 @@ func (b *ObjectMetaApplyConfiguration) WithNamespace(value string) *ObjectMetaAp return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ObjectMetaApplyConfiguration) WithSelfLink(value string) *ObjectMetaApplyConfiguration { - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/networking/v1/ingress.go b/applyconfigurations/networking/v1/ingress.go index 74c0bb273..448f80ad9 100644 --- a/applyconfigurations/networking/v1/ingress.go +++ b/applyconfigurations/networking/v1/ingress.go @@ -126,15 +126,6 @@ func (b *IngressApplyConfiguration) WithNamespace(value string) *IngressApplyCon return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithSelfLink(value string) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/networking/v1/ingressclass.go b/applyconfigurations/networking/v1/ingressclass.go index 5b36992e4..7145e2b96 100644 --- a/applyconfigurations/networking/v1/ingressclass.go +++ b/applyconfigurations/networking/v1/ingressclass.go @@ -123,15 +123,6 @@ func (b *IngressClassApplyConfiguration) WithNamespace(value string) *IngressCla return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *IngressClassApplyConfiguration) WithSelfLink(value string) *IngressClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/networking/v1/networkpolicy.go b/applyconfigurations/networking/v1/networkpolicy.go index 7091d7cfd..e3376ac64 100644 --- a/applyconfigurations/networking/v1/networkpolicy.go +++ b/applyconfigurations/networking/v1/networkpolicy.go @@ -125,15 +125,6 @@ func (b *NetworkPolicyApplyConfiguration) WithNamespace(value string) *NetworkPo return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *NetworkPolicyApplyConfiguration) WithSelfLink(value string) *NetworkPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/networking/v1beta1/ingress.go b/applyconfigurations/networking/v1beta1/ingress.go index 6b87d1ff3..24b3663aa 100644 --- a/applyconfigurations/networking/v1beta1/ingress.go +++ b/applyconfigurations/networking/v1beta1/ingress.go @@ -126,15 +126,6 @@ func (b *IngressApplyConfiguration) WithNamespace(value string) *IngressApplyCon return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithSelfLink(value string) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/networking/v1beta1/ingressclass.go b/applyconfigurations/networking/v1beta1/ingressclass.go index 3a13cd083..9394003af 100644 --- a/applyconfigurations/networking/v1beta1/ingressclass.go +++ b/applyconfigurations/networking/v1beta1/ingressclass.go @@ -123,15 +123,6 @@ func (b *IngressClassApplyConfiguration) WithNamespace(value string) *IngressCla return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *IngressClassApplyConfiguration) WithSelfLink(value string) *IngressClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/node/v1/runtimeclass.go b/applyconfigurations/node/v1/runtimeclass.go index 1521f2cef..9a2967d0f 100644 --- a/applyconfigurations/node/v1/runtimeclass.go +++ b/applyconfigurations/node/v1/runtimeclass.go @@ -125,15 +125,6 @@ func (b *RuntimeClassApplyConfiguration) WithNamespace(value string) *RuntimeCla return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *RuntimeClassApplyConfiguration) WithSelfLink(value string) *RuntimeClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/node/v1alpha1/runtimeclass.go b/applyconfigurations/node/v1alpha1/runtimeclass.go index 295e763d7..79cd3e4d9 100644 --- a/applyconfigurations/node/v1alpha1/runtimeclass.go +++ b/applyconfigurations/node/v1alpha1/runtimeclass.go @@ -123,15 +123,6 @@ func (b *RuntimeClassApplyConfiguration) WithNamespace(value string) *RuntimeCla return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *RuntimeClassApplyConfiguration) WithSelfLink(value string) *RuntimeClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/node/v1beta1/runtimeclass.go b/applyconfigurations/node/v1beta1/runtimeclass.go index 2424e205e..e9e083c18 100644 --- a/applyconfigurations/node/v1beta1/runtimeclass.go +++ b/applyconfigurations/node/v1beta1/runtimeclass.go @@ -125,15 +125,6 @@ func (b *RuntimeClassApplyConfiguration) WithNamespace(value string) *RuntimeCla return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *RuntimeClassApplyConfiguration) WithSelfLink(value string) *RuntimeClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/policy/v1/eviction.go b/applyconfigurations/policy/v1/eviction.go index 07bda7467..2bdf685ab 100644 --- a/applyconfigurations/policy/v1/eviction.go +++ b/applyconfigurations/policy/v1/eviction.go @@ -125,15 +125,6 @@ func (b *EvictionApplyConfiguration) WithNamespace(value string) *EvictionApplyC return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *EvictionApplyConfiguration) WithSelfLink(value string) *EvictionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/policy/v1/poddisruptionbudget.go b/applyconfigurations/policy/v1/poddisruptionbudget.go index 888c20f60..4f4fa9543 100644 --- a/applyconfigurations/policy/v1/poddisruptionbudget.go +++ b/applyconfigurations/policy/v1/poddisruptionbudget.go @@ -126,15 +126,6 @@ func (b *PodDisruptionBudgetApplyConfiguration) WithNamespace(value string) *Pod return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PodDisruptionBudgetApplyConfiguration) WithSelfLink(value string) *PodDisruptionBudgetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/policy/v1beta1/eviction.go b/applyconfigurations/policy/v1beta1/eviction.go index e1f0f137e..8f177627b 100644 --- a/applyconfigurations/policy/v1beta1/eviction.go +++ b/applyconfigurations/policy/v1beta1/eviction.go @@ -125,15 +125,6 @@ func (b *EvictionApplyConfiguration) WithNamespace(value string) *EvictionApplyC return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *EvictionApplyConfiguration) WithSelfLink(value string) *EvictionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/policy/v1beta1/poddisruptionbudget.go b/applyconfigurations/policy/v1beta1/poddisruptionbudget.go index fc28026f5..f159d727a 100644 --- a/applyconfigurations/policy/v1beta1/poddisruptionbudget.go +++ b/applyconfigurations/policy/v1beta1/poddisruptionbudget.go @@ -126,15 +126,6 @@ func (b *PodDisruptionBudgetApplyConfiguration) WithNamespace(value string) *Pod return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PodDisruptionBudgetApplyConfiguration) WithSelfLink(value string) *PodDisruptionBudgetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/policy/v1beta1/podsecuritypolicy.go b/applyconfigurations/policy/v1beta1/podsecuritypolicy.go index 0500824c9..5b52c1eec 100644 --- a/applyconfigurations/policy/v1beta1/podsecuritypolicy.go +++ b/applyconfigurations/policy/v1beta1/podsecuritypolicy.go @@ -123,15 +123,6 @@ func (b *PodSecurityPolicyApplyConfiguration) WithNamespace(value string) *PodSe return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PodSecurityPolicyApplyConfiguration) WithSelfLink(value string) *PodSecurityPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/rbac/v1/clusterrole.go b/applyconfigurations/rbac/v1/clusterrole.go index 1b4b51596..678a0633a 100644 --- a/applyconfigurations/rbac/v1/clusterrole.go +++ b/applyconfigurations/rbac/v1/clusterrole.go @@ -124,15 +124,6 @@ func (b *ClusterRoleApplyConfiguration) WithNamespace(value string) *ClusterRole return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ClusterRoleApplyConfiguration) WithSelfLink(value string) *ClusterRoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/rbac/v1/clusterrolebinding.go b/applyconfigurations/rbac/v1/clusterrolebinding.go index d17fc6e55..560566bee 100644 --- a/applyconfigurations/rbac/v1/clusterrolebinding.go +++ b/applyconfigurations/rbac/v1/clusterrolebinding.go @@ -124,15 +124,6 @@ func (b *ClusterRoleBindingApplyConfiguration) WithNamespace(value string) *Clus return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ClusterRoleBindingApplyConfiguration) WithSelfLink(value string) *ClusterRoleBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/rbac/v1/role.go b/applyconfigurations/rbac/v1/role.go index 854441bbd..796063d53 100644 --- a/applyconfigurations/rbac/v1/role.go +++ b/applyconfigurations/rbac/v1/role.go @@ -125,15 +125,6 @@ func (b *RoleApplyConfiguration) WithNamespace(value string) *RoleApplyConfigura return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *RoleApplyConfiguration) WithSelfLink(value string) *RoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/rbac/v1/rolebinding.go b/applyconfigurations/rbac/v1/rolebinding.go index 88075a70d..f2f3f5818 100644 --- a/applyconfigurations/rbac/v1/rolebinding.go +++ b/applyconfigurations/rbac/v1/rolebinding.go @@ -126,15 +126,6 @@ func (b *RoleBindingApplyConfiguration) WithNamespace(value string) *RoleBinding return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *RoleBindingApplyConfiguration) WithSelfLink(value string) *RoleBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/rbac/v1alpha1/clusterrole.go b/applyconfigurations/rbac/v1alpha1/clusterrole.go index ae9cfc474..d7a3fac1d 100644 --- a/applyconfigurations/rbac/v1alpha1/clusterrole.go +++ b/applyconfigurations/rbac/v1alpha1/clusterrole.go @@ -124,15 +124,6 @@ func (b *ClusterRoleApplyConfiguration) WithNamespace(value string) *ClusterRole return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ClusterRoleApplyConfiguration) WithSelfLink(value string) *ClusterRoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go b/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go index f5a2c03bb..79cedc83a 100644 --- a/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go +++ b/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go @@ -124,15 +124,6 @@ func (b *ClusterRoleBindingApplyConfiguration) WithNamespace(value string) *Clus return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ClusterRoleBindingApplyConfiguration) WithSelfLink(value string) *ClusterRoleBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/rbac/v1alpha1/role.go b/applyconfigurations/rbac/v1alpha1/role.go index ec5bebcec..6d9b141e0 100644 --- a/applyconfigurations/rbac/v1alpha1/role.go +++ b/applyconfigurations/rbac/v1alpha1/role.go @@ -125,15 +125,6 @@ func (b *RoleApplyConfiguration) WithNamespace(value string) *RoleApplyConfigura return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *RoleApplyConfiguration) WithSelfLink(value string) *RoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/rbac/v1alpha1/rolebinding.go b/applyconfigurations/rbac/v1alpha1/rolebinding.go index 930f9489f..0aa5dfd13 100644 --- a/applyconfigurations/rbac/v1alpha1/rolebinding.go +++ b/applyconfigurations/rbac/v1alpha1/rolebinding.go @@ -126,15 +126,6 @@ func (b *RoleBindingApplyConfiguration) WithNamespace(value string) *RoleBinding return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *RoleBindingApplyConfiguration) WithSelfLink(value string) *RoleBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/rbac/v1beta1/clusterrole.go b/applyconfigurations/rbac/v1beta1/clusterrole.go index 1574f8f66..316659834 100644 --- a/applyconfigurations/rbac/v1beta1/clusterrole.go +++ b/applyconfigurations/rbac/v1beta1/clusterrole.go @@ -124,15 +124,6 @@ func (b *ClusterRoleApplyConfiguration) WithNamespace(value string) *ClusterRole return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ClusterRoleApplyConfiguration) WithSelfLink(value string) *ClusterRoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/rbac/v1beta1/clusterrolebinding.go b/applyconfigurations/rbac/v1beta1/clusterrolebinding.go index 152a23b49..7619a36d4 100644 --- a/applyconfigurations/rbac/v1beta1/clusterrolebinding.go +++ b/applyconfigurations/rbac/v1beta1/clusterrolebinding.go @@ -124,15 +124,6 @@ func (b *ClusterRoleBindingApplyConfiguration) WithNamespace(value string) *Clus return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ClusterRoleBindingApplyConfiguration) WithSelfLink(value string) *ClusterRoleBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/rbac/v1beta1/role.go b/applyconfigurations/rbac/v1beta1/role.go index dc6ff2a40..97f1ce5e0 100644 --- a/applyconfigurations/rbac/v1beta1/role.go +++ b/applyconfigurations/rbac/v1beta1/role.go @@ -125,15 +125,6 @@ func (b *RoleApplyConfiguration) WithNamespace(value string) *RoleApplyConfigura return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *RoleApplyConfiguration) WithSelfLink(value string) *RoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/rbac/v1beta1/rolebinding.go b/applyconfigurations/rbac/v1beta1/rolebinding.go index aeef6ec8f..8d7e3221e 100644 --- a/applyconfigurations/rbac/v1beta1/rolebinding.go +++ b/applyconfigurations/rbac/v1beta1/rolebinding.go @@ -126,15 +126,6 @@ func (b *RoleBindingApplyConfiguration) WithNamespace(value string) *RoleBinding return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *RoleBindingApplyConfiguration) WithSelfLink(value string) *RoleBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/scheduling/v1/priorityclass.go b/applyconfigurations/scheduling/v1/priorityclass.go index 5d528ea7c..8b9c3575e 100644 --- a/applyconfigurations/scheduling/v1/priorityclass.go +++ b/applyconfigurations/scheduling/v1/priorityclass.go @@ -127,15 +127,6 @@ func (b *PriorityClassApplyConfiguration) WithNamespace(value string) *PriorityC return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PriorityClassApplyConfiguration) WithSelfLink(value string) *PriorityClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/scheduling/v1alpha1/priorityclass.go b/applyconfigurations/scheduling/v1alpha1/priorityclass.go index 2b2aac316..a0a190bf9 100644 --- a/applyconfigurations/scheduling/v1alpha1/priorityclass.go +++ b/applyconfigurations/scheduling/v1alpha1/priorityclass.go @@ -127,15 +127,6 @@ func (b *PriorityClassApplyConfiguration) WithNamespace(value string) *PriorityC return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PriorityClassApplyConfiguration) WithSelfLink(value string) *PriorityClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/scheduling/v1beta1/priorityclass.go b/applyconfigurations/scheduling/v1beta1/priorityclass.go index 14b1feea6..a3d97dbcc 100644 --- a/applyconfigurations/scheduling/v1beta1/priorityclass.go +++ b/applyconfigurations/scheduling/v1beta1/priorityclass.go @@ -127,15 +127,6 @@ func (b *PriorityClassApplyConfiguration) WithNamespace(value string) *PriorityC return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *PriorityClassApplyConfiguration) WithSelfLink(value string) *PriorityClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/storage/v1/csidriver.go b/applyconfigurations/storage/v1/csidriver.go index cf9073a0f..bc6c85fbe 100644 --- a/applyconfigurations/storage/v1/csidriver.go +++ b/applyconfigurations/storage/v1/csidriver.go @@ -123,15 +123,6 @@ func (b *CSIDriverApplyConfiguration) WithNamespace(value string) *CSIDriverAppl return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *CSIDriverApplyConfiguration) WithSelfLink(value string) *CSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/storage/v1/csinode.go b/applyconfigurations/storage/v1/csinode.go index e65582d89..acc3a2922 100644 --- a/applyconfigurations/storage/v1/csinode.go +++ b/applyconfigurations/storage/v1/csinode.go @@ -123,15 +123,6 @@ func (b *CSINodeApplyConfiguration) WithNamespace(value string) *CSINodeApplyCon return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *CSINodeApplyConfiguration) WithSelfLink(value string) *CSINodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/storage/v1/storageclass.go b/applyconfigurations/storage/v1/storageclass.go index 2df999c24..6994a71aa 100644 --- a/applyconfigurations/storage/v1/storageclass.go +++ b/applyconfigurations/storage/v1/storageclass.go @@ -131,15 +131,6 @@ func (b *StorageClassApplyConfiguration) WithNamespace(value string) *StorageCla return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *StorageClassApplyConfiguration) WithSelfLink(value string) *StorageClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/storage/v1/volumeattachment.go b/applyconfigurations/storage/v1/volumeattachment.go index 5fd3d4d8e..3e87a98fa 100644 --- a/applyconfigurations/storage/v1/volumeattachment.go +++ b/applyconfigurations/storage/v1/volumeattachment.go @@ -124,15 +124,6 @@ func (b *VolumeAttachmentApplyConfiguration) WithNamespace(value string) *Volume return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *VolumeAttachmentApplyConfiguration) WithSelfLink(value string) *VolumeAttachmentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/storage/v1alpha1/csistoragecapacity.go b/applyconfigurations/storage/v1alpha1/csistoragecapacity.go index a7ad0717b..09645fe38 100644 --- a/applyconfigurations/storage/v1alpha1/csistoragecapacity.go +++ b/applyconfigurations/storage/v1alpha1/csistoragecapacity.go @@ -129,15 +129,6 @@ func (b *CSIStorageCapacityApplyConfiguration) WithNamespace(value string) *CSIS return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithSelfLink(value string) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/storage/v1alpha1/volumeattachment.go b/applyconfigurations/storage/v1alpha1/volumeattachment.go index 7a3091964..33031eb35 100644 --- a/applyconfigurations/storage/v1alpha1/volumeattachment.go +++ b/applyconfigurations/storage/v1alpha1/volumeattachment.go @@ -124,15 +124,6 @@ func (b *VolumeAttachmentApplyConfiguration) WithNamespace(value string) *Volume return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *VolumeAttachmentApplyConfiguration) WithSelfLink(value string) *VolumeAttachmentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/storage/v1beta1/csidriver.go b/applyconfigurations/storage/v1beta1/csidriver.go index 4ff0fcdf1..fdd839f57 100644 --- a/applyconfigurations/storage/v1beta1/csidriver.go +++ b/applyconfigurations/storage/v1beta1/csidriver.go @@ -123,15 +123,6 @@ func (b *CSIDriverApplyConfiguration) WithNamespace(value string) *CSIDriverAppl return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *CSIDriverApplyConfiguration) WithSelfLink(value string) *CSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/storage/v1beta1/csinode.go b/applyconfigurations/storage/v1beta1/csinode.go index fce97b456..fd2f5fad9 100644 --- a/applyconfigurations/storage/v1beta1/csinode.go +++ b/applyconfigurations/storage/v1beta1/csinode.go @@ -123,15 +123,6 @@ func (b *CSINodeApplyConfiguration) WithNamespace(value string) *CSINodeApplyCon return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *CSINodeApplyConfiguration) WithSelfLink(value string) *CSINodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/storage/v1beta1/csistoragecapacity.go b/applyconfigurations/storage/v1beta1/csistoragecapacity.go index afd2e2a9e..92482411e 100644 --- a/applyconfigurations/storage/v1beta1/csistoragecapacity.go +++ b/applyconfigurations/storage/v1beta1/csistoragecapacity.go @@ -129,15 +129,6 @@ func (b *CSIStorageCapacityApplyConfiguration) WithNamespace(value string) *CSIS return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithSelfLink(value string) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/storage/v1beta1/storageclass.go b/applyconfigurations/storage/v1beta1/storageclass.go index a4b924ee8..41eb350c7 100644 --- a/applyconfigurations/storage/v1beta1/storageclass.go +++ b/applyconfigurations/storage/v1beta1/storageclass.go @@ -131,15 +131,6 @@ func (b *StorageClassApplyConfiguration) WithNamespace(value string) *StorageCla return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *StorageClassApplyConfiguration) WithSelfLink(value string) *StorageClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. diff --git a/applyconfigurations/storage/v1beta1/volumeattachment.go b/applyconfigurations/storage/v1beta1/volumeattachment.go index 553bfee98..b6f8c8e75 100644 --- a/applyconfigurations/storage/v1beta1/volumeattachment.go +++ b/applyconfigurations/storage/v1beta1/volumeattachment.go @@ -124,15 +124,6 @@ func (b *VolumeAttachmentApplyConfiguration) WithNamespace(value string) *Volume return b } -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *VolumeAttachmentApplyConfiguration) WithSelfLink(value string) *VolumeAttachmentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. From a7d2e0118033720853dcd4aaa50b3b971387262d Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Mon, 14 Feb 2022 19:46:02 -0800 Subject: [PATCH 052/111] Merge pull request #107527 from wojtek-t/remove_selflink_ga Graduate RemoveSelfLink to Stable Kubernetes-commit: e42e2e877f01d28d886ebe5b855ff0f16ffca680 --- go.mod | 4 ++-- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 00100bc2b..cb6028071 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.27.1 k8s.io/api v0.0.0-20220211180231-29fd43e6ca1e - k8s.io/apimachinery v0.0.0-20220211180034-1a1682da6e3c + k8s.io/apimachinery v0.0.0-20220215034602-14143357d417 k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -41,5 +41,5 @@ require ( replace ( k8s.io/api => k8s.io/api v0.0.0-20220211180231-29fd43e6ca1e - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220211180034-1a1682da6e3c + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220215034602-14143357d417 ) diff --git a/go.sum b/go.sum index c9ad23d3b..1fa86a73f 100644 --- a/go.sum +++ b/go.sum @@ -614,8 +614,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20220211180231-29fd43e6ca1e h1:yXpTN5xO/yZqIouUTCMDCacOcNa+0Ycy/1tVJltMGe0= k8s.io/api v0.0.0-20220211180231-29fd43e6ca1e/go.mod h1:eqKeSWEJHaiCAExYjXn8c59z8QbcBfB1mDZxz2KB0bA= -k8s.io/apimachinery v0.0.0-20220211180034-1a1682da6e3c h1:yqNX4hYvquMkOzQ2ed1SdywKRMSE3ASNHXXTFpfUPH0= -k8s.io/apimachinery v0.0.0-20220211180034-1a1682da6e3c/go.mod h1:NkKr4Y6EHrxZYK5GCJIxxio58KsT/e3jmTsC9u1PYlA= +k8s.io/apimachinery v0.0.0-20220215034602-14143357d417 h1:W/775y0B+ZMNzve0SjV0LlG1u3VA+m6ZMn+y5tSQxs8= +k8s.io/apimachinery v0.0.0-20220215034602-14143357d417/go.mod h1:NkKr4Y6EHrxZYK5GCJIxxio58KsT/e3jmTsC9u1PYlA= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 50aa9bbadbb0eef95b2968688b23af307bc8b314 Mon Sep 17 00:00:00 2001 From: Stephen Augustus Date: Sat, 18 Dec 2021 15:41:57 -0500 Subject: [PATCH 053/111] [go1.18] Bump golang.org/x/... dependencies hack/pin-dependency.sh golang.org/x/crypto master hack/pin-dependency.sh golang.org/x/net master hack/pin-dependency.sh golang.org/x/oauth2 master hack/pin-dependency.sh golang.org/x/sync master hack/pin-dependency.sh golang.org/x/sys master hack/pin-dependency.sh golang.org/x/term master hack/pin-dependency.sh golang.org/x/time master hack/pin-dependency.sh golang.org/x/tools master Signed-off-by: Stephen Augustus Kubernetes-commit: e6e7a42480f235949a11e0f14a3b8a60ba43bcb0 --- go.mod | 29 ++++++++++++++++++++--------- go.sum | 4 ---- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index cb6028071..4358761d7 100644 --- a/go.mod +++ b/go.mod @@ -24,14 +24,14 @@ require ( github.com/peterbourgon/diskv v2.0.1+incompatible github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 - golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect - golang.org/x/net v0.0.0-20211209124913-491a49abca63 - golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f - golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b - golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac + golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect + golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd + golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 + golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220211180231-29fd43e6ca1e - k8s.io/apimachinery v0.0.0-20220215034602-14143357d417 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -40,6 +40,17 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220211180231-29fd43e6ca1e - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220215034602-14143357d417 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) + +replace golang.org/x/crypto => golang.org/x/crypto v0.0.0-20220214200702-86341886e292 + +replace golang.org/x/net => golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd + +replace golang.org/x/oauth2 => golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 + +replace golang.org/x/term => golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 + +replace golang.org/x/time => golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 diff --git a/go.sum b/go.sum index 1fa86a73f..0953338fe 100644 --- a/go.sum +++ b/go.sum @@ -612,10 +612,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220211180231-29fd43e6ca1e h1:yXpTN5xO/yZqIouUTCMDCacOcNa+0Ycy/1tVJltMGe0= -k8s.io/api v0.0.0-20220211180231-29fd43e6ca1e/go.mod h1:eqKeSWEJHaiCAExYjXn8c59z8QbcBfB1mDZxz2KB0bA= -k8s.io/apimachinery v0.0.0-20220215034602-14143357d417 h1:W/775y0B+ZMNzve0SjV0LlG1u3VA+m6ZMn+y5tSQxs8= -k8s.io/apimachinery v0.0.0-20220215034602-14143357d417/go.mod h1:NkKr4Y6EHrxZYK5GCJIxxio58KsT/e3jmTsC9u1PYlA= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From dade88bed78415689d64eae9ad8c2a4c73aa05b1 Mon Sep 17 00:00:00 2001 From: Stephen Augustus Date: Sat, 18 Dec 2021 15:55:39 -0500 Subject: [PATCH 054/111] generated: Run hack/lint-dependencies.sh and hack/update-vendor.sh Also runs: hack/pin-dependency.sh golang.org/x/mod \ v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 Signed-off-by: Stephen Augustus Kubernetes-commit: 4b1bd548bbe4d71609c65b050b69f63af1ca81d1 --- go.mod | 10 ---------- go.sum | 26 ++++++++++++++------------ 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index 4358761d7..67931750d 100644 --- a/go.mod +++ b/go.mod @@ -44,13 +44,3 @@ replace ( k8s.io/apimachinery => ../apimachinery k8s.io/client-go => ../client-go ) - -replace golang.org/x/crypto => golang.org/x/crypto v0.0.0-20220214200702-86341886e292 - -replace golang.org/x/net => golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd - -replace golang.org/x/oauth2 => golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 - -replace golang.org/x/term => golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 - -replace golang.org/x/time => golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 diff --git a/go.sum b/go.sum index 0953338fe..7921160e0 100644 --- a/go.sum +++ b/go.sum @@ -264,8 +264,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -337,8 +337,9 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= -golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -350,8 +351,8 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -407,11 +408,12 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -425,8 +427,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= From 41e0447e772813a0942f06f64f9eaf07a70cbdf8 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Mon, 21 Feb 2022 07:46:15 -0800 Subject: [PATCH 055/111] Merge pull request #107105 from justaugustus/go118 golang: Update to go1.18rc1 Kubernetes-commit: bda996e6a7cd115d76ebf1e0c127bee68e06269a --- go.mod | 9 ++++----- go.sum | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 67931750d..f0a2757cc 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0 - k8s.io/apimachinery v0.0.0 + k8s.io/api v0.0.0-20220221180259-1b1f1b71391a + k8s.io/apimachinery v0.0.0-20220221180106-4f3ae9f49dfd k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -40,7 +40,6 @@ require ( ) replace ( - k8s.io/api => ../api - k8s.io/apimachinery => ../apimachinery - k8s.io/client-go => ../client-go + k8s.io/api => k8s.io/api v0.0.0-20220221180259-1b1f1b71391a + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220221180106-4f3ae9f49dfd ) diff --git a/go.sum b/go.sum index 7921160e0..b5608617a 100644 --- a/go.sum +++ b/go.sum @@ -614,6 +614,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.0.0-20220221180259-1b1f1b71391a h1:ML6/aBZtqMi2K+l616/Z4dch6xDjm5yzQk57jWEmzjc= +k8s.io/api v0.0.0-20220221180259-1b1f1b71391a/go.mod h1:yCyzcivy4x5q7/J89ZAVZ4hyNaWQ0xclW3Q0EVO/+O0= +k8s.io/apimachinery v0.0.0-20220221180106-4f3ae9f49dfd h1:tNlq8z78sk9bvzg1ooRot5Q6s2vVlDZBWNHuVG98Zek= +k8s.io/apimachinery v0.0.0-20220221180106-4f3ae9f49dfd/go.mod h1:6HjHJr7AD3yHuu+gOdE3O1dqE21lBVCDBk5W7wry/WI= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 83bb1e3ff26c9b30cc3050049f54dafc27e132c4 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Thu, 17 Feb 2022 16:51:55 +0100 Subject: [PATCH 056/111] client-go: remove no longer used finalURLTemplate The restclient metrics were updated to track only the host field of the url, the finalURLTemplate is not longer needed, its only goal was to replace name and namespace in the path to avoid cardinality. Kubernetes-commit: bebf5a608f68523fc430a44f6db26b16022dc862 --- rest/request.go | 82 +----------------- rest/request_test.go | 200 ------------------------------------------- 2 files changed, 2 insertions(+), 280 deletions(-) diff --git a/rest/request.go b/rest/request.go index 5cc9900b0..93b6e057e 100644 --- a/rest/request.go +++ b/rest/request.go @@ -496,84 +496,6 @@ func (r *Request) URL() *url.URL { return finalURL } -// finalURLTemplate is similar to URL(), but will make all specific parameter values equal -// - instead of name or namespace, "{name}" and "{namespace}" will be used, and all query -// parameters will be reset. This creates a copy of the url so as not to change the -// underlying object. -func (r Request) finalURLTemplate() url.URL { - newParams := url.Values{} - v := []string{"{value}"} - for k := range r.params { - newParams[k] = v - } - r.params = newParams - url := r.URL() - - segments := strings.Split(url.Path, "/") - groupIndex := 0 - index := 0 - trimmedBasePath := "" - if url != nil && r.c.base != nil && strings.Contains(url.Path, r.c.base.Path) { - p := strings.TrimPrefix(url.Path, r.c.base.Path) - if !strings.HasPrefix(p, "/") { - p = "/" + p - } - // store the base path that we have trimmed so we can append it - // before returning the URL - trimmedBasePath = r.c.base.Path - segments = strings.Split(p, "/") - groupIndex = 1 - } - if len(segments) <= 2 { - return *url - } - - const CoreGroupPrefix = "api" - const NamedGroupPrefix = "apis" - isCoreGroup := segments[groupIndex] == CoreGroupPrefix - isNamedGroup := segments[groupIndex] == NamedGroupPrefix - if isCoreGroup { - // checking the case of core group with /api/v1/... format - index = groupIndex + 2 - } else if isNamedGroup { - // checking the case of named group with /apis/apps/v1/... format - index = groupIndex + 3 - } else { - // this should not happen that the only two possibilities are /api... and /apis..., just want to put an - // outlet here in case more API groups are added in future if ever possible: - // https://kubernetes.io/docs/concepts/overview/kubernetes-api/#api-groups - // if a wrong API groups name is encountered, return the {prefix} for url.Path - url.Path = "/{prefix}" - url.RawQuery = "" - return *url - } - //switch segLength := len(segments) - index; segLength { - switch { - // case len(segments) - index == 1: - // resource (with no name) do nothing - case len(segments)-index == 2: - // /$RESOURCE/$NAME: replace $NAME with {name} - segments[index+1] = "{name}" - case len(segments)-index == 3: - if segments[index+2] == "finalize" || segments[index+2] == "status" { - // /$RESOURCE/$NAME/$SUBRESOURCE: replace $NAME with {name} - segments[index+1] = "{name}" - } else { - // /namespace/$NAMESPACE/$RESOURCE: replace $NAMESPACE with {namespace} - segments[index+1] = "{namespace}" - } - case len(segments)-index >= 4: - segments[index+1] = "{namespace}" - // /namespace/$NAMESPACE/$RESOURCE/$NAME: replace $NAMESPACE with {namespace}, $NAME with {name} - if segments[index+3] != "finalize" && segments[index+3] != "status" { - // /$RESOURCE/$NAME/$SUBRESOURCE: replace $NAME with {name} - segments[index+3] = "{name}" - } - } - url.Path = path.Join(trimmedBasePath, path.Join(segments...)) - return *url -} - func (r *Request) tryThrottleWithInfo(ctx context.Context, retryInfo string) error { if r.rateLimiter == nil { return nil @@ -601,7 +523,7 @@ func (r *Request) tryThrottleWithInfo(ctx context.Context, retryInfo string) err // but we use a throttled logger to prevent spamming. globalThrottledLogger.Infof("%s", message) } - metrics.RateLimiterLatency.Observe(ctx, r.verb, r.finalURLTemplate(), latency) + metrics.RateLimiterLatency.Observe(ctx, r.verb, *r.URL(), latency) return err } @@ -929,7 +851,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp //Metrics for total request latency start := time.Now() defer func() { - metrics.RequestLatency.Observe(ctx, r.verb, r.finalURLTemplate(), time.Since(start)) + metrics.RequestLatency.Observe(ctx, r.verb, *r.URL(), time.Since(start)) }() if r.err != nil { diff --git a/rest/request_test.go b/rest/request_test.go index 8e9bb92b5..f2130cbf2 100644 --- a/rest/request_test.go +++ b/rest/request_test.go @@ -337,206 +337,6 @@ func TestResultIntoWithNoBodyReturnsErr(t *testing.T) { } } -func TestURLTemplate(t *testing.T) { - uri, _ := url.Parse("http://localhost/some/base/url/path") - uriSingleSlash, _ := url.Parse("http://localhost/") - testCases := []struct { - Request *Request - ExpectedFullURL string - ExpectedFinalURL string - }{ - { - // non dynamic client - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("POST"). - Prefix("api", "v1").Resource("r1").Namespace("ns").Name("nm").Param("p0", "v0"), - ExpectedFullURL: "http://localhost/some/base/url/path/api/v1/namespaces/ns/r1/nm?p0=v0", - ExpectedFinalURL: "http://localhost/some/base/url/path/api/v1/namespaces/%7Bnamespace%7D/r1/%7Bname%7D?p0=%7Bvalue%7D", - }, - { - // non dynamic client with wrong api group - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("POST"). - Prefix("pre1", "v1").Resource("r1").Namespace("ns").Name("nm").Param("p0", "v0"), - ExpectedFullURL: "http://localhost/some/base/url/path/pre1/v1/namespaces/ns/r1/nm?p0=v0", - ExpectedFinalURL: "http://localhost/%7Bprefix%7D", - }, - { - // dynamic client with core group + namespace + resourceResource (with name) - // /api/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/api/v1/namespaces/ns/r1/name1"), - ExpectedFullURL: "http://localhost/some/base/url/path/api/v1/namespaces/ns/r1/name1", - ExpectedFinalURL: "http://localhost/some/base/url/path/api/v1/namespaces/%7Bnamespace%7D/r1/%7Bname%7D", - }, - { - // dynamic client with named group + namespace + resourceResource (with name) - // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/apis/g1/v1/namespaces/ns/r1/name1"), - ExpectedFullURL: "http://localhost/some/base/url/path/apis/g1/v1/namespaces/ns/r1/name1", - ExpectedFinalURL: "http://localhost/some/base/url/path/apis/g1/v1/namespaces/%7Bnamespace%7D/r1/%7Bname%7D", - }, - { - // dynamic client with core group + namespace + resourceResource (with NO name) - // /api/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/api/v1/namespaces/ns/r1"), - ExpectedFullURL: "http://localhost/some/base/url/path/api/v1/namespaces/ns/r1", - ExpectedFinalURL: "http://localhost/some/base/url/path/api/v1/namespaces/%7Bnamespace%7D/r1", - }, - { - // dynamic client with named group + namespace + resourceResource (with NO name) - // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/apis/g1/v1/namespaces/ns/r1"), - ExpectedFullURL: "http://localhost/some/base/url/path/apis/g1/v1/namespaces/ns/r1", - ExpectedFinalURL: "http://localhost/some/base/url/path/apis/g1/v1/namespaces/%7Bnamespace%7D/r1", - }, - { - // dynamic client with core group + resourceResource (with name) - // /api/$RESOURCEVERSION/$RESOURCE/%NAME - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/api/v1/r1/name1"), - ExpectedFullURL: "http://localhost/some/base/url/path/api/v1/r1/name1", - ExpectedFinalURL: "http://localhost/some/base/url/path/api/v1/r1/%7Bname%7D", - }, - { - // dynamic client with named group + resourceResource (with name) - // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/$RESOURCE/%NAME - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/apis/g1/v1/r1/name1"), - ExpectedFullURL: "http://localhost/some/base/url/path/apis/g1/v1/r1/name1", - ExpectedFinalURL: "http://localhost/some/base/url/path/apis/g1/v1/r1/%7Bname%7D", - }, - { - // dynamic client with named group + namespace + resourceResource (with name) + subresource - // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME/$SUBRESOURCE - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/apis/namespaces/namespaces/namespaces/namespaces/namespaces/namespaces/finalize"), - ExpectedFullURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/namespaces/namespaces/namespaces/finalize", - ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bnamespace%7D/namespaces/%7Bname%7D/finalize", - }, - { - // dynamic client with named group + namespace + resourceResource (with name) - // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/apis/namespaces/namespaces/namespaces/namespaces/namespaces/namespaces"), - ExpectedFullURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/namespaces/namespaces/namespaces", - ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bnamespace%7D/namespaces/%7Bname%7D", - }, - { - // dynamic client with named group + namespace + resourceResource (with NO name) + subresource - // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%SUBRESOURCE - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/apis/namespaces/namespaces/namespaces/namespaces/namespaces/finalize"), - ExpectedFullURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/namespaces/namespaces/finalize", - ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bnamespace%7D/namespaces/finalize", - }, - { - // dynamic client with named group + namespace + resourceResource (with NO name) + subresource - // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%SUBRESOURCE - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/apis/namespaces/namespaces/namespaces/namespaces/namespaces/status"), - ExpectedFullURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/namespaces/namespaces/status", - ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bnamespace%7D/namespaces/status", - }, - { - // dynamic client with named group + namespace + resourceResource (with no name) - // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/apis/namespaces/namespaces/namespaces/namespaces/namespaces"), - ExpectedFullURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/namespaces/namespaces", - ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bnamespace%7D/namespaces", - }, - { - // dynamic client with named group + resourceResource (with name) + subresource - // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/apis/namespaces/namespaces/namespaces/namespaces/finalize"), - ExpectedFullURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/namespaces/finalize", - ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bname%7D/finalize", - }, - { - // dynamic client with named group + resourceResource (with name) + subresource - // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/apis/namespaces/namespaces/namespaces/namespaces/status"), - ExpectedFullURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/namespaces/status", - ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bname%7D/status", - }, - { - // dynamic client with named group + resourceResource (with name) - // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/$RESOURCE/%NAME - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/apis/namespaces/namespaces/namespaces/namespaces"), - ExpectedFullURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/namespaces", - ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces/%7Bname%7D", - }, - { - // dynamic client with named group + resourceResource (with no name) - // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/$RESOURCE/%NAME - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/apis/namespaces/namespaces/namespaces"), - ExpectedFullURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces", - ExpectedFinalURL: "http://localhost/some/base/url/path/apis/namespaces/namespaces/namespaces", - }, - { - // dynamic client with wrong api group + namespace + resourceResource (with name) + subresource - // /apis/$NAMEDGROUPNAME/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME/$SUBRESOURCE - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/pre1/namespaces/namespaces/namespaces/namespaces/namespaces/namespaces/finalize"), - ExpectedFullURL: "http://localhost/some/base/url/path/pre1/namespaces/namespaces/namespaces/namespaces/namespaces/namespaces/finalize", - ExpectedFinalURL: "http://localhost/%7Bprefix%7D", - }, - { - // dynamic client with core group + namespace + resourceResource (with name) where baseURL is a single / - // /api/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME - Request: NewRequestWithClient(uriSingleSlash, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/api/v1/namespaces/ns/r2/name1"), - ExpectedFullURL: "http://localhost/api/v1/namespaces/ns/r2/name1", - ExpectedFinalURL: "http://localhost/api/v1/namespaces/%7Bnamespace%7D/r2/%7Bname%7D", - }, - { - // dynamic client with core group + namespace + resourceResource (with name) where baseURL is 'some/base/url/path' - // /api/$RESOURCEVERSION/namespaces/$NAMESPACE/$RESOURCE/%NAME - Request: NewRequestWithClient(uri, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/api/v1/namespaces/ns/r3/name1"), - ExpectedFullURL: "http://localhost/some/base/url/path/api/v1/namespaces/ns/r3/name1", - ExpectedFinalURL: "http://localhost/some/base/url/path/api/v1/namespaces/%7Bnamespace%7D/r3/%7Bname%7D", - }, - { - // dynamic client where baseURL is a single / - // / - Request: NewRequestWithClient(uriSingleSlash, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/"), - ExpectedFullURL: "http://localhost/", - ExpectedFinalURL: "http://localhost/", - }, - { - // dynamic client where baseURL is a single / - // /version - Request: NewRequestWithClient(uriSingleSlash, "", ClientContentConfig{GroupVersion: schema.GroupVersion{Group: "test"}}, nil).Verb("DELETE"). - Prefix("/version"), - ExpectedFullURL: "http://localhost/version", - ExpectedFinalURL: "http://localhost/version", - }, - } - for i, testCase := range testCases { - r := testCase.Request - full := r.URL() - if full.String() != testCase.ExpectedFullURL { - t.Errorf("%d: unexpected initial URL: %s %s", i, full, testCase.ExpectedFullURL) - } - actualURL := r.finalURLTemplate() - actual := actualURL.String() - if actual != testCase.ExpectedFinalURL { - t.Errorf("%d: unexpected URL template: %s %s", i, actual, testCase.ExpectedFinalURL) - } - if r.URL().String() != full.String() { - t.Errorf("%d, creating URL template changed request: %s -> %s", i, full.String(), r.URL().String()) - } - } -} - func TestTransformResponse(t *testing.T) { invalid := []byte("aaaaa") uri, _ := url.Parse("http://localhost") From e4ecde2cf0c38df18abb14635cf72e907b923b98 Mon Sep 17 00:00:00 2001 From: Abu Kashem Date: Mon, 21 Feb 2022 13:53:23 -0500 Subject: [PATCH 057/111] client-go: add unit test to verify order of calls Kubernetes-commit: f6a66bbe051d2c7d537cf9033cc800babbb1a74b --- rest/request_test.go | 258 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 256 insertions(+), 2 deletions(-) diff --git a/rest/request_test.go b/rest/request_test.go index f2130cbf2..c69b04dcd 100644 --- a/rest/request_test.go +++ b/rest/request_test.go @@ -36,8 +36,7 @@ import ( "testing" "time" - "k8s.io/klog/v2" - + "github.com/google/go-cmp/cmp" v1 "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -52,8 +51,10 @@ import ( "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/kubernetes/scheme" restclientwatch "k8s.io/client-go/rest/watch" + "k8s.io/client-go/tools/metrics" "k8s.io/client-go/util/flowcontrol" utiltesting "k8s.io/client-go/util/testing" + "k8s.io/klog/v2" testingclock "k8s.io/utils/clock/testing" ) @@ -2555,6 +2556,34 @@ func TestRequestWatchWithRetry(t *testing.T) { }) } +func TestRequestDoRetryWithRateLimiterBackoffAndMetrics(t *testing.T) { + // both request.Do and request.DoRaw have the same behavior and expectations + testRetryWithRateLimiterBackoffAndMetrics(t, "Do", func(ctx context.Context, r *Request) { + r.DoRaw(ctx) + }) +} + +func TestRequestStreamRetryWithRateLimiterBackoffAndMetrics(t *testing.T) { + testRetryWithRateLimiterBackoffAndMetrics(t, "Stream", func(ctx context.Context, r *Request) { + r.Stream(ctx) + }) +} + +func TestRequestWatchRetryWithRateLimiterBackoffAndMetrics(t *testing.T) { + testRetryWithRateLimiterBackoffAndMetrics(t, "Watch", func(ctx context.Context, r *Request) { + w, err := r.Watch(ctx) + if err == nil { + // in this test the the response body returned by the server is always empty, + // this will cause StreamWatcher.receive() to: + // - return an io.EOF to indicate that the watch closed normally and + // - then close the io.Reader + // since we assert on the number of times 'Close' has been called on the + // body of the response object, we need to wait here to avoid race condition. + <-w.ResultChan() + } + }) +} + func testRequestWithRetry(t *testing.T, key string, doFunc func(ctx context.Context, r *Request)) { type expected struct { attempts int @@ -2714,6 +2743,231 @@ func testRequestWithRetry(t *testing.T, key string, doFunc func(ctx context.Cont } } +type retryTestKeyType int + +const retryTestKey retryTestKeyType = iota + +// fake flowcontrol.RateLimiter so we can tap into the Wait method of the rate limiter. +// fake BackoffManager so we can tap into backoff calls +// fake metrics.ResultMetric to tap into the metric calls +// we use it to verify that RateLimiter, BackoffManager, and +// metric calls are invoked appropriately in right order. +type withRateLimiterBackoffManagerAndMetrics struct { + flowcontrol.RateLimiter + *NoBackoff + metrics.ResultMetric + backoffWaitSeconds int + + invokeOrderGot []string + sleepsGot []string + statusCodesGot []string +} + +func (lb *withRateLimiterBackoffManagerAndMetrics) Wait(ctx context.Context) error { + lb.invokeOrderGot = append(lb.invokeOrderGot, "RateLimiter.Wait") + return nil +} + +func (lb *withRateLimiterBackoffManagerAndMetrics) CalculateBackoff(actualUrl *url.URL) time.Duration { + lb.invokeOrderGot = append(lb.invokeOrderGot, "BackoffManager.CalculateBackoff") + + // we simulate a sleep sequence of 0m, 2m, 4m, 6m, ... + waitFor := time.Duration(lb.backoffWaitSeconds) * time.Minute + lb.backoffWaitSeconds += 2 + return waitFor +} + +func (lb *withRateLimiterBackoffManagerAndMetrics) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) { + lb.invokeOrderGot = append(lb.invokeOrderGot, "BackoffManager.UpdateBackoff") +} + +func (lb *withRateLimiterBackoffManagerAndMetrics) Sleep(d time.Duration) { + lb.invokeOrderGot = append(lb.invokeOrderGot, "BackoffManager.Sleep") + lb.sleepsGot = append(lb.sleepsGot, d.String()) +} + +func (lb *withRateLimiterBackoffManagerAndMetrics) Increment(ctx context.Context, code, _, _ string) { + // we are interested in the request context that is marked by this test + if marked, ok := ctx.Value(retryTestKey).(bool); ok && marked { + lb.invokeOrderGot = append(lb.invokeOrderGot, "RequestResult.Increment") + lb.statusCodesGot = append(lb.statusCodesGot, code) + } +} + +func (lb *withRateLimiterBackoffManagerAndMetrics) Do() { + lb.invokeOrderGot = append(lb.invokeOrderGot, "Client.Do") +} + +func testRetryWithRateLimiterBackoffAndMetrics(t *testing.T, key string, doFunc func(ctx context.Context, r *Request)) { + type expected struct { + attempts int + order []string + } + + // we define the expected order of how the client invokes the + // rate limiter, backoff, and metrics methods. + // scenario: + // - A: original request fails with a retryable response: (500, 'Retry-After: 1') + // - B: retry 1: successful with a status code 200 + // so we have a total of 2 attempts + invokeOrderWant := []string{ + // before we send the request to the server: + // - we wait as dictated by the client rate lmiter + // - we wait, as dictated by the backoff manager + "RateLimiter.Wait", + "BackoffManager.CalculateBackoff", + "BackoffManager.Sleep", + + // A: first attempt for which the server sends a retryable response + "Client.Do", + + // we got a response object, status code: 500, Retry-Afer: 1 + // - call metrics method with appropriate status code + // - update backoff parameters with the status code returned + // - sleep for N seconds from 'Retry-After: N' response header + "RequestResult.Increment", + "BackoffManager.UpdateBackoff", + "BackoffManager.Sleep", + // sleep for delay dictated by backoff parameters + "BackoffManager.CalculateBackoff", + "BackoffManager.Sleep", + // wait as dictated by the client rate lmiter + "RateLimiter.Wait", + + // B: 2nd attempt: retry, and this should return a status code=200 + "Client.Do", + + // it's a success, so do the following: + // - call metrics and update backoff parameters + "RequestResult.Increment", + "BackoffManager.UpdateBackoff", + } + sleepWant := []string{ + // initial backoff.Sleep before we send the request to the server for the first time + "0s", + // from 'Retry-After: 1' response header (A) + (1 * time.Second).String(), + // backoff.Sleep before retry 1 (B) + (2 * time.Minute).String(), + } + statusCodesWant := []string{ + "500", + "200", + } + + tests := []struct { + name string + maxRetries int + serverReturns []responseErr + // expectations differ based on whether it is 'Watch', 'Stream' or 'Do' + expectations map[string]expected + }{ + { + name: "success after one retry", + maxRetries: 1, + serverReturns: []responseErr{ + {response: retryAfterResponse(), err: nil}, + {response: &http.Response{StatusCode: http.StatusOK}, err: nil}, + }, + expectations: map[string]expected{ + "Do": { + attempts: 2, + order: invokeOrderWant, + }, + "Watch": { + attempts: 2, + // Watch does not do 'RateLimiter.Wait' before initially sending the request to the server + order: invokeOrderWant[1:], + }, + "Stream": { + attempts: 2, + order: invokeOrderWant, + }, + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + interceptor := &withRateLimiterBackoffManagerAndMetrics{ + RateLimiter: flowcontrol.NewFakeAlwaysRateLimiter(), + NoBackoff: &NoBackoff{}, + } + + // TODO: today this is the only site where a test overrides the + // default metric interfaces, in future if we other tests want + // to override as well, and we want tests to be able to run in + // parallel then we will need to provide a way for tests to + // register/deregister their own metric inerfaces. + old := metrics.RequestResult + metrics.RequestResult = interceptor + defer func() { + metrics.RequestResult = old + }() + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + // we are changing metrics.RequestResult (a global state) in + // this test, to avoid interference from other tests running in + // parallel we need to associate a key to the context so we + // can identify the metric calls associated with this test. + ctx = context.WithValue(ctx, retryTestKey, true) + + var attempts int + client := clientForFunc(func(req *http.Request) (*http.Response, error) { + defer func() { + attempts++ + }() + + interceptor.Do() + resp := test.serverReturns[attempts].response + if resp != nil { + resp.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) + } + return resp, test.serverReturns[attempts].err + }) + + base, err := url.Parse("http://foo.bar") + if err != nil { + t.Fatalf("Wrong test setup - did not find expected for: %s", key) + } + req := &Request{ + verb: "GET", + body: bytes.NewReader([]byte{}), + c: &RESTClient{ + base: base, + content: defaultContentConfig(), + Client: client, + rateLimiter: interceptor, + }, + pathPrefix: "/api/v1", + rateLimiter: interceptor, + backoff: interceptor, + retry: &withRetry{maxRetries: test.maxRetries}, + } + + doFunc(ctx, req) + + want, ok := test.expectations[key] + if !ok { + t.Fatalf("Wrong test setup - did not find expected for: %s", key) + } + if want.attempts != attempts { + t.Errorf("%s: Expected retries: %d, but got: %d", key, want.attempts, attempts) + } + if !cmp.Equal(want.order, interceptor.invokeOrderGot) { + t.Errorf("%s: Expected invoke order to match, diff: %s", key, cmp.Diff(want.order, interceptor.invokeOrderGot)) + } + if !cmp.Equal(sleepWant, interceptor.sleepsGot) { + t.Errorf("%s: Expected sleep sequence to match, diff: %s", key, cmp.Diff(sleepWant, interceptor.sleepsGot)) + } + if !cmp.Equal(statusCodesWant, interceptor.statusCodesGot) { + t.Errorf("%s: Expected status codes to match, diff: %s", key, cmp.Diff(statusCodesWant, interceptor.statusCodesGot)) + } + }) + } +} + func TestReuseRequest(t *testing.T) { var tests = []struct { name string From 5463dac0a926981931862f9e4636854011bddbcd Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Wed, 23 Feb 2022 10:20:18 -0800 Subject: [PATCH 058/111] Merge pull request #106911 from aojea/client_go_metrics Update client-go latency metrics bucket Kubernetes-commit: 25ccc48c606f99d4d142093a84764fda9588ce1e --- go.mod | 8 ++++---- go.sum | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index f0a2757cc..e0552e433 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220221180259-1b1f1b71391a - k8s.io/apimachinery v0.0.0-20220221180106-4f3ae9f49dfd + k8s.io/api v0.0.0-20220223060836-860906f3df41 + k8s.io/apimachinery v0.0.0-20220223180110-57893b822e17 k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -40,6 +40,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220221180259-1b1f1b71391a - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220221180106-4f3ae9f49dfd + k8s.io/api => k8s.io/api v0.0.0-20220223060836-860906f3df41 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220223180110-57893b822e17 ) diff --git a/go.sum b/go.sum index b5608617a..1b98b916c 100644 --- a/go.sum +++ b/go.sum @@ -614,10 +614,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220221180259-1b1f1b71391a h1:ML6/aBZtqMi2K+l616/Z4dch6xDjm5yzQk57jWEmzjc= -k8s.io/api v0.0.0-20220221180259-1b1f1b71391a/go.mod h1:yCyzcivy4x5q7/J89ZAVZ4hyNaWQ0xclW3Q0EVO/+O0= -k8s.io/apimachinery v0.0.0-20220221180106-4f3ae9f49dfd h1:tNlq8z78sk9bvzg1ooRot5Q6s2vVlDZBWNHuVG98Zek= -k8s.io/apimachinery v0.0.0-20220221180106-4f3ae9f49dfd/go.mod h1:6HjHJr7AD3yHuu+gOdE3O1dqE21lBVCDBk5W7wry/WI= +k8s.io/api v0.0.0-20220223060836-860906f3df41 h1:POies0e3Srv3E11eNXQ/rsSkYEjVGgEUm0EjPAhbXOE= +k8s.io/api v0.0.0-20220223060836-860906f3df41/go.mod h1:yCyzcivy4x5q7/J89ZAVZ4hyNaWQ0xclW3Q0EVO/+O0= +k8s.io/apimachinery v0.0.0-20220223180110-57893b822e17 h1:GSM4GXZgU3ikAm/brF5fVMwLHWh9H9R3eJDNu4wktnQ= +k8s.io/apimachinery v0.0.0-20220223180110-57893b822e17/go.mod h1:6HjHJr7AD3yHuu+gOdE3O1dqE21lBVCDBk5W7wry/WI= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From e2c62ff0c0d7d9fda1fdc0a9905ec4a20c8418b6 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Thu, 9 Dec 2021 12:11:01 +0100 Subject: [PATCH 059/111] client-go: add request and response size metrics Get metrics for the request and response size, so we can correlate latency and size on a request, otherwise we could get confused because we don't know if the network is slow or just the request size huge. Kubernetes-commit: 64d9d0585f6dbc9266f31b6d0f795d6c0421495e --- rest/request.go | 11 +++++++++++ tools/metrics/metrics.go | 21 +++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/rest/request.go b/rest/request.go index 93b6e057e..7b63ad296 100644 --- a/rest/request.go +++ b/rest/request.go @@ -901,6 +901,11 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp } resp, err := client.Do(req) updateURLMetrics(ctx, r, resp, err) + // The value -1 or a value of 0 with a non-nil Body indicates that the length is unknown. + // https://pkg.go.dev/net/http#Request + if req.ContentLength >= 0 && !(req.Body != nil && req.ContentLength == 0) { + metrics.RequestSize.Observe(ctx, r.verb, r.URL().Host, float64(req.ContentLength)) + } if err != nil { r.backoff.UpdateBackoff(r.URL(), err, 0) } else { @@ -963,6 +968,9 @@ func (r *Request) Do(ctx context.Context) Result { if err != nil { return Result{err: err} } + if result.err == nil || len(result.body) > 0 { + metrics.ResponseSize.Observe(ctx, r.verb, r.URL().Host, float64(len(result.body))) + } return result } @@ -979,6 +987,9 @@ func (r *Request) DoRaw(ctx context.Context) ([]byte, error) { if err != nil { return nil, err } + if result.err == nil || len(result.body) > 0 { + metrics.ResponseSize.Observe(ctx, r.verb, r.URL().Host, float64(len(result.body))) + } return result.body, result.err } diff --git a/tools/metrics/metrics.go b/tools/metrics/metrics.go index 597dc8e53..6c684c7fa 100644 --- a/tools/metrics/metrics.go +++ b/tools/metrics/metrics.go @@ -42,6 +42,11 @@ type LatencyMetric interface { Observe(ctx context.Context, verb string, u url.URL, latency time.Duration) } +// SizeMetric observes client response size partitioned by verb and host. +type SizeMetric interface { + Observe(ctx context.Context, verb string, host string, size float64) +} + // ResultMetric counts response codes partitioned by method and host. type ResultMetric interface { Increment(ctx context.Context, code string, method string, host string) @@ -60,6 +65,10 @@ var ( ClientCertRotationAge DurationMetric = noopDuration{} // RequestLatency is the latency metric that rest clients will update. RequestLatency LatencyMetric = noopLatency{} + // RequestSize is the request size metric that rest clients will update. + RequestSize SizeMetric = noopSize{} + // ResponseSize is the response size metric that rest clients will update. + ResponseSize SizeMetric = noopSize{} // RateLimiterLatency is the client side rate limiter latency metric. RateLimiterLatency LatencyMetric = noopLatency{} // RequestResult is the result metric that rest clients will update. @@ -74,6 +83,8 @@ type RegisterOpts struct { ClientCertExpiry ExpiryMetric ClientCertRotationAge DurationMetric RequestLatency LatencyMetric + RequestSize SizeMetric + ResponseSize SizeMetric RateLimiterLatency LatencyMetric RequestResult ResultMetric ExecPluginCalls CallsMetric @@ -92,6 +103,12 @@ func Register(opts RegisterOpts) { if opts.RequestLatency != nil { RequestLatency = opts.RequestLatency } + if opts.RequestSize != nil { + RequestSize = opts.RequestSize + } + if opts.ResponseSize != nil { + ResponseSize = opts.ResponseSize + } if opts.RateLimiterLatency != nil { RateLimiterLatency = opts.RateLimiterLatency } @@ -116,6 +133,10 @@ type noopLatency struct{} func (noopLatency) Observe(context.Context, string, url.URL, time.Duration) {} +type noopSize struct{} + +func (noopSize) Observe(context.Context, string, string, float64) {} + type noopResult struct{} func (noopResult) Increment(context.Context, string, string, string) {} From 7e062f8fa487a661bf1fb3f7bca01fcd158db066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arda=20G=C3=BC=C3=A7l=C3=BC?= Date: Wed, 22 Dec 2021 11:14:09 +0300 Subject: [PATCH 060/111] Remove deprecated discovery/ServerResources function ServerResources function was deprecated and instead ServerGroupsAndResources function is suggested. This PR removes ServerResources function and move every place to use ServerGroupsAndResources. Kubernetes-commit: ef39a8914291ba200bd5486c88a7575ffd4b7d1d --- discovery/cached/disk/cached_discovery.go | 7 ------- .../cached/disk/cached_discovery_test.go | 14 ++++--------- discovery/cached/memory/memcache.go | 6 ------ discovery/discovery_client.go | 21 ------------------- discovery/discovery_client_test.go | 6 +++--- discovery/fake/discovery.go | 7 ------- restmapper/discovery_test.go | 9 -------- restmapper/shortcut_test.go | 6 ------ 8 files changed, 7 insertions(+), 69 deletions(-) diff --git a/discovery/cached/disk/cached_discovery.go b/discovery/cached/disk/cached_discovery.go index b759af4eb..07f8182e4 100644 --- a/discovery/cached/disk/cached_discovery.go +++ b/discovery/cached/disk/cached_discovery.go @@ -90,13 +90,6 @@ func (d *CachedDiscoveryClient) ServerResourcesForGroupVersion(groupVersion stri return liveResources, nil } -// ServerResources returns the supported resources for all groups and versions. -// Deprecated: use ServerGroupsAndResources instead. -func (d *CachedDiscoveryClient) ServerResources() ([]*metav1.APIResourceList, error) { - _, rs, err := discovery.ServerGroupsAndResources(d) - return rs, err -} - // ServerGroupsAndResources returns the supported groups and resources for all groups and versions. func (d *CachedDiscoveryClient) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { return discovery.ServerGroupsAndResources(d) diff --git a/discovery/cached/disk/cached_discovery_test.go b/discovery/cached/disk/cached_discovery_test.go index cbea2b90d..35239c2c1 100644 --- a/discovery/cached/disk/cached_discovery_test.go +++ b/discovery/cached/disk/cached_discovery_test.go @@ -54,11 +54,11 @@ func TestCachedDiscoveryClient_Fresh(t *testing.T) { assert.True(cdc.Fresh(), "should be fresh after another groups call") assert.Equal(c.groupCalls, 1) - cdc.ServerResources() + cdc.ServerGroupsAndResources() assert.True(cdc.Fresh(), "should be fresh after resources call") assert.Equal(c.resourceCalls, 1) - cdc.ServerResources() + cdc.ServerGroupsAndResources() assert.True(cdc.Fresh(), "should be fresh after another resources call") assert.Equal(c.resourceCalls, 1) @@ -67,14 +67,14 @@ func TestCachedDiscoveryClient_Fresh(t *testing.T) { assert.False(cdc.Fresh(), "should NOT be fresh after recreation with existing groups cache") assert.Equal(c.groupCalls, 1) - cdc.ServerResources() + cdc.ServerGroupsAndResources() assert.False(cdc.Fresh(), "should NOT be fresh after recreation with existing resources cache") assert.Equal(c.resourceCalls, 1) cdc.Invalidate() assert.True(cdc.Fresh(), "should be fresh after cache invalidation") - cdc.ServerResources() + cdc.ServerGroupsAndResources() assert.True(cdc.Fresh(), "should ignore existing resources cache after invalidation") assert.Equal(c.resourceCalls, 2) } @@ -172,12 +172,6 @@ func (c *fakeDiscoveryClient) ServerResourcesForGroupVersion(groupVersion string return nil, errors.NewNotFound(schema.GroupResource{}, "") } -// Deprecated: use ServerGroupsAndResources instead. -func (c *fakeDiscoveryClient) ServerResources() ([]*metav1.APIResourceList, error) { - _, rs, err := c.ServerGroupsAndResources() - return rs, err -} - func (c *fakeDiscoveryClient) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { c.resourceCalls = c.resourceCalls + 1 diff --git a/discovery/cached/memory/memcache.go b/discovery/cached/memory/memcache.go index 8b7317599..7795afeb3 100644 --- a/discovery/cached/memory/memcache.go +++ b/discovery/cached/memory/memcache.go @@ -107,12 +107,6 @@ func (d *memCacheClient) ServerResourcesForGroupVersion(groupVersion string) (*m return cachedVal.resourceList, cachedVal.err } -// ServerResources returns the supported resources for all groups and versions. -// Deprecated: use ServerGroupsAndResources instead. -func (d *memCacheClient) ServerResources() ([]*metav1.APIResourceList, error) { - return discovery.ServerResources(d) -} - // ServerGroupsAndResources returns the groups and supported resources for all groups and versions. func (d *memCacheClient) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { return discovery.ServerGroupsAndResources(d) diff --git a/discovery/discovery_client.go b/discovery/discovery_client.go index ce5eda14b..9ea89755c 100644 --- a/discovery/discovery_client.go +++ b/discovery/discovery_client.go @@ -90,13 +90,6 @@ type ServerGroupsInterface interface { type ServerResourcesInterface interface { // ServerResourcesForGroupVersion returns the supported resources for a group and version. ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) - // ServerResources returns the supported resources for all groups and versions. - // - // The returned resource list might be non-nil with partial results even in the case of - // non-nil error. - // - // Deprecated: use ServerGroupsAndResources instead. - ServerResources() ([]*metav1.APIResourceList, error) // ServerGroupsAndResources returns the supported groups and resources for all groups and versions. // // The returned group and resource lists might be non-nil with partial results even in the @@ -210,13 +203,6 @@ func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (r return resources, nil } -// ServerResources returns the supported resources for all groups and versions. -// Deprecated: use ServerGroupsAndResources instead. -func (d *DiscoveryClient) ServerResources() ([]*metav1.APIResourceList, error) { - _, rs, err := d.ServerGroupsAndResources() - return rs, err -} - // ServerGroupsAndResources returns the supported resources for all groups and versions. func (d *DiscoveryClient) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { return withRetries(defaultRetries, func() ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { @@ -247,13 +233,6 @@ func IsGroupDiscoveryFailedError(err error) bool { return err != nil && ok } -// ServerResources uses the provided discovery interface to look up supported resources for all groups and versions. -// Deprecated: use ServerGroupsAndResources instead. -func ServerResources(d DiscoveryInterface) ([]*metav1.APIResourceList, error) { - _, rs, err := ServerGroupsAndResources(d) - return rs, err -} - func ServerGroupsAndResources(d DiscoveryInterface) ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { sgs, err := d.ServerGroups() if sgs == nil { diff --git a/discovery/discovery_client_test.go b/discovery/discovery_client_test.go index 4d16f8df3..f1006beb2 100644 --- a/discovery/discovery_client_test.go +++ b/discovery/discovery_client_test.go @@ -164,7 +164,7 @@ func TestGetServerResourcesWithV1Server(t *testing.T) { defer server.Close() client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) // ServerResources should not return an error even if server returns error at /api/v1. - serverResources, err := client.ServerResources() + _, serverResources, err := client.ServerGroupsAndResources() if err != nil { t.Errorf("unexpected error: %v", err) } @@ -174,7 +174,7 @@ func TestGetServerResourcesWithV1Server(t *testing.T) { } } -func TestGetServerResources(t *testing.T) { +func TestGetServerResourcesForGroupVersion(t *testing.T) { stable := metav1.APIResourceList{ GroupVersion: "v1", APIResources: []metav1.APIResource{ @@ -365,7 +365,7 @@ func TestGetServerResources(t *testing.T) { client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) start := time.Now() - serverResources, err := client.ServerResources() + _, serverResources, err := client.ServerGroupsAndResources() if err != nil { t.Errorf("unexpected error: %v", err) } diff --git a/discovery/fake/discovery.go b/discovery/fake/discovery.go index e75c988c0..ea875955f 100644 --- a/discovery/fake/discovery.go +++ b/discovery/fake/discovery.go @@ -60,13 +60,6 @@ func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*me }} } -// ServerResources returns the supported resources for all groups and versions. -// Deprecated: use ServerGroupsAndResources instead. -func (c *FakeDiscovery) ServerResources() ([]*metav1.APIResourceList, error) { - _, rs, err := c.ServerGroupsAndResources() - return rs, err -} - // ServerGroupsAndResources returns the supported groups and resources for all groups and versions. func (c *FakeDiscovery) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { sgs, err := c.ServerGroups() diff --git a/restmapper/discovery_test.go b/restmapper/discovery_test.go index e14ccc711..722d38acb 100644 --- a/restmapper/discovery_test.go +++ b/restmapper/discovery_test.go @@ -401,10 +401,6 @@ func (d *fakeFailingDiscovery) ServerResourcesForGroupVersion(groupVersion strin return nil, fmt.Errorf("not found") } -func (d *fakeFailingDiscovery) ServerResources() ([]*metav1.APIResourceList, error) { - return ServerResources(d) -} - func (d *fakeFailingDiscovery) ServerPreferredResources() ([]*metav1.APIResourceList, error) { return ServerPreferredResources(d) } @@ -464,11 +460,6 @@ func (c *fakeCachedDiscoveryInterface) ServerResourcesForGroupVersion(groupVersi return nil, errors.NewNotFound(schema.GroupResource{}, "") } -// Deprecated: use ServerGroupsAndResources instead. -func (c *fakeCachedDiscoveryInterface) ServerResources() ([]*metav1.APIResourceList, error) { - return ServerResources(c) -} - func (c *fakeCachedDiscoveryInterface) ServerPreferredResources() ([]*metav1.APIResourceList, error) { if c.enabledGroupA { return []*metav1.APIResourceList{ diff --git a/restmapper/shortcut_test.go b/restmapper/shortcut_test.go index f0fd1f371..fc56ce47f 100644 --- a/restmapper/shortcut_test.go +++ b/restmapper/shortcut_test.go @@ -265,12 +265,6 @@ func (c *fakeDiscoveryClient) ServerResourcesForGroupVersion(groupVersion string return nil, errors.NewNotFound(schema.GroupResource{}, "") } -// Deprecated: use ServerGroupsAndResources instead. -func (c *fakeDiscoveryClient) ServerResources() ([]*metav1.APIResourceList, error) { - _, rs, err := c.ServerGroupsAndResources() - return rs, err -} - func (c *fakeDiscoveryClient) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { sgs, err := c.ServerGroups() if err != nil { From 9175c47d173882b5dc4c307b582b415692a1f690 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 16 Feb 2022 12:17:47 +0100 Subject: [PATCH 061/111] enhance and fix log calls Some of these changes are cosmetic (repeatedly calling klog.V instead of reusing the result), others address real issues: - Logging a message only above a certain verbosity threshold without recording that verbosity level (if klog.V().Enabled() { klog.Info... }): this matters when using a logging backend which records the verbosity level. - Passing a format string with parameters to a logging function that doesn't do string formatting. All of these locations where found by the enhanced logcheck tool from https://github.com/kubernetes/klog/pull/297. In some cases it reports false positives, but those can be suppressed with source code comments. Kubernetes-commit: edffc700a43e610f641907290a5152ca593bad79 --- rest/request.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rest/request.go b/rest/request.go index 86f51229e..ef9435301 100644 --- a/rest/request.go +++ b/rest/request.go @@ -1051,13 +1051,13 @@ func truncateBody(body string) string { // allocating a new string for the body output unless necessary. Uses a simple heuristic to determine // whether the body is printable. func glogBody(prefix string, body []byte) { - if klog.V(8).Enabled() { + if klogV := klog.V(8); klogV.Enabled() { if bytes.IndexFunc(body, func(r rune) bool { return r < 0x0a }) != -1 { - klog.Infof("%s:\n%s", prefix, truncateBody(hex.Dump(body))) + klogV.Infof("%s:\n%s", prefix, truncateBody(hex.Dump(body))) } else { - klog.Infof("%s: %s", prefix, truncateBody(string(body))) + klogV.Infof("%s: %s", prefix, truncateBody(string(body))) } } } From 8e46da3fd12b54a2d1726fc9a9438ff8fc38494c Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Mon, 28 Feb 2022 14:27:46 -0800 Subject: [PATCH 062/111] Merge pull request #108296 from aojea/client_go_size_metrics client-go: add request and response size metrics Kubernetes-commit: 5ee80dee042d9b83a20031469606af0d2fb8d815 --- go.mod | 8 ++++---- go.sum | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index e0552e433..073502293 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220223060836-860906f3df41 - k8s.io/apimachinery v0.0.0-20220223180110-57893b822e17 + k8s.io/api v0.0.0-20220226220324-b8c40e080bc5 + k8s.io/apimachinery v0.0.0-20220226220127-2936d3f03931 k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -40,6 +40,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220223060836-860906f3df41 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220223180110-57893b822e17 + k8s.io/api => k8s.io/api v0.0.0-20220226220324-b8c40e080bc5 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220226220127-2936d3f03931 ) diff --git a/go.sum b/go.sum index 1b98b916c..e8b70f989 100644 --- a/go.sum +++ b/go.sum @@ -614,10 +614,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220223060836-860906f3df41 h1:POies0e3Srv3E11eNXQ/rsSkYEjVGgEUm0EjPAhbXOE= -k8s.io/api v0.0.0-20220223060836-860906f3df41/go.mod h1:yCyzcivy4x5q7/J89ZAVZ4hyNaWQ0xclW3Q0EVO/+O0= -k8s.io/apimachinery v0.0.0-20220223180110-57893b822e17 h1:GSM4GXZgU3ikAm/brF5fVMwLHWh9H9R3eJDNu4wktnQ= -k8s.io/apimachinery v0.0.0-20220223180110-57893b822e17/go.mod h1:6HjHJr7AD3yHuu+gOdE3O1dqE21lBVCDBk5W7wry/WI= +k8s.io/api v0.0.0-20220226220324-b8c40e080bc5 h1:z4oqfOInb6p7EwsJbKUe2IcKaeSBWmfYEIsIdFHq6ak= +k8s.io/api v0.0.0-20220226220324-b8c40e080bc5/go.mod h1:xmVR3mDgBB2FAJoueQFwuWn03L5odGCiOKivsptcgRU= +k8s.io/apimachinery v0.0.0-20220226220127-2936d3f03931 h1:pb7vtSnIF7dReuA6s+WsakFL6vLZ4xA71kJMln9j4Pc= +k8s.io/apimachinery v0.0.0-20220226220127-2936d3f03931/go.mod h1:6HjHJr7AD3yHuu+gOdE3O1dqE21lBVCDBk5W7wry/WI= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 34f3aff43e4f1f64b182fafbc2c86bc9b644de6a Mon Sep 17 00:00:00 2001 From: Abu Kashem Date: Thu, 17 Feb 2022 16:57:45 -0500 Subject: [PATCH 063/111] client-go: refactor retry logic for backoff, rate limiter and metric Kubernetes-commit: cecc563d3b9a9438cd3e6ae1576baa0a36f2d843 --- rest/request.go | 112 ++++++++--------------------- rest/request_test.go | 156 ++++++++++++++++++++++++++++++++++++++++ rest/with_retry.go | 150 +++++++++++++++++++++++++++----------- rest/with_retry_test.go | 15 +++- 4 files changed, 306 insertions(+), 127 deletions(-) diff --git a/rest/request.go b/rest/request.go index 7b63ad296..93bed5b95 100644 --- a/rest/request.go +++ b/rest/request.go @@ -610,7 +610,6 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { } return false } - var retryAfter *RetryAfter url := r.URL().String() for { req, err := r.newHTTPRequest(ctx) @@ -618,26 +617,13 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { return nil, err } - r.backoff.Sleep(r.backoff.CalculateBackoff(r.URL())) - if retryAfter != nil { - // We are retrying the request that we already send to apiserver - // at least once before. - // This request should also be throttled with the client-internal rate limiter. - if err := r.tryThrottleWithInfo(ctx, retryAfter.Reason); err != nil { - return nil, err - } - retryAfter = nil + if err := r.retry.Before(ctx, r); err != nil { + return nil, err } resp, err := client.Do(req) updateURLMetrics(ctx, r, resp, err) - if r.c.base != nil { - if err != nil { - r.backoff.UpdateBackoff(r.c.base, err, 0) - } else { - r.backoff.UpdateBackoff(r.c.base, err, resp.StatusCode) - } - } + r.retry.After(ctx, r, resp, err) if err == nil && resp.StatusCode == http.StatusOK { return r.newStreamWatcher(resp) } @@ -645,14 +631,8 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { done, transformErr := func() (bool, error) { defer readAndCloseResponseBody(resp) - var retry bool - retryAfter, retry = r.retry.NextRetry(req, resp, err, isErrRetryableFunc) - if retry { - err := r.retry.BeforeNextRetry(ctx, r.backoff, retryAfter, url, r.body) - if err == nil { - return false, nil - } - klog.V(4).Infof("Could not retry request - %v", err) + if r.retry.IsNextRetry(ctx, r, req, resp, err, isErrRetryableFunc) { + return false, nil } if resp == nil { @@ -738,7 +718,6 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { client = http.DefaultClient } - var retryAfter *RetryAfter url := r.URL().String() for { req, err := r.newHTTPRequest(ctx) @@ -749,26 +728,13 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { req.Body = ioutil.NopCloser(r.body) } - r.backoff.Sleep(r.backoff.CalculateBackoff(r.URL())) - if retryAfter != nil { - // We are retrying the request that we already send to apiserver - // at least once before. - // This request should also be throttled with the client-internal rate limiter. - if err := r.tryThrottleWithInfo(ctx, retryAfter.Reason); err != nil { - return nil, err - } - retryAfter = nil + if err := r.retry.Before(ctx, r); err != nil { + return nil, err } resp, err := client.Do(req) updateURLMetrics(ctx, r, resp, err) - if r.c.base != nil { - if err != nil { - r.backoff.UpdateBackoff(r.URL(), err, 0) - } else { - r.backoff.UpdateBackoff(r.URL(), err, resp.StatusCode) - } - } + r.retry.After(ctx, r, resp, err) if err != nil { // we only retry on an HTTP response with 'Retry-After' header return nil, err @@ -783,14 +749,8 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { done, transformErr := func() (bool, error) { defer resp.Body.Close() - var retry bool - retryAfter, retry = r.retry.NextRetry(req, resp, err, neverRetryError) - if retry { - err := r.retry.BeforeNextRetry(ctx, r.backoff, retryAfter, url, r.body) - if err == nil { - return false, nil - } - klog.V(4).Infof("Could not retry request - %v", err) + if r.retry.IsNextRetry(ctx, r, req, resp, err, neverRetryError) { + return false, nil } result := r.transformResponse(resp, req) if err := result.Error(); err != nil { @@ -881,23 +841,29 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp defer cancel() } + isErrRetryableFunc := func(req *http.Request, err error) bool { + // "Connection reset by peer" or "apiserver is shutting down" are usually a transient errors. + // Thus in case of "GET" operations, we simply retry it. + // We are not automatically retrying "write" operations, as they are not idempotent. + if req.Method != "GET" { + return false + } + // For connection errors and apiserver shutdown errors retry. + if net.IsConnectionReset(err) || net.IsProbableEOF(err) { + return true + } + return false + } + // Right now we make about ten retry attempts if we get a Retry-After response. - var retryAfter *RetryAfter for { req, err := r.newHTTPRequest(ctx) if err != nil { return err } - r.backoff.Sleep(r.backoff.CalculateBackoff(r.URL())) - if retryAfter != nil { - // We are retrying the request that we already send to apiserver - // at least once before. - // This request should also be throttled with the client-internal rate limiter. - if err := r.tryThrottleWithInfo(ctx, retryAfter.Reason); err != nil { - return err - } - retryAfter = nil + if err := r.retry.Before(ctx, r); err != nil { + return err } resp, err := client.Do(req) updateURLMetrics(ctx, r, resp, err) @@ -906,11 +872,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp if req.ContentLength >= 0 && !(req.Body != nil && req.ContentLength == 0) { metrics.RequestSize.Observe(ctx, r.verb, r.URL().Host, float64(req.ContentLength)) } - if err != nil { - r.backoff.UpdateBackoff(r.URL(), err, 0) - } else { - r.backoff.UpdateBackoff(r.URL(), err, resp.StatusCode) - } + r.retry.After(ctx, r, resp, err) done := func() bool { defer readAndCloseResponseBody(resp) @@ -923,26 +885,8 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp fn(req, resp) } - var retry bool - retryAfter, retry = r.retry.NextRetry(req, resp, err, func(req *http.Request, err error) bool { - // "Connection reset by peer" or "apiserver is shutting down" are usually a transient errors. - // Thus in case of "GET" operations, we simply retry it. - // We are not automatically retrying "write" operations, as they are not idempotent. - if r.verb != "GET" { - return false - } - // For connection errors and apiserver shutdown errors retry. - if net.IsConnectionReset(err) || net.IsProbableEOF(err) { - return true - } + if r.retry.IsNextRetry(ctx, r, req, resp, err, isErrRetryableFunc) { return false - }) - if retry { - err := r.retry.BeforeNextRetry(ctx, r.backoff, retryAfter, req.URL.String(), r.body) - if err == nil { - return false - } - klog.V(4).Infof("Could not retry request - %v", err) } f(req, resp) diff --git a/rest/request_test.go b/rest/request_test.go index c69b04dcd..e2f6e81f5 100644 --- a/rest/request_test.go +++ b/rest/request_test.go @@ -2584,6 +2584,34 @@ func TestRequestWatchRetryWithRateLimiterBackoffAndMetrics(t *testing.T) { }) } +func TestRequestDoWithRetryInvokeOrder(t *testing.T) { + // both request.Do and request.DoRaw have the same behavior and expectations + testWithRetryInvokeOrder(t, "Do", func(ctx context.Context, r *Request) { + r.DoRaw(ctx) + }) +} + +func TestRequestStreamWithRetryInvokeOrder(t *testing.T) { + testWithRetryInvokeOrder(t, "Stream", func(ctx context.Context, r *Request) { + r.Stream(ctx) + }) +} + +func TestRequestWatchWithRetryInvokeOrder(t *testing.T) { + testWithRetryInvokeOrder(t, "Watch", func(ctx context.Context, r *Request) { + w, err := r.Watch(ctx) + if err == nil { + // in this test the the response body returned by the server is always empty, + // this will cause StreamWatcher.receive() to: + // - return an io.EOF to indicate that the watch closed normally and + // - then close the io.Reader + // since we assert on the number of times 'Close' has been called on the + // body of the response object, we need to wait here to avoid race condition. + <-w.ResultChan() + } + }) +} + func testRequestWithRetry(t *testing.T, key string, doFunc func(ctx context.Context, r *Request)) { type expected struct { attempts int @@ -2968,6 +2996,134 @@ func testRetryWithRateLimiterBackoffAndMetrics(t *testing.T, key string, doFunc } } +type retryInterceptor struct { + WithRetry + invokeOrderGot []string +} + +func (ri *retryInterceptor) IsNextRetry(ctx context.Context, restReq *Request, httpReq *http.Request, resp *http.Response, err error, f IsRetryableErrorFunc) bool { + ri.invokeOrderGot = append(ri.invokeOrderGot, "WithRetry.IsNextRetry") + return ri.WithRetry.IsNextRetry(ctx, restReq, httpReq, resp, err, f) +} + +func (ri *retryInterceptor) Before(ctx context.Context, request *Request) error { + ri.invokeOrderGot = append(ri.invokeOrderGot, "WithRetry.Before") + return ri.WithRetry.Before(ctx, request) +} + +func (ri *retryInterceptor) After(ctx context.Context, request *Request, resp *http.Response, err error) { + ri.invokeOrderGot = append(ri.invokeOrderGot, "WithRetry.After") + ri.WithRetry.After(ctx, request, resp, err) +} + +func (ri *retryInterceptor) Do() { + ri.invokeOrderGot = append(ri.invokeOrderGot, "Client.Do") +} + +func testWithRetryInvokeOrder(t *testing.T, key string, doFunc func(ctx context.Context, r *Request)) { + // we define the expected order of how the client + // should invoke the retry interface + // scenario: + // - A: original request fails with a retryable response: (500, 'Retry-After: 1') + // - B: retry 1: successful with a status code 200 + // so we have a total of 2 attempts + defaultInvokeOrderWant := []string{ + // first attempt (A) + "WithRetry.Before", + "Client.Do", + "WithRetry.After", + // server returns a retryable response: (500, 'Retry-After: 1') + // IsNextRetry is expected to return true + "WithRetry.IsNextRetry", + + // second attempt (B) - retry 1: successful with a status code 200 + "WithRetry.Before", + "Client.Do", + "WithRetry.After", + // success: IsNextRetry is expected to return false + // Watch and Stream are an exception, they return as soon as the + // server sends a status code of success. + "WithRetry.IsNextRetry", + } + + tests := []struct { + name string + maxRetries int + serverReturns []responseErr + // expectations differ based on whether it is 'Watch', 'Stream' or 'Do' + expectations map[string][]string + }{ + { + name: "success after one retry", + maxRetries: 1, + serverReturns: []responseErr{ + {response: retryAfterResponse(), err: nil}, + {response: &http.Response{StatusCode: http.StatusOK}, err: nil}, + }, + expectations: map[string][]string{ + "Do": defaultInvokeOrderWant, + // Watch and Stream skip the final 'IsNextRetry' by returning + // as soon as they see a success from the server. + "Watch": defaultInvokeOrderWant[0 : len(defaultInvokeOrderWant)-1], + "Stream": defaultInvokeOrderWant[0 : len(defaultInvokeOrderWant)-1], + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + interceptor := &retryInterceptor{ + WithRetry: &withRetry{maxRetries: test.maxRetries}, + } + + var attempts int + client := clientForFunc(func(req *http.Request) (*http.Response, error) { + defer func() { + attempts++ + }() + + interceptor.Do() + resp := test.serverReturns[attempts].response + if resp != nil { + resp.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) + } + return resp, test.serverReturns[attempts].err + }) + + base, err := url.Parse("http://foo.bar") + if err != nil { + t.Fatalf("Wrong test setup - did not find expected for: %s", key) + } + req := &Request{ + verb: "GET", + body: bytes.NewReader([]byte{}), + c: &RESTClient{ + base: base, + content: defaultContentConfig(), + Client: client, + }, + pathPrefix: "/api/v1", + rateLimiter: flowcontrol.NewFakeAlwaysRateLimiter(), + backoff: &NoBackoff{}, + retry: interceptor, + } + + doFunc(context.Background(), req) + + if attempts != 2 { + t.Errorf("%s: Expected attempts: %d, but got: %d", key, 2, attempts) + } + invokeOrderWant, ok := test.expectations[key] + if !ok { + t.Fatalf("Wrong test setup - did not find expected for: %s", key) + } + if !cmp.Equal(invokeOrderWant, interceptor.invokeOrderGot) { + t.Errorf("%s: Expected invoke order to match, diff: %s", key, cmp.Diff(invokeOrderWant, interceptor.invokeOrderGot)) + } + }) + } +} + func TestReuseRequest(t *testing.T) { var tests = []struct { name string diff --git a/rest/with_retry.go b/rest/with_retry.go index 1b7360b53..11b9b5225 100644 --- a/rest/with_retry.go +++ b/rest/with_retry.go @@ -57,36 +57,32 @@ type WithRetry interface { // A zero maxRetries should prevent from doing any retry and return immediately. SetMaxRetries(maxRetries int) - // NextRetry advances the retry counter appropriately and returns true if the - // request should be retried, otherwise it returns false if: + // IsNextRetry advances the retry counter appropriately + // and returns true if the request should be retried, + // otherwise it returns false, if: // - we have already reached the maximum retry threshold. // - the error does not fall into the retryable category. // - the server has not sent us a 429, or 5xx status code and the // 'Retry-After' response header is not set with a value. + // - we need to seek to the beginning of the request body before we + // initiate the next retry, the function should log an error and + // return false if it fails to do so. // - // if retry is set to true, retryAfter will contain the information - // regarding the next retry. - // - // request: the original request sent to the server + // restReq: the associated rest.Request + // httpReq: the HTTP Request sent to the server // resp: the response sent from the server, it is set if err is nil // err: the server sent this error to us, if err is set then resp is nil. // f: a IsRetryableErrorFunc function provided by the client that determines // if the err sent by the server is retryable. - NextRetry(req *http.Request, resp *http.Response, err error, f IsRetryableErrorFunc) (*RetryAfter, bool) - - // BeforeNextRetry is responsible for carrying out operations that need - // to be completed before the next retry is initiated: - // - if the request context is already canceled there is no need to - // retry, the function will return ctx.Err(). - // - we need to seek to the beginning of the request body before we - // initiate the next retry, the function should return an error if - // it fails to do so. - // - we should wait the number of seconds the server has asked us to - // in the 'Retry-After' response header. - // - // If BeforeNextRetry returns an error the client should abort the retry, - // otherwise it is safe to initiate the next retry. - BeforeNextRetry(ctx context.Context, backoff BackoffManager, retryAfter *RetryAfter, url string, body io.Reader) error + IsNextRetry(ctx context.Context, restReq *Request, httpReq *http.Request, resp *http.Response, err error, f IsRetryableErrorFunc) bool + + // Before should be invoked prior to each attempt, including + // the first one. if an error is returned, the request + // should be aborted immediately. + Before(ctx context.Context, r *Request) error + + // After should be invoked immediately after an attempt is made. + After(ctx context.Context, r *Request, resp *http.Response, err error) } // RetryAfter holds information associated with the next retry. @@ -107,6 +103,14 @@ type RetryAfter struct { type withRetry struct { maxRetries int attempts int + + // retry after parameters that pertain to the attempt that is to + // be made soon, so as to enable 'Before' and 'After' to refer + // to the retry parameters. + // - for the first attempt, it will always be nil + // - for consecutive attempts, it is non nil and holds the + // retry after parameters for the next attempt to be made. + retryAfter *RetryAfter } func (r *withRetry) SetMaxRetries(maxRetries int) { @@ -116,28 +120,28 @@ func (r *withRetry) SetMaxRetries(maxRetries int) { r.maxRetries = maxRetries } -func (r *withRetry) NextRetry(req *http.Request, resp *http.Response, err error, f IsRetryableErrorFunc) (*RetryAfter, bool) { - if req == nil || (resp == nil && err == nil) { +func (r *withRetry) IsNextRetry(ctx context.Context, restReq *Request, httpReq *http.Request, resp *http.Response, err error, f IsRetryableErrorFunc) bool { + if httpReq == nil || (resp == nil && err == nil) { // bad input, we do nothing. - return nil, false + return false } r.attempts++ - retryAfter := &RetryAfter{Attempt: r.attempts} + r.retryAfter = &RetryAfter{Attempt: r.attempts} if r.attempts > r.maxRetries { - return retryAfter, false + return false } // if the server returned an error, it takes precedence over the http response. var errIsRetryable bool - if f != nil && err != nil && f.IsErrorRetryable(req, err) { + if f != nil && err != nil && f.IsErrorRetryable(httpReq, err) { errIsRetryable = true // we have a retryable error, for which we will create an // artificial "Retry-After" response. resp = retryAfterResponse() } if err != nil && !errIsRetryable { - return retryAfter, false + return false } // if we are here, we have either a or b: @@ -147,34 +151,100 @@ func (r *withRetry) NextRetry(req *http.Request, resp *http.Response, err error, // need to check if it is retryable seconds, wait := checkWait(resp) if !wait { - return retryAfter, false + return false + } + + r.retryAfter.Wait = time.Duration(seconds) * time.Second + r.retryAfter.Reason = getRetryReason(r.attempts, seconds, resp, err) + + if err := r.prepareForNextRetry(ctx, restReq); err != nil { + klog.V(4).Infof("Could not retry request - %v", err) + return false } - retryAfter.Wait = time.Duration(seconds) * time.Second - retryAfter.Reason = getRetryReason(r.attempts, seconds, resp, err) - return retryAfter, true + return true } -func (r *withRetry) BeforeNextRetry(ctx context.Context, backoff BackoffManager, retryAfter *RetryAfter, url string, body io.Reader) error { - // Ensure the response body is fully read and closed before - // we reconnect, so that we reuse the same TCP connection. +// prepareForNextRetry is responsible for carrying out operations that need +// to be completed before the next retry is initiated: +// - if the request context is already canceled there is no need to +// retry, the function will return ctx.Err(). +// - we need to seek to the beginning of the request body before we +// initiate the next retry, the function should return an error if +// it fails to do so. +func (r *withRetry) prepareForNextRetry(ctx context.Context, request *Request) error { if ctx.Err() != nil { return ctx.Err() } - if seeker, ok := body.(io.Seeker); ok && body != nil { + // Ensure the response body is fully read and closed before + // we reconnect, so that we reuse the same TCP connection. + if seeker, ok := request.body.(io.Seeker); ok && request.body != nil { if _, err := seeker.Seek(0, 0); err != nil { - return fmt.Errorf("can't Seek() back to beginning of body for %T", r) + return fmt.Errorf("can't Seek() back to beginning of body for %T", request) } } - klog.V(4).Infof("Got a Retry-After %s response for attempt %d to %v", retryAfter.Wait, retryAfter.Attempt, url) - if backoff != nil { - backoff.Sleep(retryAfter.Wait) + klog.V(4).Infof("Got a Retry-After %s response for attempt %d to %v", r.retryAfter.Wait, r.retryAfter.Attempt, request.URL().String()) + return nil +} + +func (r *withRetry) Before(ctx context.Context, request *Request) error { + if ctx.Err() != nil { + return ctx.Err() + } + + url := request.URL() + + // r.retryAfter represents the retry after parameters calculated + // from the (response, err) tuple from the last attempt, so 'Before' + // can apply these retry after parameters prior to the next attempt. + // 'r.retryAfter == nil' indicates that this is the very first attempt. + if r.retryAfter == nil { + // we do a backoff sleep before the first attempt is made, + // (preserving current behavior). + request.backoff.Sleep(request.backoff.CalculateBackoff(url)) + return nil + } + + // if we are here, we have made attempt(s) al least once before. + if request.backoff != nil { + // TODO(tkashem) with default set to use exponential backoff + // we can merge these two sleeps: + // BackOffManager.Sleep(max(backoffManager.CalculateBackoff(), retryAfter)) + // see https://github.com/kubernetes/kubernetes/issues/108302 + request.backoff.Sleep(r.retryAfter.Wait) + request.backoff.Sleep(request.backoff.CalculateBackoff(url)) } + + // We are retrying the request that we already send to + // apiserver at least once before. This request should + // also be throttled with the client-internal rate limiter. + if err := request.tryThrottleWithInfo(ctx, r.retryAfter.Reason); err != nil { + return err + } + return nil } +func (r *withRetry) After(ctx context.Context, request *Request, resp *http.Response, err error) { + // 'After' is invoked immediately after an attempt is made, let's label + // the attempt we have just made as attempt 'N'. + // the current value of r.retryAfter represents the retry after + // parameters calculated from the (response, err) tuple from + // attempt N-1, so r.retryAfter is outdated and should not be + // referred to here. + r.retryAfter = nil + + if request.c.base != nil { + if err != nil { + request.backoff.UpdateBackoff(request.URL(), err, 0) + } else { + request.backoff.UpdateBackoff(request.URL(), err, resp.StatusCode) + } + } +} + // checkWait returns true along with a number of seconds if // the server instructed us to wait before retrying. func checkWait(resp *http.Response) (int, bool) { diff --git a/rest/with_retry_test.go b/rest/with_retry_test.go index 25b9016dc..f9f495ffe 100644 --- a/rest/with_retry_test.go +++ b/rest/with_retry_test.go @@ -17,8 +17,11 @@ limitations under the License. package rest import ( + "bytes" + "context" "errors" "net/http" + "net/url" "reflect" "testing" "time" @@ -30,7 +33,7 @@ var alwaysRetryError = IsRetryableErrorFunc(func(_ *http.Request, _ error) bool return true }) -func TestNextRetry(t *testing.T) { +func TestIsNextRetry(t *testing.T) { fakeError := errors.New("fake error") tests := []struct { name string @@ -205,14 +208,20 @@ func TestNextRetry(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { + restReq := &Request{ + body: bytes.NewReader([]byte{}), + c: &RESTClient{ + base: &url.URL{}, + }, + } r := &withRetry{maxRetries: test.maxRetries} retryGot := make([]bool, 0) retryAfterGot := make([]*RetryAfter, 0) for i := 0; i < test.attempts; i++ { - retryAfter, retry := r.NextRetry(test.request, test.response, test.err, test.retryableErrFunc) + retry := r.IsNextRetry(context.TODO(), restReq, test.request, test.response, test.err, test.retryableErrFunc) retryGot = append(retryGot, retry) - retryAfterGot = append(retryAfterGot, retryAfter) + retryAfterGot = append(retryAfterGot, r.retryAfter) } if !reflect.DeepEqual(test.retryExpected, retryGot) { From 7d7fd497a0093228e19eaea107ced3dba64a2515 Mon Sep 17 00:00:00 2001 From: David Eads Date: Tue, 1 Mar 2022 11:51:16 -0500 Subject: [PATCH 064/111] add resource enablement check for e2e tests of beta APIs Kubernetes-commit: 8ab8d05cc40c391f8ac650f50f23500666bfc943 --- discovery/helper.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/discovery/helper.go b/discovery/helper.go index 3bfe514e8..e79f073b0 100644 --- a/discovery/helper.go +++ b/discovery/helper.go @@ -19,12 +19,33 @@ package discovery import ( "fmt" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" apimachineryversion "k8s.io/apimachinery/pkg/version" ) +// IsResourceEnabled queries the server to determine if the resource specified is present on the server. +// This is particularly helpful when writing a controller or an e2e test that requires a particular resource to function. +func IsResourceEnabled(client DiscoveryInterface, resourceToCheck schema.GroupVersionResource) (bool, error) { + // this is a single request. The ServerResourcesForGroupVersion handles the core v1 group as legacy. + resourceList, err := client.ServerResourcesForGroupVersion(resourceToCheck.GroupVersion().String()) + if apierrors.IsNotFound(err) { // if the discovery endpoint isn't present, then the resource isn't present. + return false, nil + } + if err != nil { + return false, err + } + for _, actualResource := range resourceList.APIResources { + if actualResource.Name == resourceToCheck.Resource { + return true, nil + } + } + + return false, nil +} + // MatchesServerVersion queries the server to compares the build version // (git hash) of the client with the server's build version. It returns an error // if it failed to contact the server or if the versions are not an exact match. From eb103e0abf6218751302bf984d01ac45aae2ac6b Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Thu, 3 Mar 2022 04:25:47 -0800 Subject: [PATCH 065/111] Merge pull request #108347 from tkashem/refactor client-go: refactor retry logic for backoff, rate limiter and metric to be reused by Watch, Stream, and Do Kubernetes-commit: 52cd4d53ac8ac33cacd3d2c618cf22f1e3fd6a7e From b32b6a7d22a5056cbd08e7ade853d50165e7b73a Mon Sep 17 00:00:00 2001 From: sanposhiho <44139130+sanposhiho@users.noreply.github.com> Date: Wed, 23 Feb 2022 21:11:59 +0900 Subject: [PATCH 066/111] Add MinDomains API to TopologySpreadConstraints field Kubernetes-commit: 3b13e9445a3bf86c94781c898f224e6690399178 --- applyconfigurations/core/v1/topologyspreadconstraint.go | 9 +++++++++ applyconfigurations/internal/internal.go | 3 +++ 2 files changed, 12 insertions(+) diff --git a/applyconfigurations/core/v1/topologyspreadconstraint.go b/applyconfigurations/core/v1/topologyspreadconstraint.go index ac8b82eea..867cc89f2 100644 --- a/applyconfigurations/core/v1/topologyspreadconstraint.go +++ b/applyconfigurations/core/v1/topologyspreadconstraint.go @@ -30,6 +30,7 @@ type TopologySpreadConstraintApplyConfiguration struct { TopologyKey *string `json:"topologyKey,omitempty"` WhenUnsatisfiable *v1.UnsatisfiableConstraintAction `json:"whenUnsatisfiable,omitempty"` LabelSelector *metav1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` + MinDomains *int32 `json:"minDomains,omitempty"` } // TopologySpreadConstraintApplyConfiguration constructs an declarative configuration of the TopologySpreadConstraint type for use with @@ -69,3 +70,11 @@ func (b *TopologySpreadConstraintApplyConfiguration) WithLabelSelector(value *me b.LabelSelector = value return b } + +// WithMinDomains sets the MinDomains field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MinDomains field is set to the value of the last call. +func (b *TopologySpreadConstraintApplyConfiguration) WithMinDomains(value int32) *TopologySpreadConstraintApplyConfiguration { + b.MinDomains = &value + return b +} diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index 824c5e958..e17502d34 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -6844,6 +6844,9 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: numeric default: 0 + - name: minDomains + type: + scalar: numeric - name: topologyKey type: scalar: string From 147848c452865ee870eafa8eba223849c40e791c Mon Sep 17 00:00:00 2001 From: Abu Kashem Date: Thu, 24 Feb 2022 17:28:01 -0500 Subject: [PATCH 067/111] client-go: chain the error returned by rate limiter Kubernetes-commit: 6acbe7e6452a44057768c61909da2d5b7c878159 --- rest/request.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rest/request.go b/rest/request.go index 93bed5b95..86f51229e 100644 --- a/rest/request.go +++ b/rest/request.go @@ -504,7 +504,9 @@ func (r *Request) tryThrottleWithInfo(ctx context.Context, retryInfo string) err now := time.Now() err := r.rateLimiter.Wait(ctx) - + if err != nil { + err = fmt.Errorf("client rate limiter Wait returned an error: %w", err) + } latency := time.Since(now) var message string From 6ece0de2d5e0cd436344e35be3d41babf2ea0ae5 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 2 Mar 2022 07:43:19 +0100 Subject: [PATCH 068/111] storage capacity: generated files Kubernetes-commit: b1aefb9b90094ec4625ef2eefab7185fe4db9368 --- applyconfigurations/internal/internal.go | 26 ++ .../storage/v1/csistoragecapacity.go | 286 ++++++++++++++++++ applyconfigurations/utils.go | 2 + informers/generic.go | 2 + informers/storage/v1/csistoragecapacity.go | 90 ++++++ informers/storage/v1/interface.go | 7 + .../typed/storage/v1/csistoragecapacity.go | 208 +++++++++++++ .../v1/fake/fake_csistoragecapacity.go | 155 ++++++++++ .../storage/v1/fake/fake_storage_client.go | 4 + .../typed/storage/v1/generated_expansion.go | 2 + kubernetes/typed/storage/v1/storage_client.go | 5 + listers/storage/v1/csistoragecapacity.go | 99 ++++++ listers/storage/v1/expansion_generated.go | 8 + 13 files changed, 894 insertions(+) create mode 100644 applyconfigurations/storage/v1/csistoragecapacity.go create mode 100644 informers/storage/v1/csistoragecapacity.go create mode 100644 kubernetes/typed/storage/v1/csistoragecapacity.go create mode 100644 kubernetes/typed/storage/v1/fake/fake_csistoragecapacity.go create mode 100644 listers/storage/v1/csistoragecapacity.go diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index e17502d34..bd7f58d02 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -10842,6 +10842,32 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - name +- name: io.k8s.api.storage.v1.CSIStorageCapacity + map: + fields: + - name: apiVersion + type: + scalar: string + - name: capacity + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: kind + type: + scalar: string + - name: maximumVolumeSize + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: nodeTopology + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: storageClassName + type: + scalar: string + default: "" - name: io.k8s.api.storage.v1.StorageClass map: fields: diff --git a/applyconfigurations/storage/v1/csistoragecapacity.go b/applyconfigurations/storage/v1/csistoragecapacity.go new file mode 100644 index 000000000..a325c09f8 --- /dev/null +++ b/applyconfigurations/storage/v1/csistoragecapacity.go @@ -0,0 +1,286 @@ +/* +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 applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + storagev1 "k8s.io/api/storage/v1" + resource "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// CSIStorageCapacityApplyConfiguration represents an declarative configuration of the CSIStorageCapacity type for use +// with apply. +type CSIStorageCapacityApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + NodeTopology *v1.LabelSelectorApplyConfiguration `json:"nodeTopology,omitempty"` + StorageClassName *string `json:"storageClassName,omitempty"` + Capacity *resource.Quantity `json:"capacity,omitempty"` + MaximumVolumeSize *resource.Quantity `json:"maximumVolumeSize,omitempty"` +} + +// CSIStorageCapacity constructs an declarative configuration of the CSIStorageCapacity type for use with +// apply. +func CSIStorageCapacity(name, namespace string) *CSIStorageCapacityApplyConfiguration { + b := &CSIStorageCapacityApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("CSIStorageCapacity") + b.WithAPIVersion("storage.k8s.io/v1") + return b +} + +// ExtractCSIStorageCapacity extracts the applied configuration owned by fieldManager from +// cSIStorageCapacity. If no managedFields are found in cSIStorageCapacity for fieldManager, a +// CSIStorageCapacityApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// cSIStorageCapacity must be a unmodified CSIStorageCapacity API object that was retrieved from the Kubernetes API. +// ExtractCSIStorageCapacity provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractCSIStorageCapacity(cSIStorageCapacity *storagev1.CSIStorageCapacity, fieldManager string) (*CSIStorageCapacityApplyConfiguration, error) { + return extractCSIStorageCapacity(cSIStorageCapacity, fieldManager, "") +} + +// ExtractCSIStorageCapacityStatus is the same as ExtractCSIStorageCapacity except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractCSIStorageCapacityStatus(cSIStorageCapacity *storagev1.CSIStorageCapacity, fieldManager string) (*CSIStorageCapacityApplyConfiguration, error) { + return extractCSIStorageCapacity(cSIStorageCapacity, fieldManager, "status") +} + +func extractCSIStorageCapacity(cSIStorageCapacity *storagev1.CSIStorageCapacity, fieldManager string, subresource string) (*CSIStorageCapacityApplyConfiguration, error) { + b := &CSIStorageCapacityApplyConfiguration{} + err := managedfields.ExtractInto(cSIStorageCapacity, internal.Parser().Type("io.k8s.api.storage.v1.CSIStorageCapacity"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(cSIStorageCapacity.Name) + b.WithNamespace(cSIStorageCapacity.Namespace) + + b.WithKind("CSIStorageCapacity") + b.WithAPIVersion("storage.k8s.io/v1") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithKind(value string) *CSIStorageCapacityApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithAPIVersion(value string) *CSIStorageCapacityApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithName(value string) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithGenerateName(value string) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithNamespace(value string) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithUID(value types.UID) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithResourceVersion(value string) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithGeneration(value int64) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *CSIStorageCapacityApplyConfiguration) WithLabels(entries map[string]string) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *CSIStorageCapacityApplyConfiguration) WithAnnotations(entries map[string]string) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *CSIStorageCapacityApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *CSIStorageCapacityApplyConfiguration) WithFinalizers(values ...string) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithClusterName(value string) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + +func (b *CSIStorageCapacityApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithNodeTopology sets the NodeTopology field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeTopology field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithNodeTopology(value *v1.LabelSelectorApplyConfiguration) *CSIStorageCapacityApplyConfiguration { + b.NodeTopology = value + return b +} + +// WithStorageClassName sets the StorageClassName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StorageClassName field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithStorageClassName(value string) *CSIStorageCapacityApplyConfiguration { + b.StorageClassName = &value + return b +} + +// WithCapacity sets the Capacity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Capacity field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithCapacity(value resource.Quantity) *CSIStorageCapacityApplyConfiguration { + b.Capacity = &value + return b +} + +// WithMaximumVolumeSize sets the MaximumVolumeSize field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MaximumVolumeSize field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithMaximumVolumeSize(value resource.Quantity) *CSIStorageCapacityApplyConfiguration { + b.MaximumVolumeSize = &value + return b +} diff --git a/applyconfigurations/utils.go b/applyconfigurations/utils.go index 195b3ef79..1bfd77a53 100644 --- a/applyconfigurations/utils.go +++ b/applyconfigurations/utils.go @@ -1369,6 +1369,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationsstoragev1.CSINodeDriverApplyConfiguration{} case storagev1.SchemeGroupVersion.WithKind("CSINodeSpec"): return &applyconfigurationsstoragev1.CSINodeSpecApplyConfiguration{} + case storagev1.SchemeGroupVersion.WithKind("CSIStorageCapacity"): + return &applyconfigurationsstoragev1.CSIStorageCapacityApplyConfiguration{} case storagev1.SchemeGroupVersion.WithKind("StorageClass"): return &applyconfigurationsstoragev1.StorageClassApplyConfiguration{} case storagev1.SchemeGroupVersion.WithKind("TokenRequest"): diff --git a/informers/generic.go b/informers/generic.go index 5b94a2d2a..4c2e53c25 100644 --- a/informers/generic.go +++ b/informers/generic.go @@ -347,6 +347,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource 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("csistoragecapacities"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().CSIStorageCapacities().Informer()}, nil case storagev1.SchemeGroupVersion.WithResource("storageclasses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().StorageClasses().Informer()}, nil case storagev1.SchemeGroupVersion.WithResource("volumeattachments"): diff --git a/informers/storage/v1/csistoragecapacity.go b/informers/storage/v1/csistoragecapacity.go new file mode 100644 index 000000000..9b9095f3a --- /dev/null +++ b/informers/storage/v1/csistoragecapacity.go @@ -0,0 +1,90 @@ +/* +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" +) + +// CSIStorageCapacityInformer provides access to a shared informer and lister for +// CSIStorageCapacities. +type CSIStorageCapacityInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.CSIStorageCapacityLister +} + +type cSIStorageCapacityInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewCSIStorageCapacityInformer constructs a new informer for CSIStorageCapacity 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 NewCSIStorageCapacityInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredCSIStorageCapacityInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredCSIStorageCapacityInformer constructs a new informer for CSIStorageCapacity 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 NewFilteredCSIStorageCapacityInformer(client kubernetes.Interface, namespace string, 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().CSIStorageCapacities(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StorageV1().CSIStorageCapacities(namespace).Watch(context.TODO(), options) + }, + }, + &storagev1.CSIStorageCapacity{}, + resyncPeriod, + indexers, + ) +} + +func (f *cSIStorageCapacityInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredCSIStorageCapacityInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *cSIStorageCapacityInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&storagev1.CSIStorageCapacity{}, f.defaultInformer) +} + +func (f *cSIStorageCapacityInformer) Lister() v1.CSIStorageCapacityLister { + return v1.NewCSIStorageCapacityLister(f.Informer().GetIndexer()) +} diff --git a/informers/storage/v1/interface.go b/informers/storage/v1/interface.go index 157759140..4f017b086 100644 --- a/informers/storage/v1/interface.go +++ b/informers/storage/v1/interface.go @@ -28,6 +28,8 @@ type Interface interface { CSIDrivers() CSIDriverInformer // CSINodes returns a CSINodeInformer. CSINodes() CSINodeInformer + // CSIStorageCapacities returns a CSIStorageCapacityInformer. + CSIStorageCapacities() CSIStorageCapacityInformer // StorageClasses returns a StorageClassInformer. StorageClasses() StorageClassInformer // VolumeAttachments returns a VolumeAttachmentInformer. @@ -55,6 +57,11 @@ func (v *version) CSINodes() CSINodeInformer { return &cSINodeInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } +// CSIStorageCapacities returns a CSIStorageCapacityInformer. +func (v *version) CSIStorageCapacities() CSIStorageCapacityInformer { + return &cSIStorageCapacityInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + // StorageClasses returns a StorageClassInformer. func (v *version) StorageClasses() StorageClassInformer { return &storageClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} diff --git a/kubernetes/typed/storage/v1/csistoragecapacity.go b/kubernetes/typed/storage/v1/csistoragecapacity.go new file mode 100644 index 000000000..6bb50e0da --- /dev/null +++ b/kubernetes/typed/storage/v1/csistoragecapacity.go @@ -0,0 +1,208 @@ +/* +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 client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1 "k8s.io/api/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + storagev1 "k8s.io/client-go/applyconfigurations/storage/v1" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// CSIStorageCapacitiesGetter has a method to return a CSIStorageCapacityInterface. +// A group's client should implement this interface. +type CSIStorageCapacitiesGetter interface { + CSIStorageCapacities(namespace string) CSIStorageCapacityInterface +} + +// CSIStorageCapacityInterface has methods to work with CSIStorageCapacity resources. +type CSIStorageCapacityInterface interface { + Create(ctx context.Context, cSIStorageCapacity *v1.CSIStorageCapacity, opts metav1.CreateOptions) (*v1.CSIStorageCapacity, error) + Update(ctx context.Context, cSIStorageCapacity *v1.CSIStorageCapacity, opts metav1.UpdateOptions) (*v1.CSIStorageCapacity, 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.CSIStorageCapacity, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.CSIStorageCapacityList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSIStorageCapacity, err error) + Apply(ctx context.Context, cSIStorageCapacity *storagev1.CSIStorageCapacityApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CSIStorageCapacity, err error) + CSIStorageCapacityExpansion +} + +// cSIStorageCapacities implements CSIStorageCapacityInterface +type cSIStorageCapacities struct { + client rest.Interface + ns string +} + +// newCSIStorageCapacities returns a CSIStorageCapacities +func newCSIStorageCapacities(c *StorageV1Client, namespace string) *cSIStorageCapacities { + return &cSIStorageCapacities{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the cSIStorageCapacity, and returns the corresponding cSIStorageCapacity object, and an error if there is any. +func (c *cSIStorageCapacities) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CSIStorageCapacity, err error) { + result = &v1.CSIStorageCapacity{} + err = c.client.Get(). + Namespace(c.ns). + Resource("csistoragecapacities"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. +func (c *cSIStorageCapacities) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CSIStorageCapacityList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.CSIStorageCapacityList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("csistoragecapacities"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested cSIStorageCapacities. +func (c *cSIStorageCapacities) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("csistoragecapacities"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a cSIStorageCapacity and creates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *cSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *v1.CSIStorageCapacity, opts metav1.CreateOptions) (result *v1.CSIStorageCapacity, err error) { + result = &v1.CSIStorageCapacity{} + err = c.client.Post(). + Namespace(c.ns). + Resource("csistoragecapacities"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cSIStorageCapacity). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a cSIStorageCapacity and updates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *cSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *v1.CSIStorageCapacity, opts metav1.UpdateOptions) (result *v1.CSIStorageCapacity, err error) { + result = &v1.CSIStorageCapacity{} + err = c.client.Put(). + Namespace(c.ns). + Resource("csistoragecapacities"). + Name(cSIStorageCapacity.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cSIStorageCapacity). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the cSIStorageCapacity and deletes it. Returns an error if one occurs. +func (c *cSIStorageCapacities) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("csistoragecapacities"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *cSIStorageCapacities) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("csistoragecapacities"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched cSIStorageCapacity. +func (c *cSIStorageCapacities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSIStorageCapacity, err error) { + result = &v1.CSIStorageCapacity{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("csistoragecapacities"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cSIStorageCapacity. +func (c *cSIStorageCapacities) Apply(ctx context.Context, cSIStorageCapacity *storagev1.CSIStorageCapacityApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CSIStorageCapacity, err error) { + if cSIStorageCapacity == nil { + return nil, fmt.Errorf("cSIStorageCapacity provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(cSIStorageCapacity) + if err != nil { + return nil, err + } + name := cSIStorageCapacity.Name + if name == nil { + return nil, fmt.Errorf("cSIStorageCapacity.Name must be provided to Apply") + } + result = &v1.CSIStorageCapacity{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("csistoragecapacities"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/kubernetes/typed/storage/v1/fake/fake_csistoragecapacity.go b/kubernetes/typed/storage/v1/fake/fake_csistoragecapacity.go new file mode 100644 index 000000000..40c4171c8 --- /dev/null +++ b/kubernetes/typed/storage/v1/fake/fake_csistoragecapacity.go @@ -0,0 +1,155 @@ +/* +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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + storagev1 "k8s.io/api/storage/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + applyconfigurationsstoragev1 "k8s.io/client-go/applyconfigurations/storage/v1" + testing "k8s.io/client-go/testing" +) + +// FakeCSIStorageCapacities implements CSIStorageCapacityInterface +type FakeCSIStorageCapacities struct { + Fake *FakeStorageV1 + ns string +} + +var csistoragecapacitiesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1", Resource: "csistoragecapacities"} + +var csistoragecapacitiesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "CSIStorageCapacity"} + +// Get takes name of the cSIStorageCapacity, and returns the corresponding cSIStorageCapacity object, and an error if there is any. +func (c *FakeCSIStorageCapacities) Get(ctx context.Context, name string, options v1.GetOptions) (result *storagev1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(csistoragecapacitiesResource, c.ns, name), &storagev1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIStorageCapacity), err +} + +// List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. +func (c *FakeCSIStorageCapacities) List(ctx context.Context, opts v1.ListOptions) (result *storagev1.CSIStorageCapacityList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(csistoragecapacitiesResource, csistoragecapacitiesKind, c.ns, opts), &storagev1.CSIStorageCapacityList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &storagev1.CSIStorageCapacityList{ListMeta: obj.(*storagev1.CSIStorageCapacityList).ListMeta} + for _, item := range obj.(*storagev1.CSIStorageCapacityList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cSIStorageCapacities. +func (c *FakeCSIStorageCapacities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(csistoragecapacitiesResource, c.ns, opts)) + +} + +// Create takes the representation of a cSIStorageCapacity and creates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *FakeCSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *storagev1.CSIStorageCapacity, opts v1.CreateOptions) (result *storagev1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &storagev1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIStorageCapacity), err +} + +// Update takes the representation of a cSIStorageCapacity and updates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *FakeCSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *storagev1.CSIStorageCapacity, opts v1.UpdateOptions) (result *storagev1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &storagev1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIStorageCapacity), err +} + +// Delete takes name of the cSIStorageCapacity and deletes it. Returns an error if one occurs. +func (c *FakeCSIStorageCapacities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(csistoragecapacitiesResource, c.ns, name, opts), &storagev1.CSIStorageCapacity{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCSIStorageCapacities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(csistoragecapacitiesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &storagev1.CSIStorageCapacityList{}) + return err +} + +// Patch applies the patch and returns the patched cSIStorageCapacity. +func (c *FakeCSIStorageCapacities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(csistoragecapacitiesResource, c.ns, name, pt, data, subresources...), &storagev1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIStorageCapacity), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cSIStorageCapacity. +func (c *FakeCSIStorageCapacities) Apply(ctx context.Context, cSIStorageCapacity *applyconfigurationsstoragev1.CSIStorageCapacityApplyConfiguration, opts v1.ApplyOptions) (result *storagev1.CSIStorageCapacity, err error) { + if cSIStorageCapacity == nil { + return nil, fmt.Errorf("cSIStorageCapacity provided to Apply must not be nil") + } + data, err := json.Marshal(cSIStorageCapacity) + if err != nil { + return nil, err + } + name := cSIStorageCapacity.Name + if name == nil { + return nil, fmt.Errorf("cSIStorageCapacity.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(csistoragecapacitiesResource, c.ns, *name, types.ApplyPatchType, data), &storagev1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*storagev1.CSIStorageCapacity), err +} diff --git a/kubernetes/typed/storage/v1/fake/fake_storage_client.go b/kubernetes/typed/storage/v1/fake/fake_storage_client.go index 8878f5048..5cb91b516 100644 --- a/kubernetes/typed/storage/v1/fake/fake_storage_client.go +++ b/kubernetes/typed/storage/v1/fake/fake_storage_client.go @@ -36,6 +36,10 @@ func (c *FakeStorageV1) CSINodes() v1.CSINodeInterface { return &FakeCSINodes{c} } +func (c *FakeStorageV1) CSIStorageCapacities(namespace string) v1.CSIStorageCapacityInterface { + return &FakeCSIStorageCapacities{c, namespace} +} + func (c *FakeStorageV1) StorageClasses() v1.StorageClassInterface { return &FakeStorageClasses{c} } diff --git a/kubernetes/typed/storage/v1/generated_expansion.go b/kubernetes/typed/storage/v1/generated_expansion.go index af8111776..aa318d7d3 100644 --- a/kubernetes/typed/storage/v1/generated_expansion.go +++ b/kubernetes/typed/storage/v1/generated_expansion.go @@ -22,6 +22,8 @@ type CSIDriverExpansion interface{} type CSINodeExpansion interface{} +type CSIStorageCapacityExpansion interface{} + type StorageClassExpansion interface{} type VolumeAttachmentExpansion interface{} diff --git a/kubernetes/typed/storage/v1/storage_client.go b/kubernetes/typed/storage/v1/storage_client.go index b31862f43..750fe8b62 100644 --- a/kubernetes/typed/storage/v1/storage_client.go +++ b/kubernetes/typed/storage/v1/storage_client.go @@ -30,6 +30,7 @@ type StorageV1Interface interface { RESTClient() rest.Interface CSIDriversGetter CSINodesGetter + CSIStorageCapacitiesGetter StorageClassesGetter VolumeAttachmentsGetter } @@ -47,6 +48,10 @@ func (c *StorageV1Client) CSINodes() CSINodeInterface { return newCSINodes(c) } +func (c *StorageV1Client) CSIStorageCapacities(namespace string) CSIStorageCapacityInterface { + return newCSIStorageCapacities(c, namespace) +} + func (c *StorageV1Client) StorageClasses() StorageClassInterface { return newStorageClasses(c) } diff --git a/listers/storage/v1/csistoragecapacity.go b/listers/storage/v1/csistoragecapacity.go new file mode 100644 index 000000000..a72328c9a --- /dev/null +++ b/listers/storage/v1/csistoragecapacity.go @@ -0,0 +1,99 @@ +/* +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 lister-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/api/storage/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// CSIStorageCapacityLister helps list CSIStorageCapacities. +// All objects returned here must be treated as read-only. +type CSIStorageCapacityLister interface { + // List lists all CSIStorageCapacities in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1.CSIStorageCapacity, err error) + // CSIStorageCapacities returns an object that can list and get CSIStorageCapacities. + CSIStorageCapacities(namespace string) CSIStorageCapacityNamespaceLister + CSIStorageCapacityListerExpansion +} + +// cSIStorageCapacityLister implements the CSIStorageCapacityLister interface. +type cSIStorageCapacityLister struct { + indexer cache.Indexer +} + +// NewCSIStorageCapacityLister returns a new CSIStorageCapacityLister. +func NewCSIStorageCapacityLister(indexer cache.Indexer) CSIStorageCapacityLister { + return &cSIStorageCapacityLister{indexer: indexer} +} + +// List lists all CSIStorageCapacities in the indexer. +func (s *cSIStorageCapacityLister) List(selector labels.Selector) (ret []*v1.CSIStorageCapacity, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.CSIStorageCapacity)) + }) + return ret, err +} + +// CSIStorageCapacities returns an object that can list and get CSIStorageCapacities. +func (s *cSIStorageCapacityLister) CSIStorageCapacities(namespace string) CSIStorageCapacityNamespaceLister { + return cSIStorageCapacityNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// CSIStorageCapacityNamespaceLister helps list and get CSIStorageCapacities. +// All objects returned here must be treated as read-only. +type CSIStorageCapacityNamespaceLister interface { + // List lists all CSIStorageCapacities in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1.CSIStorageCapacity, err error) + // Get retrieves the CSIStorageCapacity from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1.CSIStorageCapacity, error) + CSIStorageCapacityNamespaceListerExpansion +} + +// cSIStorageCapacityNamespaceLister implements the CSIStorageCapacityNamespaceLister +// interface. +type cSIStorageCapacityNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all CSIStorageCapacities in the indexer for a given namespace. +func (s cSIStorageCapacityNamespaceLister) List(selector labels.Selector) (ret []*v1.CSIStorageCapacity, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.CSIStorageCapacity)) + }) + return ret, err +} + +// Get retrieves the CSIStorageCapacity from the indexer for a given namespace and name. +func (s cSIStorageCapacityNamespaceLister) Get(name string) (*v1.CSIStorageCapacity, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("csistoragecapacity"), name) + } + return obj.(*v1.CSIStorageCapacity), nil +} diff --git a/listers/storage/v1/expansion_generated.go b/listers/storage/v1/expansion_generated.go index 172f835f7..196b787e7 100644 --- a/listers/storage/v1/expansion_generated.go +++ b/listers/storage/v1/expansion_generated.go @@ -26,6 +26,14 @@ type CSIDriverListerExpansion interface{} // CSINodeLister. type CSINodeListerExpansion interface{} +// CSIStorageCapacityListerExpansion allows custom methods to be added to +// CSIStorageCapacityLister. +type CSIStorageCapacityListerExpansion interface{} + +// CSIStorageCapacityNamespaceListerExpansion allows custom methods to be added to +// CSIStorageCapacityNamespaceLister. +type CSIStorageCapacityNamespaceListerExpansion interface{} + // StorageClassListerExpansion allows custom methods to be added to // StorageClassLister. type StorageClassListerExpansion interface{} From 9c049623c2aec3f6c29d3d944bd00edf83b35a67 Mon Sep 17 00:00:00 2001 From: Ricardo Katz Date: Fri, 4 Mar 2022 11:39:53 -0300 Subject: [PATCH 069/111] Reintroduce response status and header on kubectl verbose debug Kubernetes-commit: 04b240ac0d16f0d5c8cc0c06ebd8ff1433ca8469 --- transport/round_trippers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/round_trippers.go b/transport/round_trippers.go index 4c74606a9..26a89f93b 100644 --- a/transport/round_trippers.go +++ b/transport/round_trippers.go @@ -72,7 +72,7 @@ func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTrip func DebugWrappers(rt http.RoundTripper) http.RoundTripper { switch { case bool(klog.V(9).Enabled()): - rt = NewDebuggingRoundTripper(rt, DebugCurlCommand, DebugDetailedTiming, DebugResponseHeaders) + rt = NewDebuggingRoundTripper(rt, DebugCurlCommand, DebugURLTiming, DebugDetailedTiming, DebugResponseHeaders) case bool(klog.V(8).Enabled()): rt = NewDebuggingRoundTripper(rt, DebugJustURL, DebugRequestHeaders, DebugResponseStatus, DebugResponseHeaders) case bool(klog.V(7).Enabled()): From 8c38cf359a5f2f657000dd6ff9a528bd3b689882 Mon Sep 17 00:00:00 2001 From: Tim Allclair Date: Fri, 4 Mar 2022 16:08:58 -0800 Subject: [PATCH 070/111] Don't follow redirects with spdy Kubernetes-commit: e1069c64956a43f628d8ae2fcd9107959747c1c6 --- transport/spdy/spdy.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/transport/spdy/spdy.go b/transport/spdy/spdy.go index 406d3cc19..f50b68e5f 100644 --- a/transport/spdy/spdy.go +++ b/transport/spdy/spdy.go @@ -44,11 +44,9 @@ func RoundTripperFor(config *restclient.Config) (http.RoundTripper, Upgrader, er proxy = config.Proxy } upgradeRoundTripper := spdy.NewRoundTripperWithConfig(spdy.RoundTripperConfig{ - TLS: tlsConfig, - FollowRedirects: true, - RequireSameHostRedirects: false, - Proxier: proxy, - PingPeriod: time.Second * 5, + TLS: tlsConfig, + Proxier: proxy, + PingPeriod: time.Second * 5, }) wrapper, err := restclient.HTTPWrappersForConfig(config, upgradeRoundTripper) if err != nil { From 6b59aa0b4ad40ddb8f4be5772a13910898c02b16 Mon Sep 17 00:00:00 2001 From: Jian Li Date: Mon, 14 Mar 2022 13:56:17 +0800 Subject: [PATCH 071/111] make comments of updateIndices optimization code more accurate Kubernetes-commit: 0eae1f3addbd044793dac89f9e097e5f4c6fb2aa --- tools/cache/thread_safe_store.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cache/thread_safe_store.go b/tools/cache/thread_safe_store.go index aaf0741d0..2ab926825 100644 --- a/tools/cache/thread_safe_store.go +++ b/tools/cache/thread_safe_store.go @@ -281,14 +281,14 @@ func (c *threadSafeMap) updateIndices(oldObj interface{}, newObj interface{}, ke } for _, value := range oldIndexValues { - // We optimize for the most common case where index returns a single value. + // We optimize for the most common case where indexFunc returns a single value. if len(indexValues) == 1 && value == indexValues[0] { continue } c.deleteKeyFromIndex(key, value, index) } for _, value := range indexValues { - // We optimize for the most common case where index returns a single value. + // We optimize for the most common case where indexFunc returns a single value. if len(oldIndexValues) == 1 && value == oldIndexValues[0] { continue } From ab732f5dd6321cce67168d14d9e18e7fce14ff89 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Mon, 14 Mar 2022 09:33:57 -0700 Subject: [PATCH 072/111] Merge pull request #107674 from sanposhiho/api-min-domains Add MinDomains API to TopologySpreadConstraints field Kubernetes-commit: 5b52c4d12772c65ff5896f9268b4a4ca58a66995 --- go.mod | 8 ++++---- go.sum | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 6d27ba0e6..607cb0d5b 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220226220324-b8c40e080bc5 - k8s.io/apimachinery v0.0.0-20220307180657-d81a7ed4ab08 + k8s.io/api v0.0.0-20220314180925-ee4a7624f6d5 + k8s.io/apimachinery v0.0.0-20220309082612-aa725640f715 k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -40,6 +40,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220226220324-b8c40e080bc5 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220307180657-d81a7ed4ab08 + k8s.io/api => k8s.io/api v0.0.0-20220314180925-ee4a7624f6d5 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220309082612-aa725640f715 ) diff --git a/go.sum b/go.sum index ed9d801b1..aa307f4e3 100644 --- a/go.sum +++ b/go.sum @@ -614,10 +614,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220226220324-b8c40e080bc5 h1:z4oqfOInb6p7EwsJbKUe2IcKaeSBWmfYEIsIdFHq6ak= -k8s.io/api v0.0.0-20220226220324-b8c40e080bc5/go.mod h1:xmVR3mDgBB2FAJoueQFwuWn03L5odGCiOKivsptcgRU= -k8s.io/apimachinery v0.0.0-20220307180657-d81a7ed4ab08 h1:vWaGwtEno8UN+KYPc0xGq3lMO5aw2wxaR7AjnDP+G1U= -k8s.io/apimachinery v0.0.0-20220307180657-d81a7ed4ab08/go.mod h1:6HjHJr7AD3yHuu+gOdE3O1dqE21lBVCDBk5W7wry/WI= +k8s.io/api v0.0.0-20220314180925-ee4a7624f6d5 h1:oAeLhvrUBB+bviyhwzPknIzIdXw5KBMsRhJg50z1iM4= +k8s.io/api v0.0.0-20220314180925-ee4a7624f6d5/go.mod h1:93BzndRxB3dlJ9ccm/g86TvrPVpjL4gY+lzvZ8lam9Q= +k8s.io/apimachinery v0.0.0-20220309082612-aa725640f715 h1:aEJAi7cAk/Tdn4gS+ENqYU/eFdT+f+QRy2Z+fC7tNzU= +k8s.io/apimachinery v0.0.0-20220309082612-aa725640f715/go.mod h1:6HjHJr7AD3yHuu+gOdE3O1dqE21lBVCDBk5W7wry/WI= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 7c9347d386857752e81fd91b9be1405bc889dac9 Mon Sep 17 00:00:00 2001 From: Abu Kashem Date: Mon, 14 Mar 2022 18:57:56 -0400 Subject: [PATCH 073/111] client-go: wrap error from previous attempt to provide more context Kubernetes-commit: 868b5a31d382b325f49e1b831e6b094282d50cc7 --- rest/request.go | 8 +- rest/request_test.go | 226 ++++++++++++++++++++++++++++++++++++++++ rest/with_retry.go | 78 ++++++++++++++ rest/with_retry_test.go | 166 +++++++++++++++++++++++++++++ 4 files changed, 474 insertions(+), 4 deletions(-) diff --git a/rest/request.go b/rest/request.go index ef9435301..e39b6b9dc 100644 --- a/rest/request.go +++ b/rest/request.go @@ -620,7 +620,7 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { } if err := r.retry.Before(ctx, r); err != nil { - return nil, err + return nil, r.retry.WrapPreviousError(err) } resp, err := client.Do(req) @@ -655,7 +655,7 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { // we need to return the error object from that. err = transformErr } - return nil, err + return nil, r.retry.WrapPreviousError(err) } } } @@ -865,7 +865,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp } if err := r.retry.Before(ctx, r); err != nil { - return err + return r.retry.WrapPreviousError(err) } resp, err := client.Do(req) updateURLMetrics(ctx, r, resp, err) @@ -895,7 +895,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp return true }() if done { - return err + return r.retry.WrapPreviousError(err) } } } diff --git a/rest/request_test.go b/rest/request_test.go index 3f3f45e6e..b94288575 100644 --- a/rest/request_test.go +++ b/rest/request_test.go @@ -2614,6 +2614,30 @@ func TestRequestWatchWithRetryInvokeOrder(t *testing.T) { }) } +func TestRequestWatchWithWrapPreviousError(t *testing.T) { + testWithWrapPreviousError(t, func(ctx context.Context, r *Request) error { + w, err := r.Watch(ctx) + if err == nil { + // in this test the the response body returned by the server is always empty, + // this will cause StreamWatcher.receive() to: + // - return an io.EOF to indicate that the watch closed normally and + // - then close the io.Reader + // since we assert on the number of times 'Close' has been called on the + // body of the response object, we need to wait here to avoid race condition. + <-w.ResultChan() + } + return err + }) +} + +func TestRequestDoWithWrapPreviousError(t *testing.T) { + // both request.Do and request.DoRaw have the same behavior and expectations + testWithWrapPreviousError(t, func(ctx context.Context, r *Request) error { + result := r.Do(ctx) + return result.err + }) +} + func testRequestWithRetry(t *testing.T, key string, doFunc func(ctx context.Context, r *Request)) { type expected struct { attempts int @@ -3126,6 +3150,208 @@ func testWithRetryInvokeOrder(t *testing.T, key string, doFunc func(ctx context. } } +func testWithWrapPreviousError(t *testing.T, doFunc func(ctx context.Context, r *Request) error) { + var ( + containsFormatExpected = "- error from a previous attempt: %s" + nonRetryableErr = errors.New("non retryable error") + ) + + tests := []struct { + name string + maxRetries int + serverReturns []responseErr + expectedErr error + wrapped bool + attemptsExpected int + contains string + }{ + { + name: "success at first attempt", + maxRetries: 2, + serverReturns: []responseErr{ + {response: &http.Response{StatusCode: http.StatusOK}, err: nil}, + }, + attemptsExpected: 1, + expectedErr: nil, + }, + { + name: "success after a series of retry-after from the server", + maxRetries: 2, + serverReturns: []responseErr{ + {response: retryAfterResponse(), err: nil}, + {response: retryAfterResponse(), err: nil}, + {response: &http.Response{StatusCode: http.StatusOK}, err: nil}, + }, + attemptsExpected: 3, + expectedErr: nil, + }, + { + name: "success after a series of retryable errors", + maxRetries: 2, + serverReturns: []responseErr{ + {response: nil, err: io.EOF}, + {response: nil, err: io.EOF}, + {response: &http.Response{StatusCode: http.StatusOK}, err: nil}, + }, + attemptsExpected: 3, + expectedErr: nil, + }, + { + name: "request errors out with a non retryable error", + maxRetries: 2, + serverReturns: []responseErr{ + {response: nil, err: nonRetryableErr}, + }, + attemptsExpected: 1, + expectedErr: nonRetryableErr, + }, + { + name: "request times out after retries, but no previous error", + maxRetries: 2, + serverReturns: []responseErr{ + {response: retryAfterResponse(), err: nil}, + {response: retryAfterResponse(), err: nil}, + {response: nil, err: context.Canceled}, + }, + attemptsExpected: 3, + expectedErr: context.Canceled, + }, + { + name: "request times out after retries, and we have a relevant previous error", + maxRetries: 3, + serverReturns: []responseErr{ + {response: nil, err: io.EOF}, + {response: retryAfterResponse(), err: nil}, + {response: retryAfterResponse(), err: nil}, + {response: nil, err: context.Canceled}, + }, + attemptsExpected: 4, + wrapped: true, + expectedErr: context.Canceled, + contains: fmt.Sprintf(containsFormatExpected, io.EOF), + }, + { + name: "interleaved retry-after responses with retryable errors", + maxRetries: 8, + serverReturns: []responseErr{ + {response: retryAfterResponse(), err: nil}, + {response: retryAfterResponse(), err: nil}, + {response: nil, err: io.ErrUnexpectedEOF}, + {response: retryAfterResponse(), err: nil}, + {response: retryAfterResponse(), err: nil}, + {response: nil, err: io.EOF}, + {response: retryAfterResponse(), err: nil}, + {response: retryAfterResponse(), err: nil}, + {response: nil, err: context.Canceled}, + }, + attemptsExpected: 9, + wrapped: true, + expectedErr: context.Canceled, + contains: fmt.Sprintf(containsFormatExpected, io.EOF), + }, + { + name: "request errors out with a retryable error, followed by a non-retryable one", + maxRetries: 3, + serverReturns: []responseErr{ + {response: nil, err: io.EOF}, + {response: nil, err: nonRetryableErr}, + }, + attemptsExpected: 2, + wrapped: true, + expectedErr: nonRetryableErr, + contains: fmt.Sprintf(containsFormatExpected, io.EOF), + }, + { + name: "use the most recent error", + maxRetries: 2, + serverReturns: []responseErr{ + {response: nil, err: io.ErrUnexpectedEOF}, + {response: nil, err: io.EOF}, + {response: nil, err: context.Canceled}, + }, + attemptsExpected: 3, + wrapped: true, + expectedErr: context.Canceled, + contains: fmt.Sprintf(containsFormatExpected, io.EOF), + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + var attempts int + client := clientForFunc(func(req *http.Request) (*http.Response, error) { + defer func() { + attempts++ + }() + + resp := test.serverReturns[attempts].response + if resp != nil { + resp.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) + } + return resp, test.serverReturns[attempts].err + }) + + base, err := url.Parse("http://foo.bar") + if err != nil { + t.Fatalf("Failed to create new HTTP request - %v", err) + } + req := &Request{ + verb: "GET", + body: bytes.NewReader([]byte{}), + c: &RESTClient{ + base: base, + content: defaultContentConfig(), + Client: client, + }, + pathPrefix: "/api/v1", + rateLimiter: flowcontrol.NewFakeAlwaysRateLimiter(), + backoff: &noSleepBackOff{}, + retry: &withRetry{maxRetries: test.maxRetries}, + } + + err = doFunc(context.Background(), req) + if test.attemptsExpected != attempts { + t.Errorf("Expected attempts: %d, but got: %d", test.attemptsExpected, attempts) + } + + switch { + case test.expectedErr == nil: + if err != nil { + t.Errorf("Expected a nil error, but got: %v", err) + return + } + case test.expectedErr != nil: + if !strings.Contains(err.Error(), test.contains) { + t.Errorf("Expected error message to contain %q, but got: %v", test.contains, err) + } + + urlErrGot, _ := err.(*url.Error) + if test.wrapped { + // we expect the url.Error from net/http to be wrapped by WrapPreviousError + unwrapper, ok := err.(interface { + Unwrap() error + }) + if !ok { + t.Errorf("Expected error to implement Unwrap method, but got: %v", err) + return + } + urlErrGot, _ = unwrapper.Unwrap().(*url.Error) + } + // we always get a url.Error from net/http + if urlErrGot == nil { + t.Errorf("Expected error to be url.Error, but got: %v", err) + return + } + + errGot := urlErrGot.Unwrap() + if test.expectedErr != errGot { + t.Errorf("Expected error %v, but got: %v", test.expectedErr, errGot) + } + } + }) + } +} + func TestReuseRequest(t *testing.T) { var tests = []struct { name string diff --git a/rest/with_retry.go b/rest/with_retry.go index 11b9b5225..e729ad1ec 100644 --- a/rest/with_retry.go +++ b/rest/with_retry.go @@ -22,6 +22,7 @@ import ( "io" "io/ioutil" "net/http" + "net/url" "time" "k8s.io/klog/v2" @@ -83,6 +84,22 @@ type WithRetry interface { // After should be invoked immediately after an attempt is made. After(ctx context.Context, r *Request, resp *http.Response, err error) + + // WrapPreviousError wraps the error from any previous attempt into + // the final error specified in 'finalErr', so the user has more + // context why the request failed. + // For example, if a request times out after multiple retries then + // we see a generic context.Canceled or context.DeadlineExceeded + // error which is not very useful in debugging. This function can + // wrap any error from previous attempt(s) to provide more context to + // the user. The error returned in 'err' must satisfy the + // following conditions: + // a: errors.Unwrap(err) = errors.Unwrap(finalErr) if finalErr + // implements Unwrap + // b: errors.Unwrap(err) = finalErr if finalErr does not + // implements Unwrap + // c: errors.Is(err, otherErr) = errors.Is(finalErr, otherErr) + WrapPreviousError(finalErr error) (err error) } // RetryAfter holds information associated with the next retry. @@ -111,6 +128,16 @@ type withRetry struct { // - for consecutive attempts, it is non nil and holds the // retry after parameters for the next attempt to be made. retryAfter *RetryAfter + + // we keep track of two most recent errors, if the most + // recent attempt is labeled as 'N' then: + // - currentErr represents the error returned by attempt N, it + // can be nil if attempt N did not return an error. + // - previousErr represents an error from an attempt 'M' which + // precedes attempt 'N' (N - M >= 1), it is non nil only when: + // - for a sequence of attempt(s) 1..n (n>1), there + // is an attempt k (k Date: Tue, 15 Mar 2022 20:36:21 -0700 Subject: [PATCH 074/111] googleapis/gnostic -> google/gnostic Kubernetes-commit: 8a1d5947ad34ba275192341baa4e5fef8e6c7f24 --- discovery/cached/disk/cached_discovery.go | 2 +- discovery/cached/disk/cached_discovery_test.go | 2 +- discovery/cached/memory/memcache.go | 2 +- discovery/discovery_client.go | 2 +- discovery/discovery_client_test.go | 2 +- discovery/fake/discovery.go | 2 +- go.mod | 13 +++++++------ go.sum | 13 ++++--------- restmapper/discovery_test.go | 2 +- restmapper/shortcut_test.go | 2 +- 10 files changed, 19 insertions(+), 23 deletions(-) diff --git a/discovery/cached/disk/cached_discovery.go b/discovery/cached/disk/cached_discovery.go index 6a35dcc60..b759af4eb 100644 --- a/discovery/cached/disk/cached_discovery.go +++ b/discovery/cached/disk/cached_discovery.go @@ -25,7 +25,7 @@ import ( "sync" "time" - openapi_v2 "github.com/googleapis/gnostic/openapiv2" + openapi_v2 "github.com/google/gnostic/openapiv2" "k8s.io/klog/v2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/discovery/cached/disk/cached_discovery_test.go b/discovery/cached/disk/cached_discovery_test.go index 2298a6d19..cbea2b90d 100644 --- a/discovery/cached/disk/cached_discovery_test.go +++ b/discovery/cached/disk/cached_discovery_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - openapi_v2 "github.com/googleapis/gnostic/openapiv2" + openapi_v2 "github.com/google/gnostic/openapiv2" "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/api/errors" diff --git a/discovery/cached/memory/memcache.go b/discovery/cached/memory/memcache.go index 9de389fa7..8b7317599 100644 --- a/discovery/cached/memory/memcache.go +++ b/discovery/cached/memory/memcache.go @@ -22,7 +22,7 @@ import ( "sync" "syscall" - openapi_v2 "github.com/googleapis/gnostic/openapiv2" + openapi_v2 "github.com/google/gnostic/openapiv2" errorsutil "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/discovery/discovery_client.go b/discovery/discovery_client.go index 50e59c5d8..ce5eda14b 100644 --- a/discovery/discovery_client.go +++ b/discovery/discovery_client.go @@ -29,7 +29,7 @@ import ( //nolint:staticcheck // SA1019 Keep using module since it's still being maintained and the api of google.golang.org/protobuf/proto differs "github.com/golang/protobuf/proto" - openapi_v2 "github.com/googleapis/gnostic/openapiv2" + openapi_v2 "github.com/google/gnostic/openapiv2" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/discovery/discovery_client_test.go b/discovery/discovery_client_test.go index f78b4bf89..4d16f8df3 100644 --- a/discovery/discovery_client_test.go +++ b/discovery/discovery_client_test.go @@ -27,7 +27,7 @@ import ( "time" "github.com/gogo/protobuf/proto" - openapi_v2 "github.com/googleapis/gnostic/openapiv2" + openapi_v2 "github.com/google/gnostic/openapiv2" "github.com/stretchr/testify/assert" golangproto "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/discovery/fake/discovery.go b/discovery/fake/discovery.go index d3835c9fa..e75c988c0 100644 --- a/discovery/fake/discovery.go +++ b/discovery/fake/discovery.go @@ -20,7 +20,7 @@ import ( "fmt" "net/http" - openapi_v2 "github.com/googleapis/gnostic/openapiv2" + openapi_v2 "github.com/google/gnostic/openapiv2" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/go.mod b/go.mod index 607cb0d5b..243c299e6 100644 --- a/go.mod +++ b/go.mod @@ -15,10 +15,10 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da github.com/golang/protobuf v1.5.2 github.com/google/btree v1.0.1 // indirect + github.com/google/gnostic v0.5.7-v3refs github.com/google/go-cmp v0.5.5 github.com/google/gofuzz v1.1.0 github.com/google/uuid v1.1.2 - github.com/googleapis/gnostic v0.5.5 github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 github.com/imdario/mergo v0.3.5 github.com/peterbourgon/diskv v2.0.1+incompatible @@ -30,16 +30,17 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220314180925-ee4a7624f6d5 - k8s.io/apimachinery v0.0.0-20220309082612-aa725640f715 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.40.1 - k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 + k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 sigs.k8s.io/structured-merge-diff/v4 v4.2.1 sigs.k8s.io/yaml v1.2.0 ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220314180925-ee4a7624f6d5 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220309082612-aa725640f715 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index aa307f4e3..cdf60379c 100644 --- a/go.sum +++ b/go.sum @@ -140,6 +140,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -174,9 +176,6 @@ github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= -github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= @@ -614,17 +613,13 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220314180925-ee4a7624f6d5 h1:oAeLhvrUBB+bviyhwzPknIzIdXw5KBMsRhJg50z1iM4= -k8s.io/api v0.0.0-20220314180925-ee4a7624f6d5/go.mod h1:93BzndRxB3dlJ9ccm/g86TvrPVpjL4gY+lzvZ8lam9Q= -k8s.io/apimachinery v0.0.0-20220309082612-aa725640f715 h1:aEJAi7cAk/Tdn4gS+ENqYU/eFdT+f+QRy2Z+fC7tNzU= -k8s.io/apimachinery v0.0.0-20220309082612-aa725640f715/go.mod h1:6HjHJr7AD3yHuu+gOdE3O1dqE21lBVCDBk5W7wry/WI= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.40.1 h1:P4RRucWk/lFOlDdkAr3mc7iWFkgKrZY9qZMAgek06S4= k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18 h1:M0Korml79JW27ndc6lxLxkNP8QVqdpBj0MIEZliKy8A= +k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18/go.mod h1:p8bjuqy9+BWvBDEBjdeVYtX6kMWWg6OhY1V1jhC9MPI= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= diff --git a/restmapper/discovery_test.go b/restmapper/discovery_test.go index 7198f2b48..e14ccc711 100644 --- a/restmapper/discovery_test.go +++ b/restmapper/discovery_test.go @@ -30,7 +30,7 @@ import ( restclient "k8s.io/client-go/rest" "k8s.io/client-go/rest/fake" - openapi_v2 "github.com/googleapis/gnostic/openapiv2" + openapi_v2 "github.com/google/gnostic/openapiv2" "github.com/stretchr/testify/assert" ) diff --git a/restmapper/shortcut_test.go b/restmapper/shortcut_test.go index e2a490d22..f0fd1f371 100644 --- a/restmapper/shortcut_test.go +++ b/restmapper/shortcut_test.go @@ -19,7 +19,7 @@ package restmapper import ( "testing" - openapi_v2 "github.com/googleapis/gnostic/openapiv2" + openapi_v2 "github.com/google/gnostic/openapiv2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" From 2bba973d33b55dbc9ec7ecdedf94051bf7124f21 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 16 Mar 2022 09:03:45 +0100 Subject: [PATCH 075/111] klog v2.60.1 The new release supports FlushAndExit and contextual logging. Kubernetes-commit: 09aa1071cdde5ebc2c931c994fbb1e974c2a1515 --- go.mod | 11 ++++++----- go.sum | 8 ++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 56fe9cb6f..33a76db2d 100644 --- a/go.mod +++ b/go.mod @@ -30,9 +30,9 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220324090946-b14ef0668e67 - k8s.io/apimachinery v0.0.0-20220324053133-ff4eb2c3bb33 - k8s.io/klog/v2 v2.40.1 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 + k8s.io/klog/v2 v2.60.1 k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 sigs.k8s.io/structured-merge-diff/v4 v4.2.1 @@ -40,6 +40,7 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220324090946-b14ef0668e67 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220324053133-ff4eb2c3bb33 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index 8061faa0f..92cff7d9a 100644 --- a/go.sum +++ b/go.sum @@ -613,15 +613,11 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220324090946-b14ef0668e67 h1:ZDu3Mx45i5JacKJYS1mp1FVLEHV8IOqABYOlmviE3bw= -k8s.io/api v0.0.0-20220324090946-b14ef0668e67/go.mod h1:RvsmB1DuKSEVw+3ZZ6fseROF1PYQkewMo0uNNvIcXKs= -k8s.io/apimachinery v0.0.0-20220324053133-ff4eb2c3bb33 h1:rqh0+l8pJjwdBxu6ZY7tQelgvc4bIC4MlXYkpLsk49Y= -k8s.io/apimachinery v0.0.0-20220324053133-ff4eb2c3bb33/go.mod h1:Xig8YiaWvp151KCOs9q3j/mLnW/ooZAR6EtxqHwhtD0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.40.1 h1:P4RRucWk/lFOlDdkAr3mc7iWFkgKrZY9qZMAgek06S4= -k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= +k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18 h1:M0Korml79JW27ndc6lxLxkNP8QVqdpBj0MIEZliKy8A= k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18/go.mod h1:p8bjuqy9+BWvBDEBjdeVYtX6kMWWg6OhY1V1jhC9MPI= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From 6889a6b513d4b6b374bec632433d39f5aede033d Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Wed, 16 Mar 2022 15:14:10 -0700 Subject: [PATCH 076/111] Merge pull request #108644 from Jefftree/googleapis-gnostic googleapis/gnostic -> google/gnostic and update kube-openapi Kubernetes-commit: b195a64d45e1880878a22d178055f1b4220dcb43 --- go.mod | 9 ++++----- go.sum | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 243c299e6..0c7674ea3 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0 - k8s.io/apimachinery v0.0.0 + k8s.io/api v0.0.0-20220317021646-b9830ac37b46 + k8s.io/apimachinery v0.0.0-20220317021027-c68a4df61d4d k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -40,7 +40,6 @@ require ( ) replace ( - k8s.io/api => ../api - k8s.io/apimachinery => ../apimachinery - k8s.io/client-go => ../client-go + k8s.io/api => k8s.io/api v0.0.0-20220317021646-b9830ac37b46 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220317021027-c68a4df61d4d ) diff --git a/go.sum b/go.sum index cdf60379c..7b4b8935e 100644 --- a/go.sum +++ b/go.sum @@ -613,6 +613,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.0.0-20220317021646-b9830ac37b46 h1:GiOCYRoSGe/xX3X60/Z+3Xq6C9/dyKcRElTN01Hpg3o= +k8s.io/api v0.0.0-20220317021646-b9830ac37b46/go.mod h1:RvsmB1DuKSEVw+3ZZ6fseROF1PYQkewMo0uNNvIcXKs= +k8s.io/apimachinery v0.0.0-20220317021027-c68a4df61d4d h1:X97IrPL+mdzFxeVmVkbtko19rowdqorN20036BKf+qQ= +k8s.io/apimachinery v0.0.0-20220317021027-c68a4df61d4d/go.mod h1:Xig8YiaWvp151KCOs9q3j/mLnW/ooZAR6EtxqHwhtD0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 7390aacfebf4c03357b6c99a203d67f0f7564efa Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Thu, 17 Mar 2022 13:19:43 +0100 Subject: [PATCH 077/111] default kubernetes agent for generated clients Set default kubernetes agent if empty Kubernetes-commit: c732bb8348b6ef4acc3ac7d006d56e6956141dd5 --- kubernetes_test/clientset_test.go | 88 +++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 kubernetes_test/clientset_test.go diff --git a/kubernetes_test/clientset_test.go b/kubernetes_test/clientset_test.go new file mode 100644 index 000000000..ce1b1283a --- /dev/null +++ b/kubernetes_test/clientset_test.go @@ -0,0 +1,88 @@ +/* +Copyright 2022 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. +*/ + +package kubernetes_test + +import ( + "context" + "net/http" + "net/http/httptest" + "testing" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" +) + +func TestClientUserAgent(t *testing.T) { + tests := []struct { + name string + userAgent string + expect string + }{ + { + name: "empty", + expect: rest.DefaultKubernetesUserAgent(), + }, + { + name: "custom", + userAgent: "test-agent", + expect: "test-agent", + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + userAgent := r.Header.Get("User-Agent") + if userAgent != tc.expect { + t.Errorf("User Agent expected: %s got: %s", tc.expect, userAgent) + http.Error(w, "Unexpected user agent", http.StatusBadRequest) + return + } + w.Header().Set("Content-Type", "application/json") + w.Write([]byte("{}")) + })) + ts.Start() + defer ts.Close() + + gv := v1.SchemeGroupVersion + config := &rest.Config{ + Host: ts.URL, + } + config.GroupVersion = &gv + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.UserAgent = tc.userAgent + config.ContentType = "application/json" + + client, err := kubernetes.NewForConfig(config) + if err != nil { + t.Fatalf("failed to create REST client: %v", err) + } + _, err = client.CoreV1().Pods("").List(context.TODO(), metav1.ListOptions{}) + if err != nil { + t.Error(err) + } + _, err = client.CoreV1().Secrets("").List(context.TODO(), metav1.ListOptions{}) + if err != nil { + t.Error(err) + } + }) + } + +} From 0f3c7919bf3adaf8c767759e16e8f13b06e6881a Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Thu, 17 Mar 2022 16:03:10 +0100 Subject: [PATCH 078/111] client-go: update generated Kubernetes-commit: 1d5ad2264cbebe2ce33e288451c2757fa16a1956 --- kubernetes/clientset.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kubernetes/clientset.go b/kubernetes/clientset.go index 3e512a7c2..e46c0537f 100644 --- a/kubernetes/clientset.go +++ b/kubernetes/clientset.go @@ -413,6 +413,10 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + // share the transport between all clients httpClient, err := rest.HTTPClientFor(&configShallowCopy) if err != nil { From 14e253c7f845295db8383dd217e3f22c9ed5c720 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Thu, 17 Mar 2022 18:35:00 +0000 Subject: [PATCH 079/111] remove unneeded references Kubernetes-commit: 2831f9a343ec405efce60d09da482a654971018e --- testing/fake_test.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/testing/fake_test.go b/testing/fake_test.go index b335e700a..949e0ad6d 100644 --- a/testing/fake_test.go +++ b/testing/fake_test.go @@ -26,8 +26,8 @@ import ( ) func TestOriginalObjectCaptured(t *testing.T) { - // this ReactionFunc sets the resources ClusterName - const testClusterName = "some-value" + // this ReactionFunc sets the resources SelfLink + const testSelfLink = "some-value" reactors := []ReactionFunc{ func(action Action) (bool, runtime.Object, error) { createAction := action.(CreateActionImpl) @@ -37,7 +37,7 @@ func TestOriginalObjectCaptured(t *testing.T) { } // set any field on the resource - accessor.SetClusterName(testClusterName) + accessor.SetSelfLink(testSelfLink) return true, createAction.Object, nil }, @@ -69,7 +69,7 @@ func TestOriginalObjectCaptured(t *testing.T) { } // validate that the returned resource was modified by the ReactionFunc - if accessor.GetClusterName() != testClusterName { + if accessor.GetSelfLink() != testSelfLink { t.Errorf("expected resource returned by Invokes to be modified by the ReactionFunc") } // verify one action was performed @@ -83,14 +83,14 @@ func TestOriginalObjectCaptured(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %v", err) } - if accessor.GetClusterName() != "" { + if accessor.GetSelfLink() != "" { t.Errorf("expected Action recorded to not be modified by ReactionFunc but it was") } } func TestReactorChangesPersisted(t *testing.T) { - // this ReactionFunc sets the resources ClusterName - const testClusterName = "some-value" + // this ReactionFunc sets the resources SelfLink + const testSelfLink = "some-value" reactors := []ReactionFunc{ func(action Action) (bool, runtime.Object, error) { createAction := action.(CreateActionImpl) @@ -100,7 +100,7 @@ func TestReactorChangesPersisted(t *testing.T) { } // set any field on the resource - accessor.SetClusterName(testClusterName) + accessor.SetSelfLink(testSelfLink) return false, createAction.Object, nil }, @@ -111,8 +111,8 @@ func TestReactorChangesPersisted(t *testing.T) { return false, nil, err } - // ensure the clusterName is set to testClusterName already - if accessor.GetClusterName() != testClusterName { + // ensure the selfLink is set to testSelfLink already + if accessor.GetSelfLink() != testSelfLink { t.Errorf("expected resource passed to second reactor to be modified by first reactor") } @@ -146,7 +146,7 @@ func TestReactorChangesPersisted(t *testing.T) { } // validate that the returned resource was modified by the ReactionFunc - if accessor.GetClusterName() != testClusterName { + if accessor.GetSelfLink() != testSelfLink { t.Errorf("expected resource returned by Invokes to be modified by the ReactionFunc") } // verify one action was performed @@ -160,7 +160,7 @@ func TestReactorChangesPersisted(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %v", err) } - if accessor.GetClusterName() != "" { + if accessor.GetSelfLink() != "" { t.Errorf("expected Action recorded to not be modified by ReactionFunc but it was") } } From a34beeba71ef371c5fb542b248e278d732187053 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Thu, 17 Mar 2022 18:27:49 +0000 Subject: [PATCH 080/111] generated files Kubernetes-commit: fad4ba2a34525c4831f89483e696509a88c45ce6 --- .../v1/mutatingwebhookconfiguration.go | 9 --------- .../v1/validatingwebhookconfiguration.go | 9 --------- .../v1beta1/mutatingwebhookconfiguration.go | 9 --------- .../v1beta1/validatingwebhookconfiguration.go | 9 --------- .../apiserverinternal/v1alpha1/storageversion.go | 9 --------- applyconfigurations/apps/v1/controllerrevision.go | 9 --------- applyconfigurations/apps/v1/daemonset.go | 9 --------- applyconfigurations/apps/v1/deployment.go | 9 --------- applyconfigurations/apps/v1/replicaset.go | 9 --------- applyconfigurations/apps/v1/statefulset.go | 9 --------- applyconfigurations/apps/v1beta1/controllerrevision.go | 9 --------- applyconfigurations/apps/v1beta1/deployment.go | 9 --------- applyconfigurations/apps/v1beta1/statefulset.go | 9 --------- applyconfigurations/apps/v1beta2/controllerrevision.go | 9 --------- applyconfigurations/apps/v1beta2/daemonset.go | 9 --------- applyconfigurations/apps/v1beta2/deployment.go | 9 --------- applyconfigurations/apps/v1beta2/replicaset.go | 9 --------- applyconfigurations/apps/v1beta2/scale.go | 9 --------- applyconfigurations/apps/v1beta2/statefulset.go | 9 --------- .../autoscaling/v1/horizontalpodautoscaler.go | 9 --------- applyconfigurations/autoscaling/v1/scale.go | 9 --------- .../autoscaling/v2/horizontalpodautoscaler.go | 9 --------- .../autoscaling/v2beta1/horizontalpodautoscaler.go | 9 --------- .../autoscaling/v2beta2/horizontalpodautoscaler.go | 9 --------- applyconfigurations/batch/v1/cronjob.go | 9 --------- applyconfigurations/batch/v1/job.go | 9 --------- applyconfigurations/batch/v1/jobtemplatespec.go | 9 --------- applyconfigurations/batch/v1beta1/cronjob.go | 9 --------- applyconfigurations/batch/v1beta1/jobtemplatespec.go | 9 --------- .../certificates/v1/certificatesigningrequest.go | 9 --------- .../certificates/v1beta1/certificatesigningrequest.go | 9 --------- applyconfigurations/coordination/v1/lease.go | 9 --------- applyconfigurations/coordination/v1beta1/lease.go | 9 --------- applyconfigurations/core/v1/componentstatus.go | 9 --------- applyconfigurations/core/v1/configmap.go | 9 --------- applyconfigurations/core/v1/endpoints.go | 9 --------- applyconfigurations/core/v1/event.go | 9 --------- applyconfigurations/core/v1/limitrange.go | 9 --------- applyconfigurations/core/v1/namespace.go | 9 --------- applyconfigurations/core/v1/node.go | 9 --------- applyconfigurations/core/v1/persistentvolume.go | 9 --------- applyconfigurations/core/v1/persistentvolumeclaim.go | 9 --------- .../core/v1/persistentvolumeclaimtemplate.go | 9 --------- applyconfigurations/core/v1/pod.go | 9 --------- applyconfigurations/core/v1/podtemplate.go | 9 --------- applyconfigurations/core/v1/podtemplatespec.go | 9 --------- applyconfigurations/core/v1/replicationcontroller.go | 9 --------- applyconfigurations/core/v1/resourcequota.go | 9 --------- applyconfigurations/core/v1/secret.go | 9 --------- applyconfigurations/core/v1/service.go | 9 --------- applyconfigurations/core/v1/serviceaccount.go | 9 --------- applyconfigurations/discovery/v1/endpointslice.go | 9 --------- applyconfigurations/discovery/v1beta1/endpointslice.go | 9 --------- applyconfigurations/events/v1/event.go | 9 --------- applyconfigurations/events/v1beta1/event.go | 9 --------- applyconfigurations/extensions/v1beta1/daemonset.go | 9 --------- applyconfigurations/extensions/v1beta1/deployment.go | 9 --------- applyconfigurations/extensions/v1beta1/ingress.go | 9 --------- applyconfigurations/extensions/v1beta1/networkpolicy.go | 9 --------- .../extensions/v1beta1/podsecuritypolicy.go | 9 --------- applyconfigurations/extensions/v1beta1/replicaset.go | 9 --------- applyconfigurations/extensions/v1beta1/scale.go | 9 --------- applyconfigurations/flowcontrol/v1alpha1/flowschema.go | 9 --------- .../flowcontrol/v1alpha1/prioritylevelconfiguration.go | 9 --------- applyconfigurations/flowcontrol/v1beta1/flowschema.go | 9 --------- .../flowcontrol/v1beta1/prioritylevelconfiguration.go | 9 --------- applyconfigurations/flowcontrol/v1beta2/flowschema.go | 9 --------- .../flowcontrol/v1beta2/prioritylevelconfiguration.go | 9 --------- applyconfigurations/imagepolicy/v1alpha1/imagereview.go | 9 --------- applyconfigurations/meta/v1/objectmeta.go | 9 --------- applyconfigurations/networking/v1/ingress.go | 9 --------- applyconfigurations/networking/v1/ingressclass.go | 9 --------- applyconfigurations/networking/v1/networkpolicy.go | 9 --------- applyconfigurations/networking/v1beta1/ingress.go | 9 --------- applyconfigurations/networking/v1beta1/ingressclass.go | 9 --------- applyconfigurations/node/v1/runtimeclass.go | 9 --------- applyconfigurations/node/v1alpha1/runtimeclass.go | 9 --------- applyconfigurations/node/v1beta1/runtimeclass.go | 9 --------- applyconfigurations/policy/v1/eviction.go | 9 --------- applyconfigurations/policy/v1/poddisruptionbudget.go | 9 --------- applyconfigurations/policy/v1beta1/eviction.go | 9 --------- .../policy/v1beta1/poddisruptionbudget.go | 9 --------- applyconfigurations/policy/v1beta1/podsecuritypolicy.go | 9 --------- applyconfigurations/rbac/v1/clusterrole.go | 9 --------- applyconfigurations/rbac/v1/clusterrolebinding.go | 9 --------- applyconfigurations/rbac/v1/role.go | 9 --------- applyconfigurations/rbac/v1/rolebinding.go | 9 --------- applyconfigurations/rbac/v1alpha1/clusterrole.go | 9 --------- applyconfigurations/rbac/v1alpha1/clusterrolebinding.go | 9 --------- applyconfigurations/rbac/v1alpha1/role.go | 9 --------- applyconfigurations/rbac/v1alpha1/rolebinding.go | 9 --------- applyconfigurations/rbac/v1beta1/clusterrole.go | 9 --------- applyconfigurations/rbac/v1beta1/clusterrolebinding.go | 9 --------- applyconfigurations/rbac/v1beta1/role.go | 9 --------- applyconfigurations/rbac/v1beta1/rolebinding.go | 9 --------- applyconfigurations/scheduling/v1/priorityclass.go | 9 --------- applyconfigurations/scheduling/v1alpha1/priorityclass.go | 9 --------- applyconfigurations/scheduling/v1beta1/priorityclass.go | 9 --------- applyconfigurations/storage/v1/csidriver.go | 9 --------- applyconfigurations/storage/v1/csinode.go | 9 --------- applyconfigurations/storage/v1/csistoragecapacity.go | 9 --------- applyconfigurations/storage/v1/storageclass.go | 9 --------- applyconfigurations/storage/v1/volumeattachment.go | 9 --------- .../storage/v1alpha1/csistoragecapacity.go | 9 --------- applyconfigurations/storage/v1alpha1/volumeattachment.go | 9 --------- applyconfigurations/storage/v1beta1/csidriver.go | 9 --------- applyconfigurations/storage/v1beta1/csinode.go | 9 --------- .../storage/v1beta1/csistoragecapacity.go | 9 --------- applyconfigurations/storage/v1beta1/storageclass.go | 9 --------- applyconfigurations/storage/v1beta1/volumeattachment.go | 9 --------- 110 files changed, 990 deletions(-) diff --git a/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go b/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go index df10171e8..61c8f667d 100644 --- a/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -232,15 +232,6 @@ func (b *MutatingWebhookConfigurationApplyConfiguration) WithFinalizers(values . return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *MutatingWebhookConfigurationApplyConfiguration) WithClusterName(value string) *MutatingWebhookConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *MutatingWebhookConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go b/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go index 3bbdbacc2..811bfdf0b 100644 --- a/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go @@ -232,15 +232,6 @@ func (b *ValidatingWebhookConfigurationApplyConfiguration) WithFinalizers(values return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ValidatingWebhookConfigurationApplyConfiguration) WithClusterName(value string) *ValidatingWebhookConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ValidatingWebhookConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index af0b1ac0c..10dd034e2 100644 --- a/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -232,15 +232,6 @@ func (b *MutatingWebhookConfigurationApplyConfiguration) WithFinalizers(values . return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *MutatingWebhookConfigurationApplyConfiguration) WithClusterName(value string) *MutatingWebhookConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *MutatingWebhookConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 2de7bb2b3..75f1b9d71 100644 --- a/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -232,15 +232,6 @@ func (b *ValidatingWebhookConfigurationApplyConfiguration) WithFinalizers(values return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ValidatingWebhookConfigurationApplyConfiguration) WithClusterName(value string) *ValidatingWebhookConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ValidatingWebhookConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go b/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go index a0732d062..6b9f17839 100644 --- a/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go +++ b/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go @@ -233,15 +233,6 @@ func (b *StorageVersionApplyConfiguration) WithFinalizers(values ...string) *Sto return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *StorageVersionApplyConfiguration) WithClusterName(value string) *StorageVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *StorageVersionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1/controllerrevision.go b/applyconfigurations/apps/v1/controllerrevision.go index c818fd9fd..c4e208507 100644 --- a/applyconfigurations/apps/v1/controllerrevision.go +++ b/applyconfigurations/apps/v1/controllerrevision.go @@ -236,15 +236,6 @@ func (b *ControllerRevisionApplyConfiguration) WithFinalizers(values ...string) return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ControllerRevisionApplyConfiguration) WithClusterName(value string) *ControllerRevisionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ControllerRevisionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1/daemonset.go b/applyconfigurations/apps/v1/daemonset.go index c88861900..cc9fdcd5d 100644 --- a/applyconfigurations/apps/v1/daemonset.go +++ b/applyconfigurations/apps/v1/daemonset.go @@ -235,15 +235,6 @@ func (b *DaemonSetApplyConfiguration) WithFinalizers(values ...string) *DaemonSe return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *DaemonSetApplyConfiguration) WithClusterName(value string) *DaemonSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *DaemonSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1/deployment.go b/applyconfigurations/apps/v1/deployment.go index 4364ca65c..13edda772 100644 --- a/applyconfigurations/apps/v1/deployment.go +++ b/applyconfigurations/apps/v1/deployment.go @@ -235,15 +235,6 @@ func (b *DeploymentApplyConfiguration) WithFinalizers(values ...string) *Deploym return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *DeploymentApplyConfiguration) WithClusterName(value string) *DeploymentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *DeploymentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1/replicaset.go b/applyconfigurations/apps/v1/replicaset.go index f8e87da98..4e7818e53 100644 --- a/applyconfigurations/apps/v1/replicaset.go +++ b/applyconfigurations/apps/v1/replicaset.go @@ -235,15 +235,6 @@ func (b *ReplicaSetApplyConfiguration) WithFinalizers(values ...string) *Replica return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ReplicaSetApplyConfiguration) WithClusterName(value string) *ReplicaSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ReplicaSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1/statefulset.go b/applyconfigurations/apps/v1/statefulset.go index ad8fef28b..24041d99f 100644 --- a/applyconfigurations/apps/v1/statefulset.go +++ b/applyconfigurations/apps/v1/statefulset.go @@ -235,15 +235,6 @@ func (b *StatefulSetApplyConfiguration) WithFinalizers(values ...string) *Statef return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *StatefulSetApplyConfiguration) WithClusterName(value string) *StatefulSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *StatefulSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1beta1/controllerrevision.go b/applyconfigurations/apps/v1beta1/controllerrevision.go index 4d5c851da..827c06359 100644 --- a/applyconfigurations/apps/v1beta1/controllerrevision.go +++ b/applyconfigurations/apps/v1beta1/controllerrevision.go @@ -236,15 +236,6 @@ func (b *ControllerRevisionApplyConfiguration) WithFinalizers(values ...string) return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ControllerRevisionApplyConfiguration) WithClusterName(value string) *ControllerRevisionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ControllerRevisionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1beta1/deployment.go b/applyconfigurations/apps/v1beta1/deployment.go index c04dd56ef..e22f76b66 100644 --- a/applyconfigurations/apps/v1beta1/deployment.go +++ b/applyconfigurations/apps/v1beta1/deployment.go @@ -235,15 +235,6 @@ func (b *DeploymentApplyConfiguration) WithFinalizers(values ...string) *Deploym return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *DeploymentApplyConfiguration) WithClusterName(value string) *DeploymentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *DeploymentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1beta1/statefulset.go b/applyconfigurations/apps/v1beta1/statefulset.go index b6b8100be..ed5cfab41 100644 --- a/applyconfigurations/apps/v1beta1/statefulset.go +++ b/applyconfigurations/apps/v1beta1/statefulset.go @@ -235,15 +235,6 @@ func (b *StatefulSetApplyConfiguration) WithFinalizers(values ...string) *Statef return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *StatefulSetApplyConfiguration) WithClusterName(value string) *StatefulSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *StatefulSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1beta2/controllerrevision.go b/applyconfigurations/apps/v1beta2/controllerrevision.go index 147f52c7b..4abab6851 100644 --- a/applyconfigurations/apps/v1beta2/controllerrevision.go +++ b/applyconfigurations/apps/v1beta2/controllerrevision.go @@ -236,15 +236,6 @@ func (b *ControllerRevisionApplyConfiguration) WithFinalizers(values ...string) return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ControllerRevisionApplyConfiguration) WithClusterName(value string) *ControllerRevisionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ControllerRevisionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1beta2/daemonset.go b/applyconfigurations/apps/v1beta2/daemonset.go index 7786c2783..906a8ca46 100644 --- a/applyconfigurations/apps/v1beta2/daemonset.go +++ b/applyconfigurations/apps/v1beta2/daemonset.go @@ -235,15 +235,6 @@ func (b *DaemonSetApplyConfiguration) WithFinalizers(values ...string) *DaemonSe return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *DaemonSetApplyConfiguration) WithClusterName(value string) *DaemonSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *DaemonSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1beta2/deployment.go b/applyconfigurations/apps/v1beta2/deployment.go index 197dd5114..7e39e6751 100644 --- a/applyconfigurations/apps/v1beta2/deployment.go +++ b/applyconfigurations/apps/v1beta2/deployment.go @@ -235,15 +235,6 @@ func (b *DeploymentApplyConfiguration) WithFinalizers(values ...string) *Deploym return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *DeploymentApplyConfiguration) WithClusterName(value string) *DeploymentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *DeploymentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1beta2/replicaset.go b/applyconfigurations/apps/v1beta2/replicaset.go index 458b2513c..d9303e1b2 100644 --- a/applyconfigurations/apps/v1beta2/replicaset.go +++ b/applyconfigurations/apps/v1beta2/replicaset.go @@ -235,15 +235,6 @@ func (b *ReplicaSetApplyConfiguration) WithFinalizers(values ...string) *Replica return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ReplicaSetApplyConfiguration) WithClusterName(value string) *ReplicaSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ReplicaSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1beta2/scale.go b/applyconfigurations/apps/v1beta2/scale.go index 547bb6fb1..0e89668cb 100644 --- a/applyconfigurations/apps/v1beta2/scale.go +++ b/applyconfigurations/apps/v1beta2/scale.go @@ -195,15 +195,6 @@ func (b *ScaleApplyConfiguration) WithFinalizers(values ...string) *ScaleApplyCo return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ScaleApplyConfiguration) WithClusterName(value string) *ScaleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ScaleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/apps/v1beta2/statefulset.go b/applyconfigurations/apps/v1beta2/statefulset.go index bda280d9d..03d5428b4 100644 --- a/applyconfigurations/apps/v1beta2/statefulset.go +++ b/applyconfigurations/apps/v1beta2/statefulset.go @@ -235,15 +235,6 @@ func (b *StatefulSetApplyConfiguration) WithFinalizers(values ...string) *Statef return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *StatefulSetApplyConfiguration) WithClusterName(value string) *StatefulSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *StatefulSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go b/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go index 9ea70befa..38fa20584 100644 --- a/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go +++ b/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go @@ -235,15 +235,6 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithFinalizers(values ...str return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *HorizontalPodAutoscalerApplyConfiguration) WithClusterName(value string) *HorizontalPodAutoscalerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *HorizontalPodAutoscalerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/autoscaling/v1/scale.go b/applyconfigurations/autoscaling/v1/scale.go index 9fea50d57..f77092280 100644 --- a/applyconfigurations/autoscaling/v1/scale.go +++ b/applyconfigurations/autoscaling/v1/scale.go @@ -194,15 +194,6 @@ func (b *ScaleApplyConfiguration) WithFinalizers(values ...string) *ScaleApplyCo return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ScaleApplyConfiguration) WithClusterName(value string) *ScaleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ScaleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go b/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go index 8008f6d1e..31061de85 100644 --- a/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go +++ b/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go @@ -235,15 +235,6 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithFinalizers(values ...str return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *HorizontalPodAutoscalerApplyConfiguration) WithClusterName(value string) *HorizontalPodAutoscalerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *HorizontalPodAutoscalerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go b/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go index 18be79829..66b8d5f73 100644 --- a/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -235,15 +235,6 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithFinalizers(values ...str return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *HorizontalPodAutoscalerApplyConfiguration) WithClusterName(value string) *HorizontalPodAutoscalerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *HorizontalPodAutoscalerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go b/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go index e1e881183..1c750cb16 100644 --- a/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -235,15 +235,6 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithFinalizers(values ...str return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *HorizontalPodAutoscalerApplyConfiguration) WithClusterName(value string) *HorizontalPodAutoscalerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *HorizontalPodAutoscalerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/batch/v1/cronjob.go b/applyconfigurations/batch/v1/cronjob.go index 95cd8bd46..5225a5a07 100644 --- a/applyconfigurations/batch/v1/cronjob.go +++ b/applyconfigurations/batch/v1/cronjob.go @@ -235,15 +235,6 @@ func (b *CronJobApplyConfiguration) WithFinalizers(values ...string) *CronJobApp return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *CronJobApplyConfiguration) WithClusterName(value string) *CronJobApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *CronJobApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/batch/v1/job.go b/applyconfigurations/batch/v1/job.go index fe82f0a9c..fb10ba396 100644 --- a/applyconfigurations/batch/v1/job.go +++ b/applyconfigurations/batch/v1/job.go @@ -235,15 +235,6 @@ func (b *JobApplyConfiguration) WithFinalizers(values ...string) *JobApplyConfig return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *JobApplyConfiguration) WithClusterName(value string) *JobApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *JobApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/batch/v1/jobtemplatespec.go b/applyconfigurations/batch/v1/jobtemplatespec.go index 613036164..b37a81568 100644 --- a/applyconfigurations/batch/v1/jobtemplatespec.go +++ b/applyconfigurations/batch/v1/jobtemplatespec.go @@ -173,15 +173,6 @@ func (b *JobTemplateSpecApplyConfiguration) WithFinalizers(values ...string) *Jo return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *JobTemplateSpecApplyConfiguration) WithClusterName(value string) *JobTemplateSpecApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *JobTemplateSpecApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/batch/v1beta1/cronjob.go b/applyconfigurations/batch/v1beta1/cronjob.go index 7477eccf4..1d735a840 100644 --- a/applyconfigurations/batch/v1beta1/cronjob.go +++ b/applyconfigurations/batch/v1beta1/cronjob.go @@ -235,15 +235,6 @@ func (b *CronJobApplyConfiguration) WithFinalizers(values ...string) *CronJobApp return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *CronJobApplyConfiguration) WithClusterName(value string) *CronJobApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *CronJobApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/batch/v1beta1/jobtemplatespec.go b/applyconfigurations/batch/v1beta1/jobtemplatespec.go index 1a6670297..f925d65a7 100644 --- a/applyconfigurations/batch/v1beta1/jobtemplatespec.go +++ b/applyconfigurations/batch/v1beta1/jobtemplatespec.go @@ -174,15 +174,6 @@ func (b *JobTemplateSpecApplyConfiguration) WithFinalizers(values ...string) *Jo return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *JobTemplateSpecApplyConfiguration) WithClusterName(value string) *JobTemplateSpecApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *JobTemplateSpecApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/certificates/v1/certificatesigningrequest.go b/applyconfigurations/certificates/v1/certificatesigningrequest.go index 152c16249..3d02c0be8 100644 --- a/applyconfigurations/certificates/v1/certificatesigningrequest.go +++ b/applyconfigurations/certificates/v1/certificatesigningrequest.go @@ -233,15 +233,6 @@ func (b *CertificateSigningRequestApplyConfiguration) WithFinalizers(values ...s return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *CertificateSigningRequestApplyConfiguration) WithClusterName(value string) *CertificateSigningRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *CertificateSigningRequestApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go b/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go index d64b31a95..83a0edc18 100644 --- a/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go +++ b/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go @@ -233,15 +233,6 @@ func (b *CertificateSigningRequestApplyConfiguration) WithFinalizers(values ...s return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *CertificateSigningRequestApplyConfiguration) WithClusterName(value string) *CertificateSigningRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *CertificateSigningRequestApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/coordination/v1/lease.go b/applyconfigurations/coordination/v1/lease.go index a21956977..618f12fb2 100644 --- a/applyconfigurations/coordination/v1/lease.go +++ b/applyconfigurations/coordination/v1/lease.go @@ -234,15 +234,6 @@ func (b *LeaseApplyConfiguration) WithFinalizers(values ...string) *LeaseApplyCo return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *LeaseApplyConfiguration) WithClusterName(value string) *LeaseApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *LeaseApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/coordination/v1beta1/lease.go b/applyconfigurations/coordination/v1beta1/lease.go index 4bff597a0..867e0f58b 100644 --- a/applyconfigurations/coordination/v1beta1/lease.go +++ b/applyconfigurations/coordination/v1beta1/lease.go @@ -234,15 +234,6 @@ func (b *LeaseApplyConfiguration) WithFinalizers(values ...string) *LeaseApplyCo return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *LeaseApplyConfiguration) WithClusterName(value string) *LeaseApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *LeaseApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/componentstatus.go b/applyconfigurations/core/v1/componentstatus.go index 86c6f3885..300e52694 100644 --- a/applyconfigurations/core/v1/componentstatus.go +++ b/applyconfigurations/core/v1/componentstatus.go @@ -232,15 +232,6 @@ func (b *ComponentStatusApplyConfiguration) WithFinalizers(values ...string) *Co return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ComponentStatusApplyConfiguration) WithClusterName(value string) *ComponentStatusApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ComponentStatusApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/configmap.go b/applyconfigurations/core/v1/configmap.go index 59011a259..f4cc7024d 100644 --- a/applyconfigurations/core/v1/configmap.go +++ b/applyconfigurations/core/v1/configmap.go @@ -236,15 +236,6 @@ func (b *ConfigMapApplyConfiguration) WithFinalizers(values ...string) *ConfigMa return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ConfigMapApplyConfiguration) WithClusterName(value string) *ConfigMapApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ConfigMapApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/endpoints.go b/applyconfigurations/core/v1/endpoints.go index 12844ad76..b98fed085 100644 --- a/applyconfigurations/core/v1/endpoints.go +++ b/applyconfigurations/core/v1/endpoints.go @@ -234,15 +234,6 @@ func (b *EndpointsApplyConfiguration) WithFinalizers(values ...string) *Endpoint return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *EndpointsApplyConfiguration) WithClusterName(value string) *EndpointsApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *EndpointsApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/event.go b/applyconfigurations/core/v1/event.go index 65bd7c00b..60aff6b5b 100644 --- a/applyconfigurations/core/v1/event.go +++ b/applyconfigurations/core/v1/event.go @@ -247,15 +247,6 @@ func (b *EventApplyConfiguration) WithFinalizers(values ...string) *EventApplyCo return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *EventApplyConfiguration) WithClusterName(value string) *EventApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *EventApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/limitrange.go b/applyconfigurations/core/v1/limitrange.go index ab30ab665..eaf635c76 100644 --- a/applyconfigurations/core/v1/limitrange.go +++ b/applyconfigurations/core/v1/limitrange.go @@ -234,15 +234,6 @@ func (b *LimitRangeApplyConfiguration) WithFinalizers(values ...string) *LimitRa return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *LimitRangeApplyConfiguration) WithClusterName(value string) *LimitRangeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *LimitRangeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/namespace.go b/applyconfigurations/core/v1/namespace.go index 636b948e7..bdc9ef167 100644 --- a/applyconfigurations/core/v1/namespace.go +++ b/applyconfigurations/core/v1/namespace.go @@ -233,15 +233,6 @@ func (b *NamespaceApplyConfiguration) WithFinalizers(values ...string) *Namespac return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *NamespaceApplyConfiguration) WithClusterName(value string) *NamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *NamespaceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/node.go b/applyconfigurations/core/v1/node.go index 43c824d1e..047f4ac1c 100644 --- a/applyconfigurations/core/v1/node.go +++ b/applyconfigurations/core/v1/node.go @@ -233,15 +233,6 @@ func (b *NodeApplyConfiguration) WithFinalizers(values ...string) *NodeApplyConf return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithClusterName(value string) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *NodeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/persistentvolume.go b/applyconfigurations/core/v1/persistentvolume.go index a684d3b50..2599c197e 100644 --- a/applyconfigurations/core/v1/persistentvolume.go +++ b/applyconfigurations/core/v1/persistentvolume.go @@ -233,15 +233,6 @@ func (b *PersistentVolumeApplyConfiguration) WithFinalizers(values ...string) *P return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PersistentVolumeApplyConfiguration) WithClusterName(value string) *PersistentVolumeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PersistentVolumeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/persistentvolumeclaim.go b/applyconfigurations/core/v1/persistentvolumeclaim.go index 759d06af2..a0a001701 100644 --- a/applyconfigurations/core/v1/persistentvolumeclaim.go +++ b/applyconfigurations/core/v1/persistentvolumeclaim.go @@ -235,15 +235,6 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithFinalizers(values ...strin return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PersistentVolumeClaimApplyConfiguration) WithClusterName(value string) *PersistentVolumeClaimApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PersistentVolumeClaimApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go b/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go index 954184df6..894d04f0b 100644 --- a/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go +++ b/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go @@ -173,15 +173,6 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithFinalizers(values return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithClusterName(value string) *PersistentVolumeClaimTemplateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PersistentVolumeClaimTemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/pod.go b/applyconfigurations/core/v1/pod.go index db078fd0b..7210bd983 100644 --- a/applyconfigurations/core/v1/pod.go +++ b/applyconfigurations/core/v1/pod.go @@ -235,15 +235,6 @@ func (b *PodApplyConfiguration) WithFinalizers(values ...string) *PodApplyConfig return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PodApplyConfiguration) WithClusterName(value string) *PodApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PodApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/podtemplate.go b/applyconfigurations/core/v1/podtemplate.go index 9fb3958d5..7fe51d9e1 100644 --- a/applyconfigurations/core/v1/podtemplate.go +++ b/applyconfigurations/core/v1/podtemplate.go @@ -234,15 +234,6 @@ func (b *PodTemplateApplyConfiguration) WithFinalizers(values ...string) *PodTem return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PodTemplateApplyConfiguration) WithClusterName(value string) *PodTemplateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PodTemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/podtemplatespec.go b/applyconfigurations/core/v1/podtemplatespec.go index ec0ca5556..82878a9ac 100644 --- a/applyconfigurations/core/v1/podtemplatespec.go +++ b/applyconfigurations/core/v1/podtemplatespec.go @@ -173,15 +173,6 @@ func (b *PodTemplateSpecApplyConfiguration) WithFinalizers(values ...string) *Po return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PodTemplateSpecApplyConfiguration) WithClusterName(value string) *PodTemplateSpecApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PodTemplateSpecApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/replicationcontroller.go b/applyconfigurations/core/v1/replicationcontroller.go index 98f84163e..7cd71460a 100644 --- a/applyconfigurations/core/v1/replicationcontroller.go +++ b/applyconfigurations/core/v1/replicationcontroller.go @@ -235,15 +235,6 @@ func (b *ReplicationControllerApplyConfiguration) WithFinalizers(values ...strin return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ReplicationControllerApplyConfiguration) WithClusterName(value string) *ReplicationControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ReplicationControllerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/resourcequota.go b/applyconfigurations/core/v1/resourcequota.go index 206606441..6b22ebdc5 100644 --- a/applyconfigurations/core/v1/resourcequota.go +++ b/applyconfigurations/core/v1/resourcequota.go @@ -235,15 +235,6 @@ func (b *ResourceQuotaApplyConfiguration) WithFinalizers(values ...string) *Reso return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ResourceQuotaApplyConfiguration) WithClusterName(value string) *ResourceQuotaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ResourceQuotaApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/secret.go b/applyconfigurations/core/v1/secret.go index d7597ce75..3f7e1eb03 100644 --- a/applyconfigurations/core/v1/secret.go +++ b/applyconfigurations/core/v1/secret.go @@ -237,15 +237,6 @@ func (b *SecretApplyConfiguration) WithFinalizers(values ...string) *SecretApply return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *SecretApplyConfiguration) WithClusterName(value string) *SecretApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *SecretApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/service.go b/applyconfigurations/core/v1/service.go index bfd223038..3fa119523 100644 --- a/applyconfigurations/core/v1/service.go +++ b/applyconfigurations/core/v1/service.go @@ -235,15 +235,6 @@ func (b *ServiceApplyConfiguration) WithFinalizers(values ...string) *ServiceApp return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ServiceApplyConfiguration) WithClusterName(value string) *ServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ServiceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/core/v1/serviceaccount.go b/applyconfigurations/core/v1/serviceaccount.go index a65899c73..53a819375 100644 --- a/applyconfigurations/core/v1/serviceaccount.go +++ b/applyconfigurations/core/v1/serviceaccount.go @@ -236,15 +236,6 @@ func (b *ServiceAccountApplyConfiguration) WithFinalizers(values ...string) *Ser return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ServiceAccountApplyConfiguration) WithClusterName(value string) *ServiceAccountApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ServiceAccountApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/discovery/v1/endpointslice.go b/applyconfigurations/discovery/v1/endpointslice.go index efcbf98f5..640613753 100644 --- a/applyconfigurations/discovery/v1/endpointslice.go +++ b/applyconfigurations/discovery/v1/endpointslice.go @@ -236,15 +236,6 @@ func (b *EndpointSliceApplyConfiguration) WithFinalizers(values ...string) *Endp return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *EndpointSliceApplyConfiguration) WithClusterName(value string) *EndpointSliceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *EndpointSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/discovery/v1beta1/endpointslice.go b/applyconfigurations/discovery/v1beta1/endpointslice.go index 865f06273..74a24773c 100644 --- a/applyconfigurations/discovery/v1beta1/endpointslice.go +++ b/applyconfigurations/discovery/v1beta1/endpointslice.go @@ -236,15 +236,6 @@ func (b *EndpointSliceApplyConfiguration) WithFinalizers(values ...string) *Endp return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *EndpointSliceApplyConfiguration) WithClusterName(value string) *EndpointSliceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *EndpointSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/events/v1/event.go b/applyconfigurations/events/v1/event.go index a5d567327..767e3dfc7 100644 --- a/applyconfigurations/events/v1/event.go +++ b/applyconfigurations/events/v1/event.go @@ -248,15 +248,6 @@ func (b *EventApplyConfiguration) WithFinalizers(values ...string) *EventApplyCo return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *EventApplyConfiguration) WithClusterName(value string) *EventApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *EventApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/events/v1beta1/event.go b/applyconfigurations/events/v1beta1/event.go index ea5fd10d9..cfc4a851f 100644 --- a/applyconfigurations/events/v1beta1/event.go +++ b/applyconfigurations/events/v1beta1/event.go @@ -248,15 +248,6 @@ func (b *EventApplyConfiguration) WithFinalizers(values ...string) *EventApplyCo return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *EventApplyConfiguration) WithClusterName(value string) *EventApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *EventApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/extensions/v1beta1/daemonset.go b/applyconfigurations/extensions/v1beta1/daemonset.go index 1be0ab48e..eae399d32 100644 --- a/applyconfigurations/extensions/v1beta1/daemonset.go +++ b/applyconfigurations/extensions/v1beta1/daemonset.go @@ -235,15 +235,6 @@ func (b *DaemonSetApplyConfiguration) WithFinalizers(values ...string) *DaemonSe return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *DaemonSetApplyConfiguration) WithClusterName(value string) *DaemonSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *DaemonSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/extensions/v1beta1/deployment.go b/applyconfigurations/extensions/v1beta1/deployment.go index c518d1622..878083f82 100644 --- a/applyconfigurations/extensions/v1beta1/deployment.go +++ b/applyconfigurations/extensions/v1beta1/deployment.go @@ -235,15 +235,6 @@ func (b *DeploymentApplyConfiguration) WithFinalizers(values ...string) *Deploym return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *DeploymentApplyConfiguration) WithClusterName(value string) *DeploymentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *DeploymentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/extensions/v1beta1/ingress.go b/applyconfigurations/extensions/v1beta1/ingress.go index cc2806643..46c541048 100644 --- a/applyconfigurations/extensions/v1beta1/ingress.go +++ b/applyconfigurations/extensions/v1beta1/ingress.go @@ -235,15 +235,6 @@ func (b *IngressApplyConfiguration) WithFinalizers(values ...string) *IngressApp return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithClusterName(value string) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *IngressApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/extensions/v1beta1/networkpolicy.go b/applyconfigurations/extensions/v1beta1/networkpolicy.go index 4603c699e..27ea5d9dd 100644 --- a/applyconfigurations/extensions/v1beta1/networkpolicy.go +++ b/applyconfigurations/extensions/v1beta1/networkpolicy.go @@ -234,15 +234,6 @@ func (b *NetworkPolicyApplyConfiguration) WithFinalizers(values ...string) *Netw return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *NetworkPolicyApplyConfiguration) WithClusterName(value string) *NetworkPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *NetworkPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go b/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go index f5ec80b43..c70906cfa 100644 --- a/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go +++ b/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go @@ -232,15 +232,6 @@ func (b *PodSecurityPolicyApplyConfiguration) WithFinalizers(values ...string) * return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PodSecurityPolicyApplyConfiguration) WithClusterName(value string) *PodSecurityPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PodSecurityPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/extensions/v1beta1/replicaset.go b/applyconfigurations/extensions/v1beta1/replicaset.go index 86a122fb5..b2afc835d 100644 --- a/applyconfigurations/extensions/v1beta1/replicaset.go +++ b/applyconfigurations/extensions/v1beta1/replicaset.go @@ -235,15 +235,6 @@ func (b *ReplicaSetApplyConfiguration) WithFinalizers(values ...string) *Replica return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ReplicaSetApplyConfiguration) WithClusterName(value string) *ReplicaSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ReplicaSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/extensions/v1beta1/scale.go b/applyconfigurations/extensions/v1beta1/scale.go index 5147e9655..60a1a8430 100644 --- a/applyconfigurations/extensions/v1beta1/scale.go +++ b/applyconfigurations/extensions/v1beta1/scale.go @@ -195,15 +195,6 @@ func (b *ScaleApplyConfiguration) WithFinalizers(values ...string) *ScaleApplyCo return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ScaleApplyConfiguration) WithClusterName(value string) *ScaleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ScaleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/flowcontrol/v1alpha1/flowschema.go b/applyconfigurations/flowcontrol/v1alpha1/flowschema.go index 07534f9dc..20251d08b 100644 --- a/applyconfigurations/flowcontrol/v1alpha1/flowschema.go +++ b/applyconfigurations/flowcontrol/v1alpha1/flowschema.go @@ -233,15 +233,6 @@ func (b *FlowSchemaApplyConfiguration) WithFinalizers(values ...string) *FlowSch return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *FlowSchemaApplyConfiguration) WithClusterName(value string) *FlowSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *FlowSchemaApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go index 4c683ac67..a40db75dc 100644 --- a/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go @@ -233,15 +233,6 @@ func (b *PriorityLevelConfigurationApplyConfiguration) WithFinalizers(values ... return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PriorityLevelConfigurationApplyConfiguration) WithClusterName(value string) *PriorityLevelConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PriorityLevelConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/flowcontrol/v1beta1/flowschema.go b/applyconfigurations/flowcontrol/v1beta1/flowschema.go index 37155f632..f44313f54 100644 --- a/applyconfigurations/flowcontrol/v1beta1/flowschema.go +++ b/applyconfigurations/flowcontrol/v1beta1/flowschema.go @@ -233,15 +233,6 @@ func (b *FlowSchemaApplyConfiguration) WithFinalizers(values ...string) *FlowSch return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *FlowSchemaApplyConfiguration) WithClusterName(value string) *FlowSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *FlowSchemaApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go b/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go index 1b5624c75..84324dbfd 100644 --- a/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go +++ b/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go @@ -233,15 +233,6 @@ func (b *PriorityLevelConfigurationApplyConfiguration) WithFinalizers(values ... return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PriorityLevelConfigurationApplyConfiguration) WithClusterName(value string) *PriorityLevelConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PriorityLevelConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/flowcontrol/v1beta2/flowschema.go b/applyconfigurations/flowcontrol/v1beta2/flowschema.go index df1f6ce77..63a5f0aa3 100644 --- a/applyconfigurations/flowcontrol/v1beta2/flowschema.go +++ b/applyconfigurations/flowcontrol/v1beta2/flowschema.go @@ -233,15 +233,6 @@ func (b *FlowSchemaApplyConfiguration) WithFinalizers(values ...string) *FlowSch return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *FlowSchemaApplyConfiguration) WithClusterName(value string) *FlowSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *FlowSchemaApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go b/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go index 21c046ebe..3256b3630 100644 --- a/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go +++ b/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go @@ -233,15 +233,6 @@ func (b *PriorityLevelConfigurationApplyConfiguration) WithFinalizers(values ... return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PriorityLevelConfigurationApplyConfiguration) WithClusterName(value string) *PriorityLevelConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PriorityLevelConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/imagepolicy/v1alpha1/imagereview.go b/applyconfigurations/imagepolicy/v1alpha1/imagereview.go index ec55eae52..a25558cc8 100644 --- a/applyconfigurations/imagepolicy/v1alpha1/imagereview.go +++ b/applyconfigurations/imagepolicy/v1alpha1/imagereview.go @@ -233,15 +233,6 @@ func (b *ImageReviewApplyConfiguration) WithFinalizers(values ...string) *ImageR return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ImageReviewApplyConfiguration) WithClusterName(value string) *ImageReviewApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ImageReviewApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/meta/v1/objectmeta.go b/applyconfigurations/meta/v1/objectmeta.go index 9aa840e8d..9b290e968 100644 --- a/applyconfigurations/meta/v1/objectmeta.go +++ b/applyconfigurations/meta/v1/objectmeta.go @@ -39,7 +39,6 @@ type ObjectMetaApplyConfiguration struct { Annotations map[string]string `json:"annotations,omitempty"` OwnerReferences []OwnerReferenceApplyConfiguration `json:"ownerReferences,omitempty"` Finalizers []string `json:"finalizers,omitempty"` - ClusterName *string `json:"clusterName,omitempty"` } // ObjectMetaApplyConfiguration constructs an declarative configuration of the ObjectMeta type for use with @@ -170,11 +169,3 @@ func (b *ObjectMetaApplyConfiguration) WithFinalizers(values ...string) *ObjectM } return b } - -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ObjectMetaApplyConfiguration) WithClusterName(value string) *ObjectMetaApplyConfiguration { - b.ClusterName = &value - return b -} diff --git a/applyconfigurations/networking/v1/ingress.go b/applyconfigurations/networking/v1/ingress.go index 448f80ad9..b5146902d 100644 --- a/applyconfigurations/networking/v1/ingress.go +++ b/applyconfigurations/networking/v1/ingress.go @@ -235,15 +235,6 @@ func (b *IngressApplyConfiguration) WithFinalizers(values ...string) *IngressApp return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithClusterName(value string) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *IngressApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/networking/v1/ingressclass.go b/applyconfigurations/networking/v1/ingressclass.go index 7145e2b96..e33d0b2d9 100644 --- a/applyconfigurations/networking/v1/ingressclass.go +++ b/applyconfigurations/networking/v1/ingressclass.go @@ -232,15 +232,6 @@ func (b *IngressClassApplyConfiguration) WithFinalizers(values ...string) *Ingre return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *IngressClassApplyConfiguration) WithClusterName(value string) *IngressClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *IngressClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/networking/v1/networkpolicy.go b/applyconfigurations/networking/v1/networkpolicy.go index e3376ac64..409507310 100644 --- a/applyconfigurations/networking/v1/networkpolicy.go +++ b/applyconfigurations/networking/v1/networkpolicy.go @@ -234,15 +234,6 @@ func (b *NetworkPolicyApplyConfiguration) WithFinalizers(values ...string) *Netw return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *NetworkPolicyApplyConfiguration) WithClusterName(value string) *NetworkPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *NetworkPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/networking/v1beta1/ingress.go b/applyconfigurations/networking/v1beta1/ingress.go index 24b3663aa..56f65c30a 100644 --- a/applyconfigurations/networking/v1beta1/ingress.go +++ b/applyconfigurations/networking/v1beta1/ingress.go @@ -235,15 +235,6 @@ func (b *IngressApplyConfiguration) WithFinalizers(values ...string) *IngressApp return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithClusterName(value string) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *IngressApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/networking/v1beta1/ingressclass.go b/applyconfigurations/networking/v1beta1/ingressclass.go index 9394003af..b65d4b307 100644 --- a/applyconfigurations/networking/v1beta1/ingressclass.go +++ b/applyconfigurations/networking/v1beta1/ingressclass.go @@ -232,15 +232,6 @@ func (b *IngressClassApplyConfiguration) WithFinalizers(values ...string) *Ingre return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *IngressClassApplyConfiguration) WithClusterName(value string) *IngressClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *IngressClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/node/v1/runtimeclass.go b/applyconfigurations/node/v1/runtimeclass.go index 9a2967d0f..3c9d1fc46 100644 --- a/applyconfigurations/node/v1/runtimeclass.go +++ b/applyconfigurations/node/v1/runtimeclass.go @@ -234,15 +234,6 @@ func (b *RuntimeClassApplyConfiguration) WithFinalizers(values ...string) *Runti return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *RuntimeClassApplyConfiguration) WithClusterName(value string) *RuntimeClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *RuntimeClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/node/v1alpha1/runtimeclass.go b/applyconfigurations/node/v1alpha1/runtimeclass.go index 79cd3e4d9..e680e12de 100644 --- a/applyconfigurations/node/v1alpha1/runtimeclass.go +++ b/applyconfigurations/node/v1alpha1/runtimeclass.go @@ -232,15 +232,6 @@ func (b *RuntimeClassApplyConfiguration) WithFinalizers(values ...string) *Runti return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *RuntimeClassApplyConfiguration) WithClusterName(value string) *RuntimeClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *RuntimeClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/node/v1beta1/runtimeclass.go b/applyconfigurations/node/v1beta1/runtimeclass.go index e9e083c18..f5487665c 100644 --- a/applyconfigurations/node/v1beta1/runtimeclass.go +++ b/applyconfigurations/node/v1beta1/runtimeclass.go @@ -234,15 +234,6 @@ func (b *RuntimeClassApplyConfiguration) WithFinalizers(values ...string) *Runti return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *RuntimeClassApplyConfiguration) WithClusterName(value string) *RuntimeClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *RuntimeClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/policy/v1/eviction.go b/applyconfigurations/policy/v1/eviction.go index 2bdf685ab..76a9533a6 100644 --- a/applyconfigurations/policy/v1/eviction.go +++ b/applyconfigurations/policy/v1/eviction.go @@ -234,15 +234,6 @@ func (b *EvictionApplyConfiguration) WithFinalizers(values ...string) *EvictionA return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *EvictionApplyConfiguration) WithClusterName(value string) *EvictionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *EvictionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/policy/v1/poddisruptionbudget.go b/applyconfigurations/policy/v1/poddisruptionbudget.go index 4f4fa9543..6b547c269 100644 --- a/applyconfigurations/policy/v1/poddisruptionbudget.go +++ b/applyconfigurations/policy/v1/poddisruptionbudget.go @@ -235,15 +235,6 @@ func (b *PodDisruptionBudgetApplyConfiguration) WithFinalizers(values ...string) return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PodDisruptionBudgetApplyConfiguration) WithClusterName(value string) *PodDisruptionBudgetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PodDisruptionBudgetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/policy/v1beta1/eviction.go b/applyconfigurations/policy/v1beta1/eviction.go index 8f177627b..d2a361d1b 100644 --- a/applyconfigurations/policy/v1beta1/eviction.go +++ b/applyconfigurations/policy/v1beta1/eviction.go @@ -234,15 +234,6 @@ func (b *EvictionApplyConfiguration) WithFinalizers(values ...string) *EvictionA return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *EvictionApplyConfiguration) WithClusterName(value string) *EvictionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *EvictionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/policy/v1beta1/poddisruptionbudget.go b/applyconfigurations/policy/v1beta1/poddisruptionbudget.go index f159d727a..cef51a279 100644 --- a/applyconfigurations/policy/v1beta1/poddisruptionbudget.go +++ b/applyconfigurations/policy/v1beta1/poddisruptionbudget.go @@ -235,15 +235,6 @@ func (b *PodDisruptionBudgetApplyConfiguration) WithFinalizers(values ...string) return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PodDisruptionBudgetApplyConfiguration) WithClusterName(value string) *PodDisruptionBudgetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PodDisruptionBudgetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/policy/v1beta1/podsecuritypolicy.go b/applyconfigurations/policy/v1beta1/podsecuritypolicy.go index 5b52c1eec..46cfc4de1 100644 --- a/applyconfigurations/policy/v1beta1/podsecuritypolicy.go +++ b/applyconfigurations/policy/v1beta1/podsecuritypolicy.go @@ -232,15 +232,6 @@ func (b *PodSecurityPolicyApplyConfiguration) WithFinalizers(values ...string) * return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PodSecurityPolicyApplyConfiguration) WithClusterName(value string) *PodSecurityPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PodSecurityPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/rbac/v1/clusterrole.go b/applyconfigurations/rbac/v1/clusterrole.go index 678a0633a..3a5660fe1 100644 --- a/applyconfigurations/rbac/v1/clusterrole.go +++ b/applyconfigurations/rbac/v1/clusterrole.go @@ -233,15 +233,6 @@ func (b *ClusterRoleApplyConfiguration) WithFinalizers(values ...string) *Cluste return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ClusterRoleApplyConfiguration) WithClusterName(value string) *ClusterRoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ClusterRoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/rbac/v1/clusterrolebinding.go b/applyconfigurations/rbac/v1/clusterrolebinding.go index 560566bee..625ad72c4 100644 --- a/applyconfigurations/rbac/v1/clusterrolebinding.go +++ b/applyconfigurations/rbac/v1/clusterrolebinding.go @@ -233,15 +233,6 @@ func (b *ClusterRoleBindingApplyConfiguration) WithFinalizers(values ...string) return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ClusterRoleBindingApplyConfiguration) WithClusterName(value string) *ClusterRoleBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ClusterRoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/rbac/v1/role.go b/applyconfigurations/rbac/v1/role.go index 796063d53..97df25fb6 100644 --- a/applyconfigurations/rbac/v1/role.go +++ b/applyconfigurations/rbac/v1/role.go @@ -234,15 +234,6 @@ func (b *RoleApplyConfiguration) WithFinalizers(values ...string) *RoleApplyConf return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *RoleApplyConfiguration) WithClusterName(value string) *RoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *RoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/rbac/v1/rolebinding.go b/applyconfigurations/rbac/v1/rolebinding.go index f2f3f5818..7270f07e4 100644 --- a/applyconfigurations/rbac/v1/rolebinding.go +++ b/applyconfigurations/rbac/v1/rolebinding.go @@ -235,15 +235,6 @@ func (b *RoleBindingApplyConfiguration) WithFinalizers(values ...string) *RoleBi return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *RoleBindingApplyConfiguration) WithClusterName(value string) *RoleBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *RoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/rbac/v1alpha1/clusterrole.go b/applyconfigurations/rbac/v1alpha1/clusterrole.go index d7a3fac1d..19b1180fa 100644 --- a/applyconfigurations/rbac/v1alpha1/clusterrole.go +++ b/applyconfigurations/rbac/v1alpha1/clusterrole.go @@ -233,15 +233,6 @@ func (b *ClusterRoleApplyConfiguration) WithFinalizers(values ...string) *Cluste return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ClusterRoleApplyConfiguration) WithClusterName(value string) *ClusterRoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ClusterRoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go b/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go index 79cedc83a..a1723efc3 100644 --- a/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go +++ b/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go @@ -233,15 +233,6 @@ func (b *ClusterRoleBindingApplyConfiguration) WithFinalizers(values ...string) return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ClusterRoleBindingApplyConfiguration) WithClusterName(value string) *ClusterRoleBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ClusterRoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/rbac/v1alpha1/role.go b/applyconfigurations/rbac/v1alpha1/role.go index 6d9b141e0..cd256397a 100644 --- a/applyconfigurations/rbac/v1alpha1/role.go +++ b/applyconfigurations/rbac/v1alpha1/role.go @@ -234,15 +234,6 @@ func (b *RoleApplyConfiguration) WithFinalizers(values ...string) *RoleApplyConf return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *RoleApplyConfiguration) WithClusterName(value string) *RoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *RoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/rbac/v1alpha1/rolebinding.go b/applyconfigurations/rbac/v1alpha1/rolebinding.go index 0aa5dfd13..a0ec20d0b 100644 --- a/applyconfigurations/rbac/v1alpha1/rolebinding.go +++ b/applyconfigurations/rbac/v1alpha1/rolebinding.go @@ -235,15 +235,6 @@ func (b *RoleBindingApplyConfiguration) WithFinalizers(values ...string) *RoleBi return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *RoleBindingApplyConfiguration) WithClusterName(value string) *RoleBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *RoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/rbac/v1beta1/clusterrole.go b/applyconfigurations/rbac/v1beta1/clusterrole.go index 316659834..cf714ecc2 100644 --- a/applyconfigurations/rbac/v1beta1/clusterrole.go +++ b/applyconfigurations/rbac/v1beta1/clusterrole.go @@ -233,15 +233,6 @@ func (b *ClusterRoleApplyConfiguration) WithFinalizers(values ...string) *Cluste return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ClusterRoleApplyConfiguration) WithClusterName(value string) *ClusterRoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ClusterRoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/rbac/v1beta1/clusterrolebinding.go b/applyconfigurations/rbac/v1beta1/clusterrolebinding.go index 7619a36d4..b97cbcba2 100644 --- a/applyconfigurations/rbac/v1beta1/clusterrolebinding.go +++ b/applyconfigurations/rbac/v1beta1/clusterrolebinding.go @@ -233,15 +233,6 @@ func (b *ClusterRoleBindingApplyConfiguration) WithFinalizers(values ...string) return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *ClusterRoleBindingApplyConfiguration) WithClusterName(value string) *ClusterRoleBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *ClusterRoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/rbac/v1beta1/role.go b/applyconfigurations/rbac/v1beta1/role.go index 97f1ce5e0..53a751eb3 100644 --- a/applyconfigurations/rbac/v1beta1/role.go +++ b/applyconfigurations/rbac/v1beta1/role.go @@ -234,15 +234,6 @@ func (b *RoleApplyConfiguration) WithFinalizers(values ...string) *RoleApplyConf return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *RoleApplyConfiguration) WithClusterName(value string) *RoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *RoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/rbac/v1beta1/rolebinding.go b/applyconfigurations/rbac/v1beta1/rolebinding.go index 8d7e3221e..ecccdf91b 100644 --- a/applyconfigurations/rbac/v1beta1/rolebinding.go +++ b/applyconfigurations/rbac/v1beta1/rolebinding.go @@ -235,15 +235,6 @@ func (b *RoleBindingApplyConfiguration) WithFinalizers(values ...string) *RoleBi return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *RoleBindingApplyConfiguration) WithClusterName(value string) *RoleBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *RoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/scheduling/v1/priorityclass.go b/applyconfigurations/scheduling/v1/priorityclass.go index 8b9c3575e..b57e8ba57 100644 --- a/applyconfigurations/scheduling/v1/priorityclass.go +++ b/applyconfigurations/scheduling/v1/priorityclass.go @@ -236,15 +236,6 @@ func (b *PriorityClassApplyConfiguration) WithFinalizers(values ...string) *Prio return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PriorityClassApplyConfiguration) WithClusterName(value string) *PriorityClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PriorityClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/scheduling/v1alpha1/priorityclass.go b/applyconfigurations/scheduling/v1alpha1/priorityclass.go index a0a190bf9..0cd09d5d1 100644 --- a/applyconfigurations/scheduling/v1alpha1/priorityclass.go +++ b/applyconfigurations/scheduling/v1alpha1/priorityclass.go @@ -236,15 +236,6 @@ func (b *PriorityClassApplyConfiguration) WithFinalizers(values ...string) *Prio return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PriorityClassApplyConfiguration) WithClusterName(value string) *PriorityClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PriorityClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/scheduling/v1beta1/priorityclass.go b/applyconfigurations/scheduling/v1beta1/priorityclass.go index a3d97dbcc..98cfb14c7 100644 --- a/applyconfigurations/scheduling/v1beta1/priorityclass.go +++ b/applyconfigurations/scheduling/v1beta1/priorityclass.go @@ -236,15 +236,6 @@ func (b *PriorityClassApplyConfiguration) WithFinalizers(values ...string) *Prio return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *PriorityClassApplyConfiguration) WithClusterName(value string) *PriorityClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *PriorityClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/storage/v1/csidriver.go b/applyconfigurations/storage/v1/csidriver.go index bc6c85fbe..aeead0861 100644 --- a/applyconfigurations/storage/v1/csidriver.go +++ b/applyconfigurations/storage/v1/csidriver.go @@ -232,15 +232,6 @@ func (b *CSIDriverApplyConfiguration) WithFinalizers(values ...string) *CSIDrive return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *CSIDriverApplyConfiguration) WithClusterName(value string) *CSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *CSIDriverApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/storage/v1/csinode.go b/applyconfigurations/storage/v1/csinode.go index acc3a2922..d8296e485 100644 --- a/applyconfigurations/storage/v1/csinode.go +++ b/applyconfigurations/storage/v1/csinode.go @@ -232,15 +232,6 @@ func (b *CSINodeApplyConfiguration) WithFinalizers(values ...string) *CSINodeApp return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *CSINodeApplyConfiguration) WithClusterName(value string) *CSINodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *CSINodeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/storage/v1/csistoragecapacity.go b/applyconfigurations/storage/v1/csistoragecapacity.go index a325c09f8..c47c6b821 100644 --- a/applyconfigurations/storage/v1/csistoragecapacity.go +++ b/applyconfigurations/storage/v1/csistoragecapacity.go @@ -238,15 +238,6 @@ func (b *CSIStorageCapacityApplyConfiguration) WithFinalizers(values ...string) return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithClusterName(value string) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *CSIStorageCapacityApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/storage/v1/storageclass.go b/applyconfigurations/storage/v1/storageclass.go index 6994a71aa..98c4c2233 100644 --- a/applyconfigurations/storage/v1/storageclass.go +++ b/applyconfigurations/storage/v1/storageclass.go @@ -240,15 +240,6 @@ func (b *StorageClassApplyConfiguration) WithFinalizers(values ...string) *Stora return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *StorageClassApplyConfiguration) WithClusterName(value string) *StorageClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *StorageClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/storage/v1/volumeattachment.go b/applyconfigurations/storage/v1/volumeattachment.go index 3e87a98fa..4c74f09aa 100644 --- a/applyconfigurations/storage/v1/volumeattachment.go +++ b/applyconfigurations/storage/v1/volumeattachment.go @@ -233,15 +233,6 @@ func (b *VolumeAttachmentApplyConfiguration) WithFinalizers(values ...string) *V return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *VolumeAttachmentApplyConfiguration) WithClusterName(value string) *VolumeAttachmentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *VolumeAttachmentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/storage/v1alpha1/csistoragecapacity.go b/applyconfigurations/storage/v1alpha1/csistoragecapacity.go index 09645fe38..8b810fed1 100644 --- a/applyconfigurations/storage/v1alpha1/csistoragecapacity.go +++ b/applyconfigurations/storage/v1alpha1/csistoragecapacity.go @@ -238,15 +238,6 @@ func (b *CSIStorageCapacityApplyConfiguration) WithFinalizers(values ...string) return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithClusterName(value string) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *CSIStorageCapacityApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/storage/v1alpha1/volumeattachment.go b/applyconfigurations/storage/v1alpha1/volumeattachment.go index 33031eb35..bcefb5778 100644 --- a/applyconfigurations/storage/v1alpha1/volumeattachment.go +++ b/applyconfigurations/storage/v1alpha1/volumeattachment.go @@ -233,15 +233,6 @@ func (b *VolumeAttachmentApplyConfiguration) WithFinalizers(values ...string) *V return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *VolumeAttachmentApplyConfiguration) WithClusterName(value string) *VolumeAttachmentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *VolumeAttachmentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/storage/v1beta1/csidriver.go b/applyconfigurations/storage/v1beta1/csidriver.go index fdd839f57..4266f0b6e 100644 --- a/applyconfigurations/storage/v1beta1/csidriver.go +++ b/applyconfigurations/storage/v1beta1/csidriver.go @@ -232,15 +232,6 @@ func (b *CSIDriverApplyConfiguration) WithFinalizers(values ...string) *CSIDrive return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *CSIDriverApplyConfiguration) WithClusterName(value string) *CSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *CSIDriverApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/storage/v1beta1/csinode.go b/applyconfigurations/storage/v1beta1/csinode.go index fd2f5fad9..91588fd9f 100644 --- a/applyconfigurations/storage/v1beta1/csinode.go +++ b/applyconfigurations/storage/v1beta1/csinode.go @@ -232,15 +232,6 @@ func (b *CSINodeApplyConfiguration) WithFinalizers(values ...string) *CSINodeApp return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *CSINodeApplyConfiguration) WithClusterName(value string) *CSINodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *CSINodeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/storage/v1beta1/csistoragecapacity.go b/applyconfigurations/storage/v1beta1/csistoragecapacity.go index 92482411e..2854a15da 100644 --- a/applyconfigurations/storage/v1beta1/csistoragecapacity.go +++ b/applyconfigurations/storage/v1beta1/csistoragecapacity.go @@ -238,15 +238,6 @@ func (b *CSIStorageCapacityApplyConfiguration) WithFinalizers(values ...string) return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithClusterName(value string) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *CSIStorageCapacityApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/storage/v1beta1/storageclass.go b/applyconfigurations/storage/v1beta1/storageclass.go index 41eb350c7..02194f108 100644 --- a/applyconfigurations/storage/v1beta1/storageclass.go +++ b/applyconfigurations/storage/v1beta1/storageclass.go @@ -240,15 +240,6 @@ func (b *StorageClassApplyConfiguration) WithFinalizers(values ...string) *Stora return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *StorageClassApplyConfiguration) WithClusterName(value string) *StorageClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *StorageClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/applyconfigurations/storage/v1beta1/volumeattachment.go b/applyconfigurations/storage/v1beta1/volumeattachment.go index b6f8c8e75..9fccaf5cf 100644 --- a/applyconfigurations/storage/v1beta1/volumeattachment.go +++ b/applyconfigurations/storage/v1beta1/volumeattachment.go @@ -233,15 +233,6 @@ func (b *VolumeAttachmentApplyConfiguration) WithFinalizers(values ...string) *V return b } -// WithClusterName sets the ClusterName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterName field is set to the value of the last call. -func (b *VolumeAttachmentApplyConfiguration) WithClusterName(value string) *VolumeAttachmentApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ClusterName = &value - return b -} - func (b *VolumeAttachmentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} From 28b9e26d5f26df8d74a7c6d693628870cc52d667 Mon Sep 17 00:00:00 2001 From: Margo Crawford Date: Fri, 18 Mar 2022 10:16:11 -0700 Subject: [PATCH 081/111] Remove v1alpha1 of the execcredential Signed-off-by: Margo Crawford Kubernetes-commit: 5b690b44d08807c6434a421b0041ef685482d337 --- .../clientauthentication/install/install.go | 2 - pkg/apis/clientauthentication/types.go | 14 - .../clientauthentication/v1/conversion.go | 28 -- .../v1alpha1/conversion.go | 27 -- pkg/apis/clientauthentication/v1alpha1/doc.go | 24 -- .../clientauthentication/v1alpha1/register.go | 55 ---- .../clientauthentication/v1alpha1/types.go | 78 ----- .../v1alpha1/zz_generated.conversion.go | 173 ----------- .../v1alpha1/zz_generated.deepcopy.go | 129 -------- .../v1alpha1/zz_generated.defaults.go | 33 -- .../v1beta1/conversion.go | 28 -- plugin/pkg/client/auth/exec/exec.go | 21 +- plugin/pkg/client/auth/exec/exec_test.go | 282 ++---------------- plugin/pkg/client/auth/exec/metrics_test.go | 5 +- tools/auth/exec/exec_test.go | 6 - tools/auth/exec/types_test.go | 5 +- 16 files changed, 39 insertions(+), 871 deletions(-) delete mode 100644 pkg/apis/clientauthentication/v1/conversion.go delete mode 100644 pkg/apis/clientauthentication/v1alpha1/conversion.go delete mode 100644 pkg/apis/clientauthentication/v1alpha1/doc.go delete mode 100644 pkg/apis/clientauthentication/v1alpha1/register.go delete mode 100644 pkg/apis/clientauthentication/v1alpha1/types.go delete mode 100644 pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go delete mode 100644 pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go delete mode 100644 pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go delete mode 100644 pkg/apis/clientauthentication/v1beta1/conversion.go diff --git a/pkg/apis/clientauthentication/install/install.go b/pkg/apis/clientauthentication/install/install.go index 9040bb9a4..ee5c338e3 100644 --- a/pkg/apis/clientauthentication/install/install.go +++ b/pkg/apis/clientauthentication/install/install.go @@ -23,7 +23,6 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/pkg/apis/clientauthentication" "k8s.io/client-go/pkg/apis/clientauthentication/v1" - "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" ) @@ -32,5 +31,4 @@ func Install(scheme *runtime.Scheme) { utilruntime.Must(clientauthentication.AddToScheme(scheme)) utilruntime.Must(v1.AddToScheme(scheme)) utilruntime.Must(v1beta1.AddToScheme(scheme)) - utilruntime.Must(v1alpha1.AddToScheme(scheme)) } diff --git a/pkg/apis/clientauthentication/types.go b/pkg/apis/clientauthentication/types.go index 8daaa3f8f..1b6322da5 100644 --- a/pkg/apis/clientauthentication/types.go +++ b/pkg/apis/clientauthentication/types.go @@ -41,11 +41,6 @@ type ExecCredential struct { // ExecCredentialSpec holds request and runtime specific information provided by // the transport. type ExecCredentialSpec struct { - // Response is populated when the transport encounters HTTP status codes, such as 401, - // suggesting previous credentials were invalid. - // +optional - Response *Response - // Interactive is true when the transport detects the command is being called from an // interactive prompt, i.e., when stdin has been passed to this exec plugin. // +optional @@ -75,15 +70,6 @@ type ExecCredentialStatus struct { ClientKeyData string `datapolicy:"secret-key"` } -// Response defines metadata about a failed request, including HTTP status code and -// response headers. -type Response struct { - // Headers holds HTTP headers returned by the server. - Header map[string][]string - // Code is the HTTP status code returned by the server. - Code int32 -} - // Cluster contains information to allow an exec plugin to communicate // with the kubernetes cluster being authenticated to. // diff --git a/pkg/apis/clientauthentication/v1/conversion.go b/pkg/apis/clientauthentication/v1/conversion.go deleted file mode 100644 index 5c5f70d25..000000000 --- a/pkg/apis/clientauthentication/v1/conversion.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2021 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. -*/ - -package v1 - -import ( - "k8s.io/apimachinery/pkg/conversion" - "k8s.io/client-go/pkg/apis/clientauthentication" -) - -func Convert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { - // This conversion intentionally omits the Response field, which were only - // supported in v1alpha1. - return autoConvert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(in, out, s) -} diff --git a/pkg/apis/clientauthentication/v1alpha1/conversion.go b/pkg/apis/clientauthentication/v1alpha1/conversion.go deleted file mode 100644 index 572e049f8..000000000 --- a/pkg/apis/clientauthentication/v1alpha1/conversion.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2020 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. -*/ - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/conversion" - "k8s.io/client-go/pkg/apis/clientauthentication" -) - -func Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { - // This conversion intentionally omits the Cluster field which is only supported in newer versions. - return autoConvert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(in, out, s) -} diff --git a/pkg/apis/clientauthentication/v1alpha1/doc.go b/pkg/apis/clientauthentication/v1alpha1/doc.go deleted file mode 100644 index 19ab77614..000000000 --- a/pkg/apis/clientauthentication/v1alpha1/doc.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2018 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. -*/ - -// +k8s:deepcopy-gen=package -// +k8s:conversion-gen=k8s.io/client-go/pkg/apis/clientauthentication -// +k8s:openapi-gen=true -// +k8s:defaulter-gen=TypeMeta - -// +groupName=client.authentication.k8s.io - -package v1alpha1 // import "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" diff --git a/pkg/apis/clientauthentication/v1alpha1/register.go b/pkg/apis/clientauthentication/v1alpha1/register.go deleted file mode 100644 index 2acd13dea..000000000 --- a/pkg/apis/clientauthentication/v1alpha1/register.go +++ /dev/null @@ -1,55 +0,0 @@ -/* -Copyright 2018 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. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// GroupName is the group name use in this package -const GroupName = "client.authentication.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &ExecCredential{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/pkg/apis/clientauthentication/v1alpha1/types.go b/pkg/apis/clientauthentication/v1alpha1/types.go deleted file mode 100644 index 1ff13c438..000000000 --- a/pkg/apis/clientauthentication/v1alpha1/types.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 2018 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. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ExecCredential is used by exec-based plugins to communicate credentials to -// HTTP transports. -type ExecCredential struct { - metav1.TypeMeta `json:",inline"` - - // Spec holds information passed to the plugin by the transport. This contains - // request and runtime specific information, such as if the session is interactive. - Spec ExecCredentialSpec `json:"spec,omitempty"` - - // Status is filled in by the plugin and holds the credentials that the transport - // should use to contact the API. - // +optional - Status *ExecCredentialStatus `json:"status,omitempty"` -} - -// ExecCredentialSpec holds request and runtime specific information provided by -// the transport. -type ExecCredentialSpec struct { - // Response is populated when the transport encounters HTTP status codes, such as 401, - // suggesting previous credentials were invalid. - // +optional - Response *Response `json:"response,omitempty"` - - // Interactive is true when the transport detects the command is being called from an - // interactive prompt. - // +optional - Interactive bool `json:"interactive,omitempty"` -} - -// ExecCredentialStatus holds credentials for the transport to use. -// -// Token and ClientKeyData are sensitive fields. This data should only be -// transmitted in-memory between client and exec plugin process. Exec plugin -// itself should at least be protected via file permissions. -type ExecCredentialStatus struct { - // ExpirationTimestamp indicates a time when the provided credentials expire. - // +optional - ExpirationTimestamp *metav1.Time `json:"expirationTimestamp,omitempty"` - // Token is a bearer token used by the client for request authentication. - Token string `json:"token,omitempty" datapolicy:"token"` - // PEM-encoded client TLS certificates (including intermediates, if any). - ClientCertificateData string `json:"clientCertificateData,omitempty"` - // PEM-encoded private key for the above certificate. - ClientKeyData string `json:"clientKeyData,omitempty" datapolicy:"security-key"` -} - -// Response defines metadata about a failed request, including HTTP status code and -// response headers. -type Response struct { - // Header holds HTTP headers returned by the server. - Header map[string][]string `json:"header,omitempty"` - // Code is the HTTP status code returned by the server. - Code int32 `json:"code,omitempty"` -} diff --git a/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go b/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index fc59decef..000000000 --- a/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,173 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - unsafe "unsafe" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - clientauthentication "k8s.io/client-go/pkg/apis/clientauthentication" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*ExecCredential)(nil), (*clientauthentication.ExecCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(a.(*ExecCredential), b.(*clientauthentication.ExecCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredential)(nil), (*ExecCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(a.(*clientauthentication.ExecCredential), b.(*ExecCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ExecCredentialSpec)(nil), (*clientauthentication.ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(a.(*ExecCredentialSpec), b.(*clientauthentication.ExecCredentialSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ExecCredentialStatus)(nil), (*clientauthentication.ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(a.(*ExecCredentialStatus), b.(*clientauthentication.ExecCredentialStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredentialStatus)(nil), (*ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(a.(*clientauthentication.ExecCredentialStatus), b.(*ExecCredentialStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Response)(nil), (*clientauthentication.Response)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_Response_To_clientauthentication_Response(a.(*Response), b.(*clientauthentication.Response), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*clientauthentication.Response)(nil), (*Response)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_clientauthentication_Response_To_v1alpha1_Response(a.(*clientauthentication.Response), b.(*Response), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(in *ExecCredential, out *clientauthentication.ExecCredential, s conversion.Scope) error { - if err := Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - out.Status = (*clientauthentication.ExecCredentialStatus)(unsafe.Pointer(in.Status)) - return nil -} - -// Convert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential is an autogenerated conversion function. -func Convert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(in *ExecCredential, out *clientauthentication.ExecCredential, s conversion.Scope) error { - return autoConvert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(in, out, s) -} - -func autoConvert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(in *clientauthentication.ExecCredential, out *ExecCredential, s conversion.Scope) error { - if err := Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - out.Status = (*ExecCredentialStatus)(unsafe.Pointer(in.Status)) - return nil -} - -// Convert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential is an autogenerated conversion function. -func Convert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(in *clientauthentication.ExecCredential, out *ExecCredential, s conversion.Scope) error { - return autoConvert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(in, out, s) -} - -func autoConvert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in *ExecCredentialSpec, out *clientauthentication.ExecCredentialSpec, s conversion.Scope) error { - out.Response = (*clientauthentication.Response)(unsafe.Pointer(in.Response)) - out.Interactive = in.Interactive - return nil -} - -// Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec is an autogenerated conversion function. -func Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in *ExecCredentialSpec, out *clientauthentication.ExecCredentialSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in, out, s) -} - -func autoConvert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { - out.Response = (*Response)(unsafe.Pointer(in.Response)) - out.Interactive = in.Interactive - // WARNING: in.Cluster requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { - out.ExpirationTimestamp = (*v1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) - out.Token = in.Token - out.ClientCertificateData = in.ClientCertificateData - out.ClientKeyData = in.ClientKeyData - return nil -} - -// Convert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus is an autogenerated conversion function. -func Convert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in, out, s) -} - -func autoConvert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(in *clientauthentication.ExecCredentialStatus, out *ExecCredentialStatus, s conversion.Scope) error { - out.ExpirationTimestamp = (*v1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) - out.Token = in.Token - out.ClientCertificateData = in.ClientCertificateData - out.ClientKeyData = in.ClientKeyData - return nil -} - -// Convert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus is an autogenerated conversion function. -func Convert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(in *clientauthentication.ExecCredentialStatus, out *ExecCredentialStatus, s conversion.Scope) error { - return autoConvert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(in, out, s) -} - -func autoConvert_v1alpha1_Response_To_clientauthentication_Response(in *Response, out *clientauthentication.Response, s conversion.Scope) error { - out.Header = *(*map[string][]string)(unsafe.Pointer(&in.Header)) - out.Code = in.Code - return nil -} - -// Convert_v1alpha1_Response_To_clientauthentication_Response is an autogenerated conversion function. -func Convert_v1alpha1_Response_To_clientauthentication_Response(in *Response, out *clientauthentication.Response, s conversion.Scope) error { - return autoConvert_v1alpha1_Response_To_clientauthentication_Response(in, out, s) -} - -func autoConvert_clientauthentication_Response_To_v1alpha1_Response(in *clientauthentication.Response, out *Response, s conversion.Scope) error { - out.Header = *(*map[string][]string)(unsafe.Pointer(&in.Header)) - out.Code = in.Code - return nil -} - -// Convert_clientauthentication_Response_To_v1alpha1_Response is an autogenerated conversion function. -func Convert_clientauthentication_Response_To_v1alpha1_Response(in *clientauthentication.Response, out *Response, s conversion.Scope) error { - return autoConvert_clientauthentication_Response_To_v1alpha1_Response(in, out, s) -} diff --git a/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index ce614c0b8..000000000 --- a/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,129 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExecCredential) DeepCopyInto(out *ExecCredential) { - *out = *in - out.TypeMeta = in.TypeMeta - in.Spec.DeepCopyInto(&out.Spec) - if in.Status != nil { - in, out := &in.Status, &out.Status - *out = new(ExecCredentialStatus) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredential. -func (in *ExecCredential) DeepCopy() *ExecCredential { - if in == nil { - return nil - } - out := new(ExecCredential) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ExecCredential) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExecCredentialSpec) DeepCopyInto(out *ExecCredentialSpec) { - *out = *in - if in.Response != nil { - in, out := &in.Response, &out.Response - *out = new(Response) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialSpec. -func (in *ExecCredentialSpec) DeepCopy() *ExecCredentialSpec { - if in == nil { - return nil - } - out := new(ExecCredentialSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExecCredentialStatus) DeepCopyInto(out *ExecCredentialStatus) { - *out = *in - if in.ExpirationTimestamp != nil { - in, out := &in.ExpirationTimestamp, &out.ExpirationTimestamp - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialStatus. -func (in *ExecCredentialStatus) DeepCopy() *ExecCredentialStatus { - if in == nil { - return nil - } - out := new(ExecCredentialStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Response) DeepCopyInto(out *Response) { - *out = *in - if in.Header != nil { - in, out := &in.Header, &out.Header - *out = make(map[string][]string, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Response. -func (in *Response) DeepCopy() *Response { - if in == nil { - return nil - } - out := new(Response) - in.DeepCopyInto(out) - return out -} diff --git a/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go b/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go deleted file mode 100644 index 5070cb91b..000000000 --- a/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go +++ /dev/null @@ -1,33 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 defaulter-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/pkg/apis/clientauthentication/v1beta1/conversion.go b/pkg/apis/clientauthentication/v1beta1/conversion.go deleted file mode 100644 index 6741114dd..000000000 --- a/pkg/apis/clientauthentication/v1beta1/conversion.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2018 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. -*/ - -package v1beta1 - -import ( - "k8s.io/apimachinery/pkg/conversion" - "k8s.io/client-go/pkg/apis/clientauthentication" -) - -func Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { - // This conversion intentionally omits the Response field, which were only - // supported in v1alpha1. - return autoConvert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(in, out, s) -} diff --git a/plugin/pkg/client/auth/exec/exec.go b/plugin/pkg/client/auth/exec/exec.go index 9747d5074..d37dfbf73 100644 --- a/plugin/pkg/client/auth/exec/exec.go +++ b/plugin/pkg/client/auth/exec/exec.go @@ -42,7 +42,6 @@ import ( "k8s.io/client-go/pkg/apis/clientauthentication" "k8s.io/client-go/pkg/apis/clientauthentication/install" clientauthenticationv1 "k8s.io/client-go/pkg/apis/clientauthentication/v1" - clientauthenticationv1alpha1 "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" clientauthenticationv1beta1 "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" "k8s.io/client-go/tools/clientcmd/api" "k8s.io/client-go/tools/metrics" @@ -73,9 +72,8 @@ var ( globalCache = newCache() // The list of API versions we accept. apiVersions = map[string]schema.GroupVersion{ - clientauthenticationv1alpha1.SchemeGroupVersion.String(): clientauthenticationv1alpha1.SchemeGroupVersion, - clientauthenticationv1beta1.SchemeGroupVersion.String(): clientauthenticationv1beta1.SchemeGroupVersion, - clientauthenticationv1.SchemeGroupVersion.String(): clientauthenticationv1.SchemeGroupVersion, + clientauthenticationv1beta1.SchemeGroupVersion.String(): clientauthenticationv1beta1.SchemeGroupVersion, + clientauthenticationv1.SchemeGroupVersion.String(): clientauthenticationv1.SchemeGroupVersion, } ) @@ -348,11 +346,7 @@ func (r *roundTripper) RoundTrip(req *http.Request) (*http.Response, error) { return nil, err } if res.StatusCode == http.StatusUnauthorized { - resp := &clientauthentication.Response{ - Header: res.Header, - Code: int32(res.StatusCode), - } - if err := r.a.maybeRefreshCreds(creds, resp); err != nil { + if err := r.a.maybeRefreshCreds(creds); err != nil { klog.Errorf("refreshing credentials: %v", err) } } @@ -382,7 +376,7 @@ func (a *Authenticator) getCreds() (*credentials, error) { return a.cachedCreds, nil } - if err := a.refreshCredsLocked(nil); err != nil { + if err := a.refreshCredsLocked(); err != nil { return nil, err } @@ -391,7 +385,7 @@ func (a *Authenticator) getCreds() (*credentials, error) { // maybeRefreshCreds executes the plugin to force a rotation of the // credentials, unless they were rotated already. -func (a *Authenticator) maybeRefreshCreds(creds *credentials, r *clientauthentication.Response) error { +func (a *Authenticator) maybeRefreshCreds(creds *credentials) error { a.mu.Lock() defer a.mu.Unlock() @@ -402,12 +396,12 @@ func (a *Authenticator) maybeRefreshCreds(creds *credentials, r *clientauthentic return nil } - return a.refreshCredsLocked(r) + return a.refreshCredsLocked() } // refreshCredsLocked executes the plugin and reads the credentials from // stdout. It must be called while holding the Authenticator's mutex. -func (a *Authenticator) refreshCredsLocked(r *clientauthentication.Response) error { +func (a *Authenticator) refreshCredsLocked() error { interactive, err := a.interactiveFunc() if err != nil { return fmt.Errorf("exec plugin cannot support interactive mode: %w", err) @@ -415,7 +409,6 @@ func (a *Authenticator) refreshCredsLocked(r *clientauthentication.Response) err cred := &clientauthentication.ExecCredential{ Spec: clientauthentication.ExecCredentialSpec{ - Response: r, Interactive: interactive, }, } diff --git a/plugin/pkg/client/auth/exec/exec_test.go b/plugin/pkg/client/auth/exec/exec_test.go index b1fa9f4d9..1f4097ec1 100644 --- a/plugin/pkg/client/auth/exec/exec_test.go +++ b/plugin/pkg/client/auth/exec/exec_test.go @@ -115,7 +115,7 @@ func TestCacheKey(t *testing.T) { {Name: "5", Value: "6"}, {Name: "7", Value: "8"}, }, - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", ProvideClusterInfo: true, } c1c := &clientauthentication.Cluster{ @@ -141,7 +141,7 @@ func TestCacheKey(t *testing.T) { {Name: "5", Value: "6"}, {Name: "7", Value: "8"}, }, - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", ProvideClusterInfo: true, } c2c := &clientauthentication.Cluster{ @@ -166,7 +166,7 @@ func TestCacheKey(t *testing.T) { {Name: "3", Value: "4"}, {Name: "5", Value: "6"}, }, - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", } c3c := &clientauthentication.Cluster{ Server: "foo", @@ -190,7 +190,7 @@ func TestCacheKey(t *testing.T) { {Name: "3", Value: "4"}, {Name: "5", Value: "6"}, }, - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", } c4c := &clientauthentication.Cluster{ Server: "foo", @@ -215,7 +215,7 @@ func TestCacheKey(t *testing.T) { {Name: "3", Value: "4"}, {Name: "5", Value: "6"}, }, - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", ProvideClusterInfo: true, } c5c := &clientauthentication.Cluster{ @@ -241,7 +241,7 @@ func TestCacheKey(t *testing.T) { {Name: "3", Value: "4"}, {Name: "5", Value: "6"}, }, - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1betaa1", } // c7 should be the same as c6, except c7 has stdin marked as unavailable @@ -252,7 +252,7 @@ func TestCacheKey(t *testing.T) { {Name: "3", Value: "4"}, {Name: "5", Value: "6"}, }, - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", StdinUnavailable: true, } @@ -313,7 +313,6 @@ func TestRefreshCreds(t *testing.T) { cluster *clientauthentication.Cluster output string isTerminal bool - response *clientauthentication.Response wantInput string wantCreds credentials wantExpiry time.Time @@ -321,173 +320,21 @@ func TestRefreshCreds(t *testing.T) { wantErrSubstr string }{ { - name: "basic-request", + name: "beta-with-TLS-credentials", config: api.ExecConfig{ - APIVersion: "client.authentication.k8s.io/v1alpha1", - InteractiveMode: api.IfAvailableExecInteractiveMode, - }, - wantInput: `{ - "kind":"ExecCredential", - "apiVersion":"client.authentication.k8s.io/v1alpha1", - "spec": {} - }`, - output: `{ - "kind": "ExecCredential", - "apiVersion": "client.authentication.k8s.io/v1alpha1", - "status": { - "token": "foo-bar" - } - }`, - wantCreds: credentials{token: "foo-bar"}, - }, - { - name: "interactive", - config: api.ExecConfig{ - APIVersion: "client.authentication.k8s.io/v1alpha1", - InteractiveMode: api.IfAvailableExecInteractiveMode, - }, - isTerminal: true, - wantInput: `{ - "kind":"ExecCredential", - "apiVersion":"client.authentication.k8s.io/v1alpha1", - "spec": { - "interactive": true - } - }`, - output: `{ - "kind": "ExecCredential", - "apiVersion": "client.authentication.k8s.io/v1alpha1", - "status": { - "token": "foo-bar" - } - }`, - wantCreds: credentials{token: "foo-bar"}, - }, - { - name: "response", - config: api.ExecConfig{ - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", InteractiveMode: api.IfAvailableExecInteractiveMode, }, - response: &clientauthentication.Response{ - Header: map[string][]string{ - "WWW-Authenticate": {`Basic realm="Access to the staging site", charset="UTF-8"`}, - }, - Code: 401, - }, wantInput: `{ "kind":"ExecCredential", - "apiVersion":"client.authentication.k8s.io/v1alpha1", + "apiVersion":"client.authentication.k8s.io/v1beta1", "spec": { - "response": { - "header": { - "WWW-Authenticate": [ - "Basic realm=\"Access to the staging site\", charset=\"UTF-8\"" - ] - }, - "code": 401 - } - } - }`, - output: `{ - "kind": "ExecCredential", - "apiVersion": "client.authentication.k8s.io/v1alpha1", - "status": { - "token": "foo-bar" - } - }`, - wantCreds: credentials{token: "foo-bar"}, - }, - { - name: "expiry", - config: api.ExecConfig{ - APIVersion: "client.authentication.k8s.io/v1alpha1", - InteractiveMode: api.IfAvailableExecInteractiveMode, - }, - wantInput: `{ - "kind":"ExecCredential", - "apiVersion":"client.authentication.k8s.io/v1alpha1", - "spec": {} - }`, - output: `{ - "kind": "ExecCredential", - "apiVersion": "client.authentication.k8s.io/v1alpha1", - "status": { - "token": "foo-bar", - "expirationTimestamp": "2006-01-02T15:04:05Z" - } - }`, - wantExpiry: time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC), - wantCreds: credentials{token: "foo-bar"}, - }, - { - name: "no-group-version", - config: api.ExecConfig{ - APIVersion: "client.authentication.k8s.io/v1alpha1", - InteractiveMode: api.IfAvailableExecInteractiveMode, - }, - wantInput: `{ - "kind":"ExecCredential", - "apiVersion":"client.authentication.k8s.io/v1alpha1", - "spec": {} - }`, - output: `{ - "kind": "ExecCredential", - "status": { - "token": "foo-bar" + "interactive": false } }`, - wantErr: true, - }, - { - name: "no-status", - config: api.ExecConfig{ - APIVersion: "client.authentication.k8s.io/v1alpha1", - InteractiveMode: api.IfAvailableExecInteractiveMode, - }, - wantInput: `{ - "kind":"ExecCredential", - "apiVersion":"client.authentication.k8s.io/v1alpha1", - "spec": {} - }`, - output: `{ - "kind": "ExecCredential", - "apiVersion":"client.authentication.k8s.io/v1alpha1" - }`, - wantErr: true, - }, - { - name: "no-creds", - config: api.ExecConfig{ - APIVersion: "client.authentication.k8s.io/v1alpha1", - InteractiveMode: api.IfAvailableExecInteractiveMode, - }, - wantInput: `{ - "kind":"ExecCredential", - "apiVersion":"client.authentication.k8s.io/v1alpha1", - "spec": {} - }`, - output: `{ - "kind": "ExecCredential", - "apiVersion":"client.authentication.k8s.io/v1alpha1", - "status": {} - }`, - wantErr: true, - }, - { - name: "TLS credentials", - config: api.ExecConfig{ - APIVersion: "client.authentication.k8s.io/v1alpha1", - InteractiveMode: api.IfAvailableExecInteractiveMode, - }, - wantInput: `{ - "kind":"ExecCredential", - "apiVersion":"client.authentication.k8s.io/v1alpha1", - "spec": {} - }`, output: fmt.Sprintf(`{ "kind": "ExecCredential", - "apiVersion": "client.authentication.k8s.io/v1alpha1", + "apiVersion": "client.authentication.k8s.io/v1beta1", "status": { "clientKeyData": %q, "clientCertificateData": %q @@ -496,19 +343,14 @@ func TestRefreshCreds(t *testing.T) { wantCreds: credentials{cert: validCert}, }, { - name: "bad TLS credentials", + name: "beta-with-bad-TLS-credentials", config: api.ExecConfig{ - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", InteractiveMode: api.IfAvailableExecInteractiveMode, }, - wantInput: `{ - "kind":"ExecCredential", - "apiVersion":"client.authentication.k8s.io/v1alpha1", - "spec": {} - }`, output: `{ "kind": "ExecCredential", - "apiVersion": "client.authentication.k8s.io/v1alpha1", + "apiVersion": "client.authentication.k8s.io/v1beta1", "status": { "clientKeyData": "foo", "clientCertificateData": "bar" @@ -517,19 +359,14 @@ func TestRefreshCreds(t *testing.T) { wantErr: true, }, { - name: "cert but no key", + name: "beta-cert-but-no-key", config: api.ExecConfig{ - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", InteractiveMode: api.IfAvailableExecInteractiveMode, }, - wantInput: `{ - "kind":"ExecCredential", - "apiVersion":"client.authentication.k8s.io/v1alpha1", - "spec": {} - }`, output: fmt.Sprintf(`{ "kind": "ExecCredential", - "apiVersion": "client.authentication.k8s.io/v1alpha1", + "apiVersion": "client.authentication.k8s.io/v1beta1", "status": { "clientCertificateData": %q } @@ -834,55 +671,6 @@ func TestRefreshCreds(t *testing.T) { wantErr: true, wantErrSubstr: "73", }, - { - name: "alpha-with-cluster-is-ignored", - config: api.ExecConfig{ - APIVersion: "client.authentication.k8s.io/v1alpha1", - InteractiveMode: api.IfAvailableExecInteractiveMode, - }, - cluster: &clientauthentication.Cluster{ - Server: "foo", - TLSServerName: "bar", - CertificateAuthorityData: []byte("baz"), - Config: &runtime.Unknown{ - TypeMeta: runtime.TypeMeta{ - APIVersion: "", - Kind: "", - }, - Raw: []byte(`{"apiVersion":"group/v1","kind":"PluginConfig","spec":{"audience":"panda"}}`), - ContentEncoding: "", - ContentType: "application/json", - }, - }, - response: &clientauthentication.Response{ - Header: map[string][]string{ - "WWW-Authenticate": {`Basic realm="Access to the staging site", charset="UTF-8"`}, - }, - Code: 401, - }, - wantInput: `{ - "kind":"ExecCredential", - "apiVersion":"client.authentication.k8s.io/v1alpha1", - "spec": { - "response": { - "header": { - "WWW-Authenticate": [ - "Basic realm=\"Access to the staging site\", charset=\"UTF-8\"" - ] - }, - "code": 401 - } - } - }`, - output: `{ - "kind": "ExecCredential", - "apiVersion": "client.authentication.k8s.io/v1alpha1", - "status": { - "token": "foo-bar" - } - }`, - wantCreds: credentials{token: "foo-bar"}, - }, { name: "beta-with-cluster-and-provide-cluster-info-is-serialized", config: api.ExecConfig{ @@ -904,12 +692,6 @@ func TestRefreshCreds(t *testing.T) { ContentType: "application/json", }, }, - response: &clientauthentication.Response{ - Header: map[string][]string{ - "WWW-Authenticate": {`Basic realm="Access to the staging site", charset="UTF-8"`}, - }, - Code: 401, - }, wantInput: `{ "kind":"ExecCredential", "apiVersion":"client.authentication.k8s.io/v1beta1", @@ -958,12 +740,6 @@ func TestRefreshCreds(t *testing.T) { ContentType: "application/json", }, }, - response: &clientauthentication.Response{ - Header: map[string][]string{ - "WWW-Authenticate": {`Basic realm="Access to the staging site", charset="UTF-8"`}, - }, - Code: 401, - }, wantInput: `{ "kind":"ExecCredential", "apiVersion":"client.authentication.k8s.io/v1beta1", @@ -1037,7 +813,7 @@ func TestRefreshCreds(t *testing.T) { a.stderr = stderr a.environ = func() []string { return nil } - if err := a.refreshCredsLocked(test.response); err != nil { + if err := a.refreshCredsLocked(); err != nil { if !test.wantErr { t.Errorf("get token %v", err) } else if !strings.Contains(err.Error(), test.wantErrSubstr) { @@ -1103,7 +879,7 @@ func TestRoundTripper(t *testing.T) { c := api.ExecConfig{ Command: "./testdata/test-plugin.sh", - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", InteractiveMode: api.IfAvailableExecInteractiveMode, } a, err := newAuthenticator(newCache(), func(_ int) bool { return false }, &c, nil) @@ -1136,7 +912,7 @@ func TestRoundTripper(t *testing.T) { setOutput(`{ "kind": "ExecCredential", - "apiVersion": "client.authentication.k8s.io/v1alpha1", + "apiVersion": "client.authentication.k8s.io/v1beta1", "status": { "token": "token1" } @@ -1146,7 +922,7 @@ func TestRoundTripper(t *testing.T) { setOutput(`{ "kind": "ExecCredential", - "apiVersion": "client.authentication.k8s.io/v1alpha1", + "apiVersion": "client.authentication.k8s.io/v1beta1", "status": { "token": "token2" } @@ -1162,7 +938,7 @@ func TestRoundTripper(t *testing.T) { setOutput(`{ "kind": "ExecCredential", - "apiVersion": "client.authentication.k8s.io/v1alpha1", + "apiVersion": "client.authentication.k8s.io/v1beta1", "status": { "token": "token3", "expirationTimestamp": "` + now().Add(time.Hour).Format(time.RFC3339Nano) + `" @@ -1177,7 +953,7 @@ func TestRoundTripper(t *testing.T) { n = n.Add(time.Hour * 2) setOutput(`{ "kind": "ExecCredential", - "apiVersion": "client.authentication.k8s.io/v1alpha1", + "apiVersion": "client.authentication.k8s.io/v1beta1", "status": { "token": "token4", "expirationTimestamp": "` + now().Add(time.Hour).Format(time.RFC3339Nano) + `" @@ -1218,7 +994,7 @@ func TestAuthorizationHeaderPresentCancelsExecAction(t *testing.T) { t.Run(test.name, func(t *testing.T) { a, err := newAuthenticator(newCache(), func(_ int) bool { return false }, &api.ExecConfig{ Command: "./testdata/test-plugin.sh", - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", }, nil) if err != nil { t.Fatal(err) @@ -1260,7 +1036,7 @@ func TestTLSCredentials(t *testing.T) { a, err := newAuthenticator(newCache(), func(_ int) bool { return false }, &api.ExecConfig{ Command: "./testdata/test-plugin.sh", - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", InteractiveMode: api.IfAvailableExecInteractiveMode, }, nil) if err != nil { @@ -1350,7 +1126,7 @@ func TestConcurrentUpdateTransportConfig(t *testing.T) { c := api.ExecConfig{ Command: "./testdata/test-plugin.sh", - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", } a, err := newAuthenticator(newCache(), func(_ int) bool { return false }, &c, nil) if err != nil { @@ -1416,7 +1192,7 @@ func TestInstallHintRateLimit(t *testing.T) { t.Run(test.name, func(t *testing.T) { c := api.ExecConfig{ Command: "does not exist", - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", InstallHint: "some install hint", InteractiveMode: api.IfAvailableExecInteractiveMode, } @@ -1433,7 +1209,7 @@ func TestInstallHintRateLimit(t *testing.T) { count := 0 for i := 0; i < test.calls; i++ { - err := a.refreshCredsLocked(&clientauthentication.Response{}) + err := a.refreshCredsLocked() if strings.Contains(err.Error(), c.InstallHint) { count++ } diff --git a/plugin/pkg/client/auth/exec/metrics_test.go b/plugin/pkg/client/auth/exec/metrics_test.go index 4488df599..61360abdb 100644 --- a/plugin/pkg/client/auth/exec/metrics_test.go +++ b/plugin/pkg/client/auth/exec/metrics_test.go @@ -23,7 +23,6 @@ import ( "time" "github.com/google/go-cmp/cmp" - "k8s.io/client-go/pkg/apis/clientauthentication" "k8s.io/client-go/tools/clientcmd/api" "k8s.io/client-go/tools/metrics" ) @@ -153,7 +152,7 @@ func TestCallsMetric(t *testing.T) { // Run refresh creds twice so that our test validates that the metrics are set correctly twice // in a row with the same authenticator. refreshCreds := func() { - if err := a.refreshCredsLocked(&clientauthentication.Response{}); (err == nil) != (exitCode == 0) { + if err := a.refreshCredsLocked(); (err == nil) != (exitCode == 0) { if err != nil { t.Fatalf("wanted no error, but got %q", err.Error()) } else { @@ -183,7 +182,7 @@ func TestCallsMetric(t *testing.T) { t.Fatal(err) } a.stderr = io.Discard - if err := a.refreshCredsLocked(&clientauthentication.Response{}); err == nil { + if err := a.refreshCredsLocked(); err == nil { t.Fatal("expected the authenticator to fail because the plugin does not exist") } wantCallsMetrics = append(wantCallsMetrics, mockCallsMetric{exitCode: 1, errorType: "plugin_not_found_error"}) diff --git a/tools/auth/exec/exec_test.go b/tools/auth/exec/exec_test.go index e1a37f702..871474675 100644 --- a/tools/auth/exec/exec_test.go +++ b/tools/auth/exec/exec_test.go @@ -25,7 +25,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" clientauthenticationv1 "k8s.io/client-go/pkg/apis/clientauthentication/v1" - clientauthenticationv1alpha1 "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" clientauthenticationv1beta1 "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" "k8s.io/client-go/rest" ) @@ -243,11 +242,6 @@ func TestLoadExecCredential(t *testing.T) { data: marshal(t, clientauthenticationv1beta1.SchemeGroupVersion, &clientauthenticationv1beta1.ExecCredential{}), wantErrorPrefix: "ExecCredential does not contain cluster information", }, - { - name: "v1alpha1", - data: marshal(t, clientauthenticationv1alpha1.SchemeGroupVersion, &clientauthenticationv1alpha1.ExecCredential{}), - wantErrorPrefix: "ExecCredential does not contain cluster information", - }, { name: "invalid object kind", data: marshal(t, metav1.SchemeGroupVersion, &metav1.Status{}), diff --git a/tools/auth/exec/types_test.go b/tools/auth/exec/types_test.go index 3e1938cae..4e33b67c8 100644 --- a/tools/auth/exec/types_test.go +++ b/tools/auth/exec/types_test.go @@ -24,7 +24,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" clientauthenticationv1 "k8s.io/client-go/pkg/apis/clientauthentication/v1" - clientauthenticationv1alpha1 "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" clientauthenticationv1beta1 "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" clientcmdv1 "k8s.io/client-go/tools/clientcmd/api/v1" ) @@ -139,15 +138,13 @@ func testClientAuthenticationClusterTypesAreSynced(t *testing.T, cluster interfa } // TestAllClusterTypesAreSynced is a TODO so that we remember to write a test similar to -// TestV1beta1ClusterTypesAreSynced for any future ExecCredential version. It should start failing +// TestClientAuthenticationClusterTypesAreSynced for any future ExecCredential version. It should start failing // when someone adds support for any other ExecCredential type to this package. func TestAllClusterTypesAreSynced(t *testing.T) { versionsThatDontNeedTests := sets.NewString( // The internal Cluster type should only be used...internally...and therefore doesn't // necessarily need to be synced with clientcmdv1. runtime.APIVersionInternal, - // V1alpha1 does not contain a Cluster type. - clientauthenticationv1alpha1.SchemeGroupVersion.Version, // We have a test for v1beta1 above. clientauthenticationv1beta1.SchemeGroupVersion.Version, // We have a test for v1 above. From 70889063d23647222f00682291bf4317fb25ab79 Mon Sep 17 00:00:00 2001 From: Margo Crawford Date: Fri, 18 Mar 2022 10:16:58 -0700 Subject: [PATCH 082/111] Generated code for deleting exec credential v1alpha1 api Signed-off-by: Margo Crawford Kubernetes-commit: 38cbe6d7fe0f2536883485a1c36f345a4eafcc79 --- .../v1/zz_generated.conversion.go | 16 +++++---- .../v1beta1/zz_generated.conversion.go | 16 +++++---- .../zz_generated.deepcopy.go | 36 ------------------- 3 files changed, 20 insertions(+), 48 deletions(-) diff --git a/pkg/apis/clientauthentication/v1/zz_generated.conversion.go b/pkg/apis/clientauthentication/v1/zz_generated.conversion.go index 277d9d93e..82fe94ca9 100644 --- a/pkg/apis/clientauthentication/v1/zz_generated.conversion.go +++ b/pkg/apis/clientauthentication/v1/zz_generated.conversion.go @@ -62,6 +62,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*ExecCredentialStatus)(nil), (*clientauthentication.ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(a.(*ExecCredentialStatus), b.(*clientauthentication.ExecCredentialStatus), scope) }); err != nil { @@ -72,11 +77,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) - }); err != nil { - return err - } return nil } @@ -160,7 +160,6 @@ func Convert_v1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in } func autoConvert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { - // WARNING: in.Response requires manual conversion: does not exist in peer-type out.Interactive = in.Interactive if in.Cluster != nil { in, out := &in.Cluster, &out.Cluster @@ -174,6 +173,11 @@ func autoConvert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpe return nil } +// Convert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec is an autogenerated conversion function. +func Convert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + return autoConvert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(in, out, s) +} + func autoConvert_v1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { out.ExpirationTimestamp = (*metav1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) out.Token = in.Token diff --git a/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go b/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go index c82993897..8c4d43fea 100644 --- a/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go @@ -62,6 +62,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*ExecCredentialStatus)(nil), (*clientauthentication.ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(a.(*ExecCredentialStatus), b.(*clientauthentication.ExecCredentialStatus), scope) }); err != nil { @@ -72,11 +77,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) - }); err != nil { - return err - } return nil } @@ -160,7 +160,6 @@ func Convert_v1beta1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSp } func autoConvert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { - // WARNING: in.Response requires manual conversion: does not exist in peer-type out.Interactive = in.Interactive if in.Cluster != nil { in, out := &in.Cluster, &out.Cluster @@ -174,6 +173,11 @@ func autoConvert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredenti return nil } +// Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec is an autogenerated conversion function. +func Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + return autoConvert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(in, out, s) +} + func autoConvert_v1beta1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { out.ExpirationTimestamp = (*v1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) out.Token = in.Token diff --git a/pkg/apis/clientauthentication/zz_generated.deepcopy.go b/pkg/apis/clientauthentication/zz_generated.deepcopy.go index 3103629f6..244d54ce3 100644 --- a/pkg/apis/clientauthentication/zz_generated.deepcopy.go +++ b/pkg/apis/clientauthentication/zz_generated.deepcopy.go @@ -83,11 +83,6 @@ func (in *ExecCredential) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExecCredentialSpec) DeepCopyInto(out *ExecCredentialSpec) { *out = *in - if in.Response != nil { - in, out := &in.Response, &out.Response - *out = new(Response) - (*in).DeepCopyInto(*out) - } if in.Cluster != nil { in, out := &in.Cluster, &out.Cluster *out = new(Cluster) @@ -125,34 +120,3 @@ func (in *ExecCredentialStatus) DeepCopy() *ExecCredentialStatus { in.DeepCopyInto(out) return out } - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Response) DeepCopyInto(out *Response) { - *out = *in - if in.Header != nil { - in, out := &in.Header, &out.Header - *out = make(map[string][]string, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Response. -func (in *Response) DeepCopy() *Response { - if in == nil { - return nil - } - out := new(Response) - in.DeepCopyInto(out) - return out -} From c47b8028952efa7b1520969275a235ecbcdfd1b5 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Thu, 17 Mar 2022 19:07:39 -0700 Subject: [PATCH 083/111] Merge pull request #108772 from aojea/user_agent client-go: default user agent if empty Kubernetes-commit: b0c435c8c48587edaeade94937525e03ccff9167 --- go.mod | 4 ++-- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 0c7674ea3..cd7dd3e63 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220317021646-b9830ac37b46 + k8s.io/api v0.0.0-20220319170349-0f1a9d7727b7 k8s.io/apimachinery v0.0.0-20220317021027-c68a4df61d4d k8s.io/klog/v2 v2.40.1 k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18 @@ -40,6 +40,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220317021646-b9830ac37b46 + k8s.io/api => k8s.io/api v0.0.0-20220319170349-0f1a9d7727b7 k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220317021027-c68a4df61d4d ) diff --git a/go.sum b/go.sum index 7b4b8935e..b4e77fb21 100644 --- a/go.sum +++ b/go.sum @@ -613,8 +613,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220317021646-b9830ac37b46 h1:GiOCYRoSGe/xX3X60/Z+3Xq6C9/dyKcRElTN01Hpg3o= -k8s.io/api v0.0.0-20220317021646-b9830ac37b46/go.mod h1:RvsmB1DuKSEVw+3ZZ6fseROF1PYQkewMo0uNNvIcXKs= +k8s.io/api v0.0.0-20220319170349-0f1a9d7727b7 h1:mZ+ypm/uYY8RMzg27GxqdV7qZMIc8MhucmkPshG4RGs= +k8s.io/api v0.0.0-20220319170349-0f1a9d7727b7/go.mod h1:RvsmB1DuKSEVw+3ZZ6fseROF1PYQkewMo0uNNvIcXKs= k8s.io/apimachinery v0.0.0-20220317021027-c68a4df61d4d h1:X97IrPL+mdzFxeVmVkbtko19rowdqorN20036BKf+qQ= k8s.io/apimachinery v0.0.0-20220317021027-c68a4df61d4d/go.mod h1:Xig8YiaWvp151KCOs9q3j/mLnW/ooZAR6EtxqHwhtD0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= From f624f8e7708bd9392d0df017fa20770267708744 Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Mon, 21 Mar 2022 09:48:27 -0700 Subject: [PATCH 084/111] add better link for gcp auth plugin doc Kubernetes-commit: 6a8579d1cd3ddeea6c012a4c0fdb7e32687a83f1 --- plugin/pkg/client/auth/gcp/gcp.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugin/pkg/client/auth/gcp/gcp.go b/plugin/pkg/client/auth/gcp/gcp.go index 7ec872e83..209376bc2 100644 --- a/plugin/pkg/client/auth/gcp/gcp.go +++ b/plugin/pkg/client/auth/gcp/gcp.go @@ -116,11 +116,9 @@ type gcpAuthProvider struct { var warnOnce sync.Once func newGCPAuthProvider(_ string, gcpConfig map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { - // deprecated in v1.22, remove in v1.25 - // this should be updated to use klog.Warningf in v1.24 to more actively warn consumers warnOnce.Do(func() { - klog.V(1).Infof(`WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.25+; use gcloud instead. -To learn more, consult https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins`) + klog.Warningf(`WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.25+; use gcloud instead. +To learn more, consult https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke`) }) ts, err := tokenSource(isCmdTokenSource(gcpConfig), gcpConfig) From dedf7ce61c9bee7b99853c305c930eddb35250ca Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Mon, 21 Mar 2022 14:20:44 -0700 Subject: [PATCH 085/111] Merge pull request #108852 from mikedanese/auth-plugin-doc add better link for gcp auth plugin doc Kubernetes-commit: afb0136d6235201a89a426f071b8957a5a1b79ef From 83029168ccfcf7b8c6e3e5aaa156dcd799726d89 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Thu, 24 Mar 2022 10:11:06 -0400 Subject: [PATCH 086/111] Temporarily disable TestCheckRetryClosesBody Kubernetes-commit: 9c13a27d182c36296b7f2e381970b82c69d5c405 --- rest/request_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rest/request_test.go b/rest/request_test.go index e2f6e81f5..3f3f45e6e 100644 --- a/rest/request_test.go +++ b/rest/request_test.go @@ -1371,6 +1371,8 @@ func (b *testBackoffManager) Sleep(d time.Duration) { } func TestCheckRetryClosesBody(t *testing.T) { + // unblock CI until http://issue.k8s.io/108906 is resolved in 1.24 + t.Skip("http://issue.k8s.io/108906") count := 0 ch := make(chan struct{}) testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { From 97bcbe75489de1161d5d3aff752bd2f2630b1b1c Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Thu, 24 Mar 2022 17:12:27 +0000 Subject: [PATCH 087/111] sync: initially remove files BUILD */BUILD BUILD.bazel */BUILD.bazel Gopkg.toml */.gitattributes --- pkg/version/.gitattributes | 1 - 1 file changed, 1 deletion(-) delete mode 100644 pkg/version/.gitattributes diff --git a/pkg/version/.gitattributes b/pkg/version/.gitattributes deleted file mode 100644 index 7e349eff6..000000000 --- a/pkg/version/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -base.go export-subst From af0252eed9c09ac090f49a44b1fa1eb8baee1d44 Mon Sep 17 00:00:00 2001 From: Alex Zielenski Date: Thu, 24 Mar 2022 14:01:01 -0700 Subject: [PATCH 088/111] Update kube-openapi (#108895) * upgrade k8s.io/kube-openapi * fix open-api v3 blank aggregator output * use keys as API group in ./hack/update-openapi-spec.sh * fix import grouping * update openapiv3 integration tests Kubernetes-commit: 11b3a18cca745485e1033be8d62a1d0cde5a1d1d --- go.mod | 10 +++++----- go.sum | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index b167abac9..d44d5ef7d 100644 --- a/go.mod +++ b/go.mod @@ -30,16 +30,16 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220324090948-252596ff4b82 - k8s.io/apimachinery v0.0.0-20220324090745-7300632adf34 + k8s.io/api v0.0.0-20220324210930-df53a95c65aa + k8s.io/apimachinery v0.0.0-20220324210734-b68ae5efb0e8 k8s.io/klog/v2 v2.60.1 - k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18 + k8s.io/kube-openapi v0.0.0-20220323210520-29d726468e05 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 sigs.k8s.io/structured-merge-diff/v4 v4.2.1 sigs.k8s.io/yaml v1.2.0 ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220324090948-252596ff4b82 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220324090745-7300632adf34 + k8s.io/api => k8s.io/api v0.0.0-20220324210930-df53a95c65aa + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220324210734-b68ae5efb0e8 ) diff --git a/go.sum b/go.sum index 4a069643a..4519be7a2 100644 --- a/go.sum +++ b/go.sum @@ -613,17 +613,17 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220324090948-252596ff4b82 h1:JzyceRELIVLSbRvRGVMFsBF3TMLz654zQ7o9f+BTwAA= -k8s.io/api v0.0.0-20220324090948-252596ff4b82/go.mod h1:JqmWcTc8w/f9H6FAID3aXgcs3r23s/WDUoSYelnyMzU= -k8s.io/apimachinery v0.0.0-20220324090745-7300632adf34 h1:SsC1YncL6JXgQ58/38HUQNgloOpepqST88xg7uqNAGQ= -k8s.io/apimachinery v0.0.0-20220324090745-7300632adf34/go.mod h1:PgkO8eNLIN6yNjdRAueHZRbNd08wHC7Y40ooODLbuWA= +k8s.io/api v0.0.0-20220324210930-df53a95c65aa h1:NzCktMsy22Y/ddoBN/kf96kFaklITIHNfA1sRv6UofA= +k8s.io/api v0.0.0-20220324210930-df53a95c65aa/go.mod h1:Ea6ReZGsqdWOZc66t7sHO58lTcUGyQcMJ3UfsqOnKfM= +k8s.io/apimachinery v0.0.0-20220324210734-b68ae5efb0e8 h1:LULUz36bFy2WqAjJVZAbn4yVJ92Xn7oBaUCF6BR8HDk= +k8s.io/apimachinery v0.0.0-20220324210734-b68ae5efb0e8/go.mod h1:V4ECjDypP1xQpnL3N9yFzlbGZgd8tLKouJnRyAn/Zyw= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18 h1:M0Korml79JW27ndc6lxLxkNP8QVqdpBj0MIEZliKy8A= -k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18/go.mod h1:p8bjuqy9+BWvBDEBjdeVYtX6kMWWg6OhY1V1jhC9MPI= +k8s.io/kube-openapi v0.0.0-20220323210520-29d726468e05 h1:HC/IqdsYa2juhSDWUEO/MGxGcyUMSMX+aynZ5WcJZeg= +k8s.io/kube-openapi v0.0.0-20220323210520-29d726468e05/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From ef44f112dbd17179e826329c5443e62d7c357cb5 Mon Sep 17 00:00:00 2001 From: cici37 Date: Thu, 24 Mar 2022 15:11:08 -0700 Subject: [PATCH 089/111] Bump kube-openapi Kubernetes-commit: 383eb99bebdd5746732b7f6789907ea3598ee98e --- go.mod | 11 ++++++----- go.sum | 8 ++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index de9cf1dbe..793b4c1d9 100644 --- a/go.mod +++ b/go.mod @@ -30,16 +30,17 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220326170940-92515b8d1830 - k8s.io/apimachinery v0.0.0-20220326050748-1a826352d1a6 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.60.1 - k8s.io/kube-openapi v0.0.0-20220323210520-29d726468e05 + k8s.io/kube-openapi v0.0.0-20220324211241-9f9c01d62a3a k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 sigs.k8s.io/structured-merge-diff/v4 v4.2.1 sigs.k8s.io/yaml v1.2.0 ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220326170940-92515b8d1830 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220326050748-1a826352d1a6 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index 83673dd74..44d74da98 100644 --- a/go.sum +++ b/go.sum @@ -613,17 +613,13 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220326170940-92515b8d1830 h1:dFdm8jHFBWGBHT25TqqHU5Cq+k6ye+YjfgtfgSj+IHU= -k8s.io/api v0.0.0-20220326170940-92515b8d1830/go.mod h1:nSB8/pJVqLZwB6bz7abk+bjQClYsL9Dmpn/WHuG819o= -k8s.io/apimachinery v0.0.0-20220326050748-1a826352d1a6 h1:6HO0jOM6IZFgU8JjScwE6mpiM6GADuTmpHOsFXYlGXc= -k8s.io/apimachinery v0.0.0-20220326050748-1a826352d1a6/go.mod h1:V4ECjDypP1xQpnL3N9yFzlbGZgd8tLKouJnRyAn/Zyw= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20220323210520-29d726468e05 h1:HC/IqdsYa2juhSDWUEO/MGxGcyUMSMX+aynZ5WcJZeg= -k8s.io/kube-openapi v0.0.0-20220323210520-29d726468e05/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= +k8s.io/kube-openapi v0.0.0-20220324211241-9f9c01d62a3a h1:91uLlZzSWSkvb1xuJeHwRMTMLHRHXz7eXPNuKxXJb+0= +k8s.io/kube-openapi v0.0.0-20220324211241-9f9c01d62a3a/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From 402aa66c5cad92634b35dfdd161fd26a40dfc40d Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Sat, 26 Mar 2022 14:49:20 -0700 Subject: [PATCH 090/111] Merge pull request #108996 from cici37/errUpdate Bump kube-openapi and update err handling Kubernetes-commit: 898443f40583cd0fd864e9b11c8156faf64b680a --- go.mod | 9 ++++----- go.sum | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 793b4c1d9..bf6791393 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0 - k8s.io/apimachinery v0.0.0 + k8s.io/api v0.0.0-20220327010943-9431395a90d0 + k8s.io/apimachinery v0.0.0-20220327010739-4d8ad187e0a0 k8s.io/klog/v2 v2.60.1 k8s.io/kube-openapi v0.0.0-20220324211241-9f9c01d62a3a k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -40,7 +40,6 @@ require ( ) replace ( - k8s.io/api => ../api - k8s.io/apimachinery => ../apimachinery - k8s.io/client-go => ../client-go + k8s.io/api => k8s.io/api v0.0.0-20220327010943-9431395a90d0 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220327010739-4d8ad187e0a0 ) diff --git a/go.sum b/go.sum index 44d74da98..2fed6a598 100644 --- a/go.sum +++ b/go.sum @@ -613,6 +613,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.0.0-20220327010943-9431395a90d0 h1:X+CjFuKiWUYmXxuNueT2v0YNHDZhiRJ0389k24Fh1cg= +k8s.io/api v0.0.0-20220327010943-9431395a90d0/go.mod h1:OHmmfP+B0EkV7rltm6KDhsy7UJUjc3nPo97jKZwLIkM= +k8s.io/apimachinery v0.0.0-20220327010739-4d8ad187e0a0 h1:vZrBcVfdctsRfR+SUOLUmY4+eU4FOnRIpsx03xNPqJ8= +k8s.io/apimachinery v0.0.0-20220327010739-4d8ad187e0a0/go.mod h1:WkN7hnr/sIpKTK8v3BZKqLkdqTMz00TBdMWqE0M0O7Q= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 1a9591bb972b0fc5ffad2a5bffb2c0a701c6c2a6 Mon Sep 17 00:00:00 2001 From: Mayank Kumar Date: Fri, 30 Aug 2019 00:05:18 -0700 Subject: [PATCH 091/111] API: maxUnavailable for StatefulSet Kubernetes-commit: 357203d992bb9b0cf9685f878d8635cf3277bef9 --- .../apps/v1/rollingupdatestatefulsetstrategy.go | 15 ++++++++++++++- .../v1beta1/rollingupdatestatefulsetstrategy.go | 15 ++++++++++++++- .../v1beta2/rollingupdatestatefulsetstrategy.go | 15 ++++++++++++++- applyconfigurations/internal/internal.go | 9 +++++++++ 4 files changed, 51 insertions(+), 3 deletions(-) diff --git a/applyconfigurations/apps/v1/rollingupdatestatefulsetstrategy.go b/applyconfigurations/apps/v1/rollingupdatestatefulsetstrategy.go index 2090d88ed..c1b5dea85 100644 --- a/applyconfigurations/apps/v1/rollingupdatestatefulsetstrategy.go +++ b/applyconfigurations/apps/v1/rollingupdatestatefulsetstrategy.go @@ -18,10 +18,15 @@ limitations under the License. package v1 +import ( + intstr "k8s.io/apimachinery/pkg/util/intstr" +) + // RollingUpdateStatefulSetStrategyApplyConfiguration represents an declarative configuration of the RollingUpdateStatefulSetStrategy type for use // with apply. type RollingUpdateStatefulSetStrategyApplyConfiguration struct { - Partition *int32 `json:"partition,omitempty"` + Partition *int32 `json:"partition,omitempty"` + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` } // RollingUpdateStatefulSetStrategyApplyConfiguration constructs an declarative configuration of the RollingUpdateStatefulSetStrategy type for use with @@ -37,3 +42,11 @@ func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithPartition(value b.Partition = &value return b } + +// WithMaxUnavailable sets the MaxUnavailable field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MaxUnavailable field is set to the value of the last call. +func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithMaxUnavailable(value intstr.IntOrString) *RollingUpdateStatefulSetStrategyApplyConfiguration { + b.MaxUnavailable = &value + return b +} diff --git a/applyconfigurations/apps/v1beta1/rollingupdatestatefulsetstrategy.go b/applyconfigurations/apps/v1beta1/rollingupdatestatefulsetstrategy.go index 64273f618..8989a08d2 100644 --- a/applyconfigurations/apps/v1beta1/rollingupdatestatefulsetstrategy.go +++ b/applyconfigurations/apps/v1beta1/rollingupdatestatefulsetstrategy.go @@ -18,10 +18,15 @@ limitations under the License. package v1beta1 +import ( + intstr "k8s.io/apimachinery/pkg/util/intstr" +) + // RollingUpdateStatefulSetStrategyApplyConfiguration represents an declarative configuration of the RollingUpdateStatefulSetStrategy type for use // with apply. type RollingUpdateStatefulSetStrategyApplyConfiguration struct { - Partition *int32 `json:"partition,omitempty"` + Partition *int32 `json:"partition,omitempty"` + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` } // RollingUpdateStatefulSetStrategyApplyConfiguration constructs an declarative configuration of the RollingUpdateStatefulSetStrategy type for use with @@ -37,3 +42,11 @@ func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithPartition(value b.Partition = &value return b } + +// WithMaxUnavailable sets the MaxUnavailable field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MaxUnavailable field is set to the value of the last call. +func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithMaxUnavailable(value intstr.IntOrString) *RollingUpdateStatefulSetStrategyApplyConfiguration { + b.MaxUnavailable = &value + return b +} diff --git a/applyconfigurations/apps/v1beta2/rollingupdatestatefulsetstrategy.go b/applyconfigurations/apps/v1beta2/rollingupdatestatefulsetstrategy.go index f828ef70d..4a12e51c0 100644 --- a/applyconfigurations/apps/v1beta2/rollingupdatestatefulsetstrategy.go +++ b/applyconfigurations/apps/v1beta2/rollingupdatestatefulsetstrategy.go @@ -18,10 +18,15 @@ limitations under the License. package v1beta2 +import ( + intstr "k8s.io/apimachinery/pkg/util/intstr" +) + // RollingUpdateStatefulSetStrategyApplyConfiguration represents an declarative configuration of the RollingUpdateStatefulSetStrategy type for use // with apply. type RollingUpdateStatefulSetStrategyApplyConfiguration struct { - Partition *int32 `json:"partition,omitempty"` + Partition *int32 `json:"partition,omitempty"` + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` } // RollingUpdateStatefulSetStrategyApplyConfiguration constructs an declarative configuration of the RollingUpdateStatefulSetStrategy type for use with @@ -37,3 +42,11 @@ func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithPartition(value b.Partition = &value return b } + +// WithMaxUnavailable sets the MaxUnavailable field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MaxUnavailable field is set to the value of the last call. +func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithMaxUnavailable(value intstr.IntOrString) *RollingUpdateStatefulSetStrategyApplyConfiguration { + b.MaxUnavailable = &value + return b +} diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index bd7f58d02..4ae62c215 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -862,6 +862,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy map: fields: + - name: maxUnavailable + type: + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - name: partition type: scalar: numeric @@ -1162,6 +1165,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy map: fields: + - name: maxUnavailable + type: + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - name: partition type: scalar: numeric @@ -1660,6 +1666,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.apps.v1beta2.RollingUpdateStatefulSetStrategy map: fields: + - name: maxUnavailable + type: + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - name: partition type: scalar: numeric From 018cf8ace67879a4e292f3b9cb685ab130a08714 Mon Sep 17 00:00:00 2001 From: Alexander Zielenski Date: Tue, 22 Mar 2022 10:40:56 -0700 Subject: [PATCH 092/111] add fetching into discovery client for OpenAPI v3 reflect latest struct changes use correct discovery openapi test data layout make the OpenAPIv3 interface less blue field grouping add copyrights implement cached discovery client add cached discovery tests address review feedback Kubernetes-commit: 075866b3e3ea029c243d82d8d6eb99e96d9c49d3 --- discovery/cached/disk/cached_discovery.go | 21 +++ .../cached/disk/cached_discovery_test.go | 86 +++++++++ discovery/cached/memory/memcache.go | 16 ++ discovery/cached/memory/memcache_test.go | 62 +++++++ discovery/discovery_client.go | 17 +- discovery/discovery_client_test.go | 49 +++++ discovery/fake/discovery.go | 5 + discovery/testdata/apis/batch/v1.json | 1 + discovery/testdata/apis/batch/v1beta1.json | 1 + go.mod | 9 +- go.sum | 12 +- openapi/cached/client.go | 54 ++++++ openapi/cached/groupversion.go | 45 +++++ openapi/client.go | 64 +++++++ openapi/groupversion.go | 61 ++++++ restmapper/discovery_test.go | 9 + restmapper/shortcut_test.go | 5 + util/testing/fake_openapi_handler.go | 174 ++++++++++++++++++ 18 files changed, 680 insertions(+), 11 deletions(-) create mode 100644 discovery/testdata/apis/batch/v1.json create mode 100644 discovery/testdata/apis/batch/v1beta1.json create mode 100644 openapi/cached/client.go create mode 100644 openapi/cached/groupversion.go create mode 100644 openapi/client.go create mode 100644 openapi/groupversion.go create mode 100644 util/testing/fake_openapi_handler.go diff --git a/discovery/cached/disk/cached_discovery.go b/discovery/cached/disk/cached_discovery.go index 07f8182e4..004f00a56 100644 --- a/discovery/cached/disk/cached_discovery.go +++ b/discovery/cached/disk/cached_discovery.go @@ -33,6 +33,8 @@ import ( "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/discovery" "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/openapi" + cachedopenapi "k8s.io/client-go/openapi/cached" restclient "k8s.io/client-go/rest" ) @@ -56,6 +58,9 @@ type CachedDiscoveryClient struct { invalidated bool // fresh is true if all used cache files were ours fresh bool + + /// + openapiClient openapi.Client } var _ discovery.CachedDiscoveryInterface = &CachedDiscoveryClient{} @@ -233,6 +238,21 @@ func (d *CachedDiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { return d.delegate.OpenAPISchema() } +// OpenAPIV3 retrieves and parses the OpenAPIV3 specs exposed by the server +func (d *CachedDiscoveryClient) OpenAPIV3() openapi.Client { + // Must take lock since Invalidate call may modify openapiClient + d.mutex.Lock() + defer d.mutex.Unlock() + + if d.openapiClient == nil { + // Delegate is discovery client created with special HTTP client which + // respects E-Tag cache responses to serve cache from disk. + d.openapiClient = cachedopenapi.NewClient(d.delegate.OpenAPIV3()) + } + + return d.openapiClient +} + // Fresh is supposed to tell the caller whether or not to retry if the cache // fails to find something (false = retry, true = no need to retry). func (d *CachedDiscoveryClient) Fresh() bool { @@ -250,6 +270,7 @@ func (d *CachedDiscoveryClient) Invalidate() { d.ourFiles = map[string]struct{}{} d.fresh = true d.invalidated = true + d.openapiClient = nil } // NewCachedDiscoveryClientForConfig creates a new DiscoveryClient for the given config, and wraps diff --git a/discovery/cached/disk/cached_discovery_test.go b/discovery/cached/disk/cached_discovery_test.go index 35239c2c1..2fd46a9db 100644 --- a/discovery/cached/disk/cached_discovery_test.go +++ b/discovery/cached/disk/cached_discovery_test.go @@ -20,19 +20,24 @@ import ( "io/ioutil" "os" "path/filepath" + "strings" "testing" "time" openapi_v2 "github.com/google/gnostic/openapiv2" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/discovery" + "k8s.io/client-go/openapi" + "k8s.io/client-go/rest" restclient "k8s.io/client-go/rest" "k8s.io/client-go/rest/fake" + testutil "k8s.io/client-go/util/testing" ) func TestCachedDiscoveryClient_Fresh(t *testing.T) { @@ -123,6 +128,83 @@ func TestNewCachedDiscoveryClient_PathPerm(t *testing.T) { assert.NoError(err) } +// Tests that schema instances returned by openapi cached and returned after +// successive calls +func TestOpenAPIDiskCache(t *testing.T) { + // Create discovery cache dir (unused) + discoCache, err := ioutil.TempDir("", "") + require.NoError(t, err) + os.RemoveAll(discoCache) + defer os.RemoveAll(discoCache) + + // Create http cache dir + httpCache, err := ioutil.TempDir("", "") + require.NoError(t, err) + os.RemoveAll(httpCache) + defer os.RemoveAll(httpCache) + + // Start test OpenAPI server + fakeServer, err := testutil.NewFakeOpenAPIV3Server("../../testdata") + require.NoError(t, err) + defer fakeServer.HttpServer.Close() + + require.Greater(t, len(fakeServer.ServedDocuments), 0) + + client, err := NewCachedDiscoveryClientForConfig( + &rest.Config{Host: fakeServer.HttpServer.URL}, + discoCache, + httpCache, + 1*time.Nanosecond, + ) + require.NoError(t, err) + + openapiClient := client.OpenAPIV3() + + // Ensure initial Paths call hits server + _, err = openapiClient.Paths() + require.NoError(t, err) + assert.Equal(t, 1, fakeServer.RequestCounters["/openapi/v3"]) + + // Ensure Paths call does hits server again + // This is expected since openapiClient is the same instance, so Paths() + // should be cached in memory. + paths, err := openapiClient.Paths() + require.NoError(t, err) + assert.Equal(t, 1, fakeServer.RequestCounters["/openapi/v3"]) + + require.Greater(t, len(paths), 0) + i := 0 + for k, v := range paths { + i++ + + _, err = v.Schema() + assert.NoError(t, err) + + path := "/openapi/v3/" + strings.TrimPrefix(k, "/") + assert.Equal(t, 1, fakeServer.RequestCounters[path]) + + // Ensure schema call is served from memory + _, err = v.Schema() + assert.NoError(t, err) + assert.Equal(t, 1, fakeServer.RequestCounters[path]) + + client.Invalidate() + + // Refetch the schema from a new openapi client to try to force a new + // http request + newPaths, err := client.OpenAPIV3().Paths() + if !assert.NoError(t, err) { + continue + } + + // Ensure schema call is still served from disk + _, err = newPaths[k].Schema() + assert.NoError(t, err) + assert.Equal(t, 1+i, fakeServer.RequestCounters["/openapi/v3"]) + assert.Equal(t, 1, fakeServer.RequestCounters[path]) + } +} + type fakeDiscoveryClient struct { groupCalls int resourceCalls int @@ -207,3 +289,7 @@ func (c *fakeDiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { c.openAPICalls = c.openAPICalls + 1 return &openapi_v2.Document{}, nil } + +func (d *fakeDiscoveryClient) OpenAPIV3() openapi.Client { + panic("unimplemented") +} diff --git a/discovery/cached/memory/memcache.go b/discovery/cached/memory/memcache.go index 7795afeb3..117c66f28 100644 --- a/discovery/cached/memory/memcache.go +++ b/discovery/cached/memory/memcache.go @@ -29,6 +29,8 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/discovery" + "k8s.io/client-go/openapi" + cachedopenapi "k8s.io/client-go/openapi/cached" restclient "k8s.io/client-go/rest" ) @@ -49,6 +51,7 @@ type memCacheClient struct { groupToServerResources map[string]*cacheEntry groupList *metav1.APIGroupList cacheValid bool + openapiClient openapi.Client } // Error Constants @@ -143,6 +146,18 @@ func (d *memCacheClient) OpenAPISchema() (*openapi_v2.Document, error) { return d.delegate.OpenAPISchema() } +func (d *memCacheClient) OpenAPIV3() openapi.Client { + // Must take lock since Invalidate call may modify openapiClient + d.lock.Lock() + defer d.lock.Unlock() + + if d.openapiClient == nil { + d.openapiClient = cachedopenapi.NewClient(d.delegate.OpenAPIV3()) + } + + return d.openapiClient +} + func (d *memCacheClient) Fresh() bool { d.lock.RLock() defer d.lock.RUnlock() @@ -160,6 +175,7 @@ func (d *memCacheClient) Invalidate() { d.cacheValid = false d.groupToServerResources = nil d.groupList = nil + d.openapiClient = nil } // refreshLocked refreshes the state of cache. The caller must hold d.lock for diff --git a/discovery/cached/memory/memcache_test.go b/discovery/cached/memory/memcache_test.go index 4a910931c..2130fce11 100644 --- a/discovery/cached/memory/memcache_test.go +++ b/discovery/cached/memory/memcache_test.go @@ -23,9 +23,14 @@ import ( "sync" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" errorsutil "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/discovery" "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/rest" + testutil "k8s.io/client-go/util/testing" ) type resourceMapEntry struct { @@ -390,3 +395,60 @@ func TestPartialRetryableFailure(t *testing.T) { t.Errorf("Expected %#v, got %#v", e, a) } } + +// Tests that schema instances returned by openapi cached and returned after +// successive calls +func TestOpenAPIMemCache(t *testing.T) { + fakeServer, err := testutil.NewFakeOpenAPIV3Server("../../testdata") + require.NoError(t, err) + defer fakeServer.HttpServer.Close() + + require.Greater(t, len(fakeServer.ServedDocuments), 0) + + client := NewMemCacheClient( + discovery.NewDiscoveryClientForConfigOrDie( + &rest.Config{Host: fakeServer.HttpServer.URL}, + ), + ) + openapiClient := client.OpenAPIV3() + + paths, err := openapiClient.Paths() + require.NoError(t, err) + + for k, v := range paths { + original, err := v.Schema() + if !assert.NoError(t, err) { + continue + } + + pathsAgain, err := openapiClient.Paths() + if !assert.NoError(t, err) { + continue + } + + schemaAgain, err := pathsAgain[k].Schema() + if !assert.NoError(t, err) { + continue + } + + assert.True(t, reflect.ValueOf(paths).Pointer() == reflect.ValueOf(pathsAgain).Pointer()) + assert.True(t, reflect.ValueOf(original).Pointer() == reflect.ValueOf(schemaAgain).Pointer()) + + // Invalidate and try again. This time pointers should not be equal + client.Invalidate() + + pathsAgain, err = client.OpenAPIV3().Paths() + if !assert.NoError(t, err) { + continue + } + + schemaAgain, err = pathsAgain[k].Schema() + if !assert.NoError(t, err) { + continue + } + + assert.True(t, reflect.ValueOf(paths).Pointer() != reflect.ValueOf(pathsAgain).Pointer()) + assert.True(t, reflect.ValueOf(original).Pointer() != reflect.ValueOf(schemaAgain).Pointer()) + assert.Equal(t, original, schemaAgain) + } +} diff --git a/discovery/discovery_client.go b/discovery/discovery_client.go index 9ea89755c..baf878846 100644 --- a/discovery/discovery_client.go +++ b/discovery/discovery_client.go @@ -39,6 +39,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/openapi" restclient "k8s.io/client-go/rest" ) @@ -46,7 +47,8 @@ const ( // defaultRetries is the number of times a resource discovery is repeated if an api group disappears on the fly (e.g. CustomResourceDefinitions). defaultRetries = 2 // protobuf mime type - mimePb = "application/com.github.proto-openapi.spec.v2@v1.0+protobuf" + openAPIV2mimePb = "application/com.github.proto-openapi.spec.v2@v1.0+protobuf" + // defaultTimeout is the maximum amount of time per request when no timeout has been set on a RESTClient. // Defaults to 32s in order to have a distinguishable length of time, relative to other timeouts that exist. defaultTimeout = 32 * time.Second @@ -60,6 +62,7 @@ type DiscoveryInterface interface { ServerResourcesInterface ServerVersionInterface OpenAPISchemaInterface + OpenAPIV3SchemaInterface } // CachedDiscoveryInterface is a DiscoveryInterface with cache invalidation and freshness. @@ -121,6 +124,10 @@ type OpenAPISchemaInterface interface { OpenAPISchema() (*openapi_v2.Document, error) } +type OpenAPIV3SchemaInterface interface { + OpenAPIV3() openapi.Client +} + // DiscoveryClient implements the functions that discover server-supported API groups, // versions and resources. type DiscoveryClient struct { @@ -399,9 +406,9 @@ func (d *DiscoveryClient) ServerVersion() (*version.Info, error) { return &info, nil } -// OpenAPISchema fetches the open api schema using a rest client and parses the proto. +// OpenAPISchema fetches the open api v2 schema using a rest client and parses the proto. func (d *DiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { - data, err := d.restClient.Get().AbsPath("/openapi/v2").SetHeader("Accept", mimePb).Do(context.TODO()).Raw() + data, err := d.restClient.Get().AbsPath("/openapi/v2").SetHeader("Accept", openAPIV2mimePb).Do(context.TODO()).Raw() if err != nil { if errors.IsForbidden(err) || errors.IsNotFound(err) || errors.IsNotAcceptable(err) { // single endpoint not found/registered in old server, try to fetch old endpoint @@ -422,6 +429,10 @@ func (d *DiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { return document, nil } +func (d *DiscoveryClient) OpenAPIV3() openapi.Client { + return openapi.NewClient(d.restClient) +} + // withRetries retries the given recovery function in case the groups supported by the server change after ServerGroup() returns. func withRetries(maxRetries int, f func() ([]*metav1.APIGroup, []*metav1.APIResourceList, error)) ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { var result []*metav1.APIResourceList diff --git a/discovery/discovery_client_test.go b/discovery/discovery_client_test.go index f1006beb2..b34b96901 100644 --- a/discovery/discovery_client_test.go +++ b/discovery/discovery_client_test.go @@ -28,6 +28,7 @@ import ( "github.com/gogo/protobuf/proto" openapi_v2 "github.com/google/gnostic/openapiv2" + openapi_v3 "github.com/google/gnostic/openapiv3" "github.com/stretchr/testify/assert" golangproto "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -36,6 +37,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/version" restclient "k8s.io/client-go/rest" + testutil "k8s.io/client-go/util/testing" ) func TestGetServerVersion(t *testing.T) { @@ -535,6 +537,14 @@ func openapiSchemaFakeServer(t *testing.T) (*httptest.Server, error) { return server, nil } +func openapiV3SchemaFakeServer(t *testing.T) (*httptest.Server, map[string]*openapi_v3.Document, error) { + res, err := testutil.NewFakeOpenAPIV3Server("testdata") + if err != nil { + return nil, nil, err + } + return res.HttpServer, res.ServedDocuments, nil +} + func TestGetOpenAPISchema(t *testing.T) { server, err := openapiSchemaFakeServer(t) if err != nil { @@ -552,6 +562,45 @@ func TestGetOpenAPISchema(t *testing.T) { } } +func TestGetOpenAPISchemaV3(t *testing.T) { + server, testV3Specs, err := openapiV3SchemaFakeServer(t) + if err != nil { + t.Errorf("unexpected error starting fake server: %v", err) + } + defer server.Close() + + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + openapiClient := client.OpenAPIV3() + paths, err := openapiClient.Paths() + if err != nil { + t.Fatalf("unexpected error getting openapi: %v", err) + } + + for k, v := range paths { + actual, err := v.Schema() + if err != nil { + t.Fatal(err) + } + + expected := testV3Specs[k] + if !golangproto.Equal(expected, actual) { + t.Fatalf("expected \n%v\n\ngot:\n%v", expected, actual) + } + + // Ensure that fetching schema once again does not return same instance + actualAgain, err := v.Schema() + if err != nil { + t.Fatal(err) + } + + if reflect.ValueOf(actual).Pointer() == reflect.ValueOf(actualAgain).Pointer() { + t.Fatal("expected schema not to be cached") + } else if !golangproto.Equal(actual, actualAgain) { + t.Fatal("expected schema values to be equal") + } + } +} + func TestGetOpenAPISchemaForbiddenFallback(t *testing.T) { server, err := openapiSchemaDeprecatedFakeServer(http.StatusForbidden, t) if err != nil { diff --git a/discovery/fake/discovery.go b/discovery/fake/discovery.go index ea875955f..1ec4354e4 100644 --- a/discovery/fake/discovery.go +++ b/discovery/fake/discovery.go @@ -26,6 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/version" + "k8s.io/client-go/openapi" kubeversion "k8s.io/client-go/pkg/version" restclient "k8s.io/client-go/rest" "k8s.io/client-go/testing" @@ -154,6 +155,10 @@ func (c *FakeDiscovery) OpenAPISchema() (*openapi_v2.Document, error) { return &openapi_v2.Document{}, nil } +func (c *FakeDiscovery) OpenAPIV3() openapi.Client { + panic("implement me") +} + // RESTClient returns a RESTClient that is used to communicate with API server // by this client implementation. func (c *FakeDiscovery) RESTClient() restclient.Interface { diff --git a/discovery/testdata/apis/batch/v1.json b/discovery/testdata/apis/batch/v1.json new file mode 100644 index 000000000..34d2c53f3 --- /dev/null +++ b/discovery/testdata/apis/batch/v1.json @@ -0,0 +1 @@ +{"openapi":"3.0.0","info":{"title":"Kubernetes","version":"v1.24.0"},"paths":{"/apis/batch/v1/":{"get":{"tags":["batch_v1"],"description":"get available resources","operationId":"getBatchV1APIResources","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList"}}}}}}},"/apis/batch/v1/cronjobs":{"get":{"tags":["batch_v1"],"description":"list or watch objects of kind CronJob","operationId":"listBatchV1CronJobForAllNamespaces","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJobList"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJobList"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJobList"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJobList"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJobList"}}}}}},"parameters":[{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}}]},"/apis/batch/v1/jobs":{"get":{"tags":["batch_v1"],"description":"list or watch objects of kind Job","operationId":"listBatchV1JobForAllNamespaces","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobList"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobList"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobList"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobList"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobList"}}}}}},"parameters":[{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}}]},"/apis/batch/v1/namespaces/{namespace}/cronjobs":{"get":{"tags":["batch_v1"],"description":"list or watch objects of kind CronJob","operationId":"listBatchV1NamespacedCronJob","parameters":[{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}},{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJobList"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJobList"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJobList"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJobList"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJobList"}}}}}},"post":{"tags":["batch_v1"],"description":"create a CronJob","operationId":"createBatchV1NamespacedCronJob","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}}}},"delete":{"tags":["batch_v1"],"description":"delete collection of CronJob","operationId":"deleteBatchV1CollectionNamespacedCronJob","parameters":[{"name":"gracePeriodSeconds","in":"query","description":"The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.","schema":{"type":"integer","uniqueItems":true}},{"name":"orphanDependents","in":"query","description":"Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.","schema":{"type":"boolean","uniqueItems":true}},{"name":"propagationPolicy","in":"query","description":"Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.","schema":{"type":"string","uniqueItems":true}},{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}}}}}},"parameters":[{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}}]},"/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}":{"get":{"tags":["batch_v1"],"description":"read the specified CronJob","operationId":"readBatchV1NamespacedCronJob","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}}}},"put":{"tags":["batch_v1"],"description":"replace the specified CronJob","operationId":"replaceBatchV1NamespacedCronJob","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}}}},"delete":{"tags":["batch_v1"],"description":"delete a CronJob","operationId":"deleteBatchV1NamespacedCronJob","parameters":[{"name":"gracePeriodSeconds","in":"query","description":"The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.","schema":{"type":"integer","uniqueItems":true}},{"name":"orphanDependents","in":"query","description":"Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.","schema":{"type":"boolean","uniqueItems":true}},{"name":"propagationPolicy","in":"query","description":"Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.","schema":{"type":"string","uniqueItems":true}},{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}}}}}},"patch":{"tags":["batch_v1"],"description":"partially update the specified CronJob","operationId":"patchBatchV1NamespacedCronJob","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"force","in":"query","description":"Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.","schema":{"type":"boolean","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}}}},"parameters":[{"name":"name","in":"path","description":"name of the CronJob","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}}]},"/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status":{"get":{"tags":["batch_v1"],"description":"read status of the specified CronJob","operationId":"readBatchV1NamespacedCronJobStatus","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}}}},"put":{"tags":["batch_v1"],"description":"replace status of the specified CronJob","operationId":"replaceBatchV1NamespacedCronJobStatus","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}}}},"patch":{"tags":["batch_v1"],"description":"partially update status of the specified CronJob","operationId":"patchBatchV1NamespacedCronJobStatus","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"force","in":"query","description":"Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.","schema":{"type":"boolean","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}}}}}},"parameters":[{"name":"name","in":"path","description":"name of the CronJob","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}}]},"/apis/batch/v1/namespaces/{namespace}/jobs":{"get":{"tags":["batch_v1"],"description":"list or watch objects of kind Job","operationId":"listBatchV1NamespacedJob","parameters":[{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}},{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobList"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobList"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobList"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobList"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobList"}}}}}},"post":{"tags":["batch_v1"],"description":"create a Job","operationId":"createBatchV1NamespacedJob","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}}}},"delete":{"tags":["batch_v1"],"description":"delete collection of Job","operationId":"deleteBatchV1CollectionNamespacedJob","parameters":[{"name":"gracePeriodSeconds","in":"query","description":"The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.","schema":{"type":"integer","uniqueItems":true}},{"name":"orphanDependents","in":"query","description":"Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.","schema":{"type":"boolean","uniqueItems":true}},{"name":"propagationPolicy","in":"query","description":"Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.","schema":{"type":"string","uniqueItems":true}},{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}}}}}},"parameters":[{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}}]},"/apis/batch/v1/namespaces/{namespace}/jobs/{name}":{"get":{"tags":["batch_v1"],"description":"read the specified Job","operationId":"readBatchV1NamespacedJob","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}}}},"put":{"tags":["batch_v1"],"description":"replace the specified Job","operationId":"replaceBatchV1NamespacedJob","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}}}},"delete":{"tags":["batch_v1"],"description":"delete a Job","operationId":"deleteBatchV1NamespacedJob","parameters":[{"name":"gracePeriodSeconds","in":"query","description":"The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.","schema":{"type":"integer","uniqueItems":true}},{"name":"orphanDependents","in":"query","description":"Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.","schema":{"type":"boolean","uniqueItems":true}},{"name":"propagationPolicy","in":"query","description":"Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.","schema":{"type":"string","uniqueItems":true}},{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}}}}}},"patch":{"tags":["batch_v1"],"description":"partially update the specified Job","operationId":"patchBatchV1NamespacedJob","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"force","in":"query","description":"Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.","schema":{"type":"boolean","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}}}},"parameters":[{"name":"name","in":"path","description":"name of the Job","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}}]},"/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status":{"get":{"tags":["batch_v1"],"description":"read status of the specified Job","operationId":"readBatchV1NamespacedJobStatus","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}}}},"put":{"tags":["batch_v1"],"description":"replace status of the specified Job","operationId":"replaceBatchV1NamespacedJobStatus","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}}}},"patch":{"tags":["batch_v1"],"description":"partially update status of the specified Job","operationId":"patchBatchV1NamespacedJobStatus","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"force","in":"query","description":"Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.","schema":{"type":"boolean","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}}}}}},"parameters":[{"name":"name","in":"path","description":"name of the Job","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}}]},"/apis/batch/v1/watch/cronjobs":{"get":{"tags":["batch_v1"],"description":"watch individual changes to a list of CronJob. deprecated: use the 'watch' parameter with a list operation instead.","operationId":"watchBatchV1CronJobListForAllNamespaces","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}}}}}},"parameters":[{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}}]},"/apis/batch/v1/watch/jobs":{"get":{"tags":["batch_v1"],"description":"watch individual changes to a list of Job. deprecated: use the 'watch' parameter with a list operation instead.","operationId":"watchBatchV1JobListForAllNamespaces","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}}}}}},"parameters":[{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}}]},"/apis/batch/v1/watch/namespaces/{namespace}/cronjobs":{"get":{"tags":["batch_v1"],"description":"watch individual changes to a list of CronJob. deprecated: use the 'watch' parameter with a list operation instead.","operationId":"watchBatchV1NamespacedCronJobList","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}}}}}},"parameters":[{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}}]},"/apis/batch/v1/watch/namespaces/{namespace}/cronjobs/{name}":{"get":{"tags":["batch_v1"],"description":"watch changes to an object of kind CronJob. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.","operationId":"watchBatchV1NamespacedCronJob","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}}}}}},"parameters":[{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"name","in":"path","description":"name of the CronJob","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}}]},"/apis/batch/v1/watch/namespaces/{namespace}/jobs":{"get":{"tags":["batch_v1"],"description":"watch individual changes to a list of Job. deprecated: use the 'watch' parameter with a list operation instead.","operationId":"watchBatchV1NamespacedJobList","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}}}}}},"parameters":[{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}}]},"/apis/batch/v1/watch/namespaces/{namespace}/jobs/{name}":{"get":{"tags":["batch_v1"],"description":"watch changes to an object of kind Job. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.","operationId":"watchBatchV1NamespacedJob","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}}}}}},"parameters":[{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"name","in":"path","description":"name of the Job","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}}]}},"components":{"schemas":{"io.k8s.api.batch.v1.CronJob":{"description":"CronJob represents the configuration of a single cron job.","type":"object","properties":{"apiVersion":{"description":"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources","type":"string"},"kind":{"description":"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"description":"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"},"spec":{"description":"Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJobSpec"},"status":{"description":"Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJobStatus"}},"x-kubernetes-group-version-kind":[{"group":"batch","kind":"CronJob","version":"v1"}]},"io.k8s.api.batch.v1.CronJobList":{"description":"CronJobList is a collection of cron jobs.","type":"object","required":["items"],"properties":{"apiVersion":{"description":"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources","type":"string"},"items":{"description":"items is the list of CronJobs.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1.CronJob"}},"kind":{"description":"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"description":"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"}},"x-kubernetes-group-version-kind":[{"group":"batch","kind":"CronJobList","version":"v1"}]},"io.k8s.api.batch.v1.CronJobSpec":{"description":"CronJobSpec describes how the job execution will look like and when it will actually run.","type":"object","required":["schedule","jobTemplate"],"properties":{"concurrencyPolicy":{"description":"Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one\n\n","type":"string"},"failedJobsHistoryLimit":{"description":"The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1.","type":"integer","format":"int32"},"jobTemplate":{"description":"Specifies the job that will be created when executing a CronJob.","default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobTemplateSpec"},"schedule":{"description":"The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.","type":"string","default":""},"startingDeadlineSeconds":{"description":"Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.","type":"integer","format":"int64"},"successfulJobsHistoryLimit":{"description":"The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3.","type":"integer","format":"int32"},"suspend":{"description":"This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.","type":"boolean"}}},"io.k8s.api.batch.v1.CronJobStatus":{"description":"CronJobStatus represents the current state of a cron job.","type":"object","properties":{"active":{"description":"A list of pointers to currently running jobs.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.ObjectReference"},"x-kubernetes-list-type":"atomic"},"lastScheduleTime":{"description":"Information when was the last time the job was successfully scheduled.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"},"lastSuccessfulTime":{"description":"Information when was the last time the job successfully completed.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"}}},"io.k8s.api.batch.v1.Job":{"description":"Job represents the configuration of a single job.","type":"object","properties":{"apiVersion":{"description":"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources","type":"string"},"kind":{"description":"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"description":"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"},"spec":{"description":"Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobSpec"},"status":{"description":"Current status of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobStatus"}},"x-kubernetes-group-version-kind":[{"group":"batch","kind":"Job","version":"v1"}]},"io.k8s.api.batch.v1.JobCondition":{"description":"JobCondition describes current state of a job.","type":"object","required":["type","status"],"properties":{"lastProbeTime":{"description":"Last time the condition was checked.","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"},"lastTransitionTime":{"description":"Last time the condition transit from one status to another.","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"},"message":{"description":"Human readable message indicating details about last transition.","type":"string"},"reason":{"description":"(brief) reason for the condition's last transition.","type":"string"},"status":{"description":"Status of the condition, one of True, False, Unknown.","type":"string","default":""},"type":{"description":"Type of job condition, Complete or Failed.\n\n","type":"string","default":""}}},"io.k8s.api.batch.v1.JobList":{"description":"JobList is a collection of jobs.","type":"object","required":["items"],"properties":{"apiVersion":{"description":"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources","type":"string"},"items":{"description":"items is the list of Jobs.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1.Job"}},"kind":{"description":"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"description":"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"}},"x-kubernetes-group-version-kind":[{"group":"batch","kind":"JobList","version":"v1"}]},"io.k8s.api.batch.v1.JobSpec":{"description":"JobSpec describes how the job execution will look like.","type":"object","required":["template"],"properties":{"activeDeadlineSeconds":{"description":"Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.","type":"integer","format":"int64"},"backoffLimit":{"description":"Specifies the number of retries before marking this job failed. Defaults to 6","type":"integer","format":"int32"},"completionMode":{"description":"CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nThis field is beta-level. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job.","type":"string"},"completions":{"description":"Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/","type":"integer","format":"int32"},"manualSelector":{"description":"manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector","type":"boolean"},"parallelism":{"description":"Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) \u003c .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/","type":"integer","format":"int32"},"selector":{"description":"A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"},"suspend":{"description":"Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.\n\nThis field is beta-level, gated by SuspendJob feature flag (enabled by default).","type":"boolean"},"template":{"description":"Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodTemplateSpec"},"ttlSecondsAfterFinished":{"description":"ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes.","type":"integer","format":"int32"}}},"io.k8s.api.batch.v1.JobStatus":{"description":"JobStatus represents the current state of a Job.","type":"object","properties":{"active":{"description":"The number of pending and running pods.","type":"integer","format":"int32"},"completedIndexes":{"description":"CompletedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\".","type":"string"},"completionTime":{"description":"Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"},"conditions":{"description":"The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobCondition"},"x-kubernetes-list-type":"atomic","x-kubernetes-patch-merge-key":"type","x-kubernetes-patch-strategy":"merge"},"failed":{"description":"The number of pods which reached phase Failed.","type":"integer","format":"int32"},"ready":{"description":"The number of pods which have a Ready condition.\n\nThis field is alpha-level. The job controller populates the field when the feature gate JobReadyPods is enabled (disabled by default).","type":"integer","format":"int32"},"startTime":{"description":"Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"},"succeeded":{"description":"The number of pods which reached phase Succeeded.","type":"integer","format":"int32"},"uncountedTerminatedPods":{"description":"UncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status: (1) Add the pod UID to the arrays in this field. (2) Remove the pod finalizer. (3) Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nThis field is beta-level. The job controller only makes use of this field when the feature gate JobTrackingWithFinalizers is enabled (enabled by default). Old jobs might not be tracked using this field, in which case the field remains null.","$ref":"#/components/schemas/io.k8s.api.batch.v1.UncountedTerminatedPods"}}},"io.k8s.api.batch.v1.JobTemplateSpec":{"description":"JobTemplateSpec describes the data a Job should have when created from a template","type":"object","properties":{"metadata":{"description":"Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"},"spec":{"description":"Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobSpec"}}},"io.k8s.api.batch.v1.UncountedTerminatedPods":{"description":"UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters.","type":"object","properties":{"failed":{"description":"Failed holds UIDs of failed Pods.","type":"array","items":{"type":"string","default":""},"x-kubernetes-list-type":"set"},"succeeded":{"description":"Succeeded holds UIDs of succeeded Pods.","type":"array","items":{"type":"string","default":""},"x-kubernetes-list-type":"set"}}},"io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource":{"description":"Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.","type":"object","required":["volumeID"],"properties":{"fsType":{"description":"fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore","type":"string"},"partition":{"description":"partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).","type":"integer","format":"int32"},"readOnly":{"description":"readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore","type":"boolean"},"volumeID":{"description":"volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore","type":"string","default":""}}},"io.k8s.api.core.v1.Affinity":{"description":"Affinity is a group of affinity scheduling rules.","type":"object","properties":{"nodeAffinity":{"description":"Describes node affinity scheduling rules for the pod.","$ref":"#/components/schemas/io.k8s.api.core.v1.NodeAffinity"},"podAffinity":{"description":"Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).","$ref":"#/components/schemas/io.k8s.api.core.v1.PodAffinity"},"podAntiAffinity":{"description":"Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).","$ref":"#/components/schemas/io.k8s.api.core.v1.PodAntiAffinity"}}},"io.k8s.api.core.v1.AzureDiskVolumeSource":{"description":"AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.","type":"object","required":["diskName","diskURI"],"properties":{"cachingMode":{"description":"cachingMode is the Host Caching mode: None, Read Only, Read Write.","type":"string"},"diskName":{"description":"diskName is the Name of the data disk in the blob storage","type":"string","default":""},"diskURI":{"description":"diskURI is the URI of data disk in the blob storage","type":"string","default":""},"fsType":{"description":"fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.","type":"string"},"kind":{"description":"kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared","type":"string"},"readOnly":{"description":"readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"}}},"io.k8s.api.core.v1.AzureFileVolumeSource":{"description":"AzureFile represents an Azure File Service mount on the host and bind mount to the pod.","type":"object","required":["secretName","shareName"],"properties":{"readOnly":{"description":"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretName":{"description":"secretName is the name of secret that contains Azure Storage Account Name and Key","type":"string","default":""},"shareName":{"description":"shareName is the azure share Name","type":"string","default":""}}},"io.k8s.api.core.v1.CSIVolumeSource":{"description":"Represents a source location of a volume to mount, managed by an external CSI driver","type":"object","required":["driver"],"properties":{"driver":{"description":"driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.","type":"string","default":""},"fsType":{"description":"fsType to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.","type":"string"},"nodePublishSecretRef":{"description":"nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"readOnly":{"description":"readOnly specifies a read-only configuration for the volume. Defaults to false (read/write).","type":"boolean"},"volumeAttributes":{"description":"volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.","type":"object","additionalProperties":{"type":"string","default":""}}}},"io.k8s.api.core.v1.Capabilities":{"description":"Adds and removes POSIX capabilities from running containers.","type":"object","properties":{"add":{"description":"Added capabilities","type":"array","items":{"type":"string","default":""}},"drop":{"description":"Removed capabilities","type":"array","items":{"type":"string","default":""}}}},"io.k8s.api.core.v1.CephFSVolumeSource":{"description":"Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.","type":"object","required":["monitors"],"properties":{"monitors":{"description":"monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","type":"array","items":{"type":"string","default":""}},"path":{"description":"path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /","type":"string"},"readOnly":{"description":"readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","type":"boolean"},"secretFile":{"description":"secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","type":"string"},"secretRef":{"description":"secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"user":{"description":"user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","type":"string"}}},"io.k8s.api.core.v1.CinderVolumeSource":{"description":"Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.","type":"object","required":["volumeID"],"properties":{"fsType":{"description":"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","type":"string"},"readOnly":{"description":"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","type":"boolean"},"secretRef":{"description":"secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"volumeID":{"description":"volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","type":"string","default":""}}},"io.k8s.api.core.v1.ConfigMapEnvSource":{"description":"ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.","type":"object","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap must be defined","type":"boolean"}}},"io.k8s.api.core.v1.ConfigMapKeySelector":{"description":"Selects a key from a ConfigMap.","type":"object","required":["key"],"properties":{"key":{"description":"The key to select.","type":"string","default":""},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.ConfigMapProjection":{"description":"Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.","type":"object","properties":{"items":{"description":"items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.KeyToPath"}},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"optional specify whether the ConfigMap or its keys must be defined","type":"boolean"}}},"io.k8s.api.core.v1.ConfigMapVolumeSource":{"description":"Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.","type":"object","properties":{"defaultMode":{"description":"defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","type":"integer","format":"int32"},"items":{"description":"items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.KeyToPath"}},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"optional specify whether the ConfigMap or its keys must be defined","type":"boolean"}}},"io.k8s.api.core.v1.Container":{"description":"A single application container that you want to run within a pod.","type":"object","required":["name"],"properties":{"args":{"description":"Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell","type":"array","items":{"type":"string","default":""}},"command":{"description":"Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell","type":"array","items":{"type":"string","default":""}},"env":{"description":"List of environment variables to set in the container. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.EnvVar"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge"},"envFrom":{"description":"List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.EnvFromSource"}},"image":{"description":"Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.","type":"string"},"imagePullPolicy":{"description":"Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n\n","type":"string"},"lifecycle":{"description":"Actions that the management system should take in response to container lifecycle events. Cannot be updated.","$ref":"#/components/schemas/io.k8s.api.core.v1.Lifecycle"},"livenessProbe":{"description":"Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","$ref":"#/components/schemas/io.k8s.api.core.v1.Probe"},"name":{"description":"Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.","type":"string","default":""},"ports":{"description":"List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.ContainerPort"},"x-kubernetes-list-map-keys":["containerPort","protocol"],"x-kubernetes-list-type":"map","x-kubernetes-patch-merge-key":"containerPort","x-kubernetes-patch-strategy":"merge"},"readinessProbe":{"description":"Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","$ref":"#/components/schemas/io.k8s.api.core.v1.Probe"},"resources":{"description":"Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.ResourceRequirements"},"securityContext":{"description":"SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/","$ref":"#/components/schemas/io.k8s.api.core.v1.SecurityContext"},"startupProbe":{"description":"StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","$ref":"#/components/schemas/io.k8s.api.core.v1.Probe"},"stdin":{"description":"Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.","type":"boolean"},"stdinOnce":{"description":"Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false","type":"boolean"},"terminationMessagePath":{"description":"Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.","type":"string"},"terminationMessagePolicy":{"description":"Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.\n\n","type":"string"},"tty":{"description":"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.","type":"boolean"},"volumeDevices":{"description":"volumeDevices is the list of block devices to be used by the container.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.VolumeDevice"},"x-kubernetes-patch-merge-key":"devicePath","x-kubernetes-patch-strategy":"merge"},"volumeMounts":{"description":"Pod volumes to mount into the container's filesystem. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.VolumeMount"},"x-kubernetes-patch-merge-key":"mountPath","x-kubernetes-patch-strategy":"merge"},"workingDir":{"description":"Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.","type":"string"}}},"io.k8s.api.core.v1.ContainerPort":{"description":"ContainerPort represents a network port in a single container.","type":"object","required":["containerPort"],"properties":{"containerPort":{"description":"Number of port to expose on the pod's IP address. This must be a valid port number, 0 \u003c x \u003c 65536.","type":"integer","format":"int32","default":0},"hostIP":{"description":"What host IP to bind the external port to.","type":"string"},"hostPort":{"description":"Number of port to expose on the host. If specified, this must be a valid port number, 0 \u003c x \u003c 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.","type":"integer","format":"int32"},"name":{"description":"If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.","type":"string"},"protocol":{"description":"Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".\n\n","type":"string","default":"TCP"}}},"io.k8s.api.core.v1.DownwardAPIProjection":{"description":"Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.","type":"object","properties":{"items":{"description":"Items is a list of DownwardAPIVolume file","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.DownwardAPIVolumeFile"}}}},"io.k8s.api.core.v1.DownwardAPIVolumeFile":{"description":"DownwardAPIVolumeFile represents information to create the file containing the pod field","type":"object","required":["path"],"properties":{"fieldRef":{"description":"Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.","$ref":"#/components/schemas/io.k8s.api.core.v1.ObjectFieldSelector"},"mode":{"description":"Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","type":"integer","format":"int32"},"path":{"description":"Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'","type":"string","default":""},"resourceFieldRef":{"description":"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.","$ref":"#/components/schemas/io.k8s.api.core.v1.ResourceFieldSelector"}}},"io.k8s.api.core.v1.DownwardAPIVolumeSource":{"description":"DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.","type":"object","properties":{"defaultMode":{"description":"Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","type":"integer","format":"int32"},"items":{"description":"Items is a list of downward API volume file","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.DownwardAPIVolumeFile"}}}},"io.k8s.api.core.v1.EmptyDirVolumeSource":{"description":"Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.","type":"object","properties":{"medium":{"description":"medium represents what type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir","type":"string"},"sizeLimit":{"description":"sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity"}}},"io.k8s.api.core.v1.EnvFromSource":{"description":"EnvFromSource represents the source of a set of ConfigMaps","type":"object","properties":{"configMapRef":{"description":"The ConfigMap to select from","$ref":"#/components/schemas/io.k8s.api.core.v1.ConfigMapEnvSource"},"prefix":{"description":"An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.","type":"string"},"secretRef":{"description":"The Secret to select from","$ref":"#/components/schemas/io.k8s.api.core.v1.SecretEnvSource"}}},"io.k8s.api.core.v1.EnvVar":{"description":"EnvVar represents an environment variable present in a Container.","type":"object","required":["name"],"properties":{"name":{"description":"Name of the environment variable. Must be a C_IDENTIFIER.","type":"string","default":""},"value":{"description":"Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".","type":"string"},"valueFrom":{"description":"Source for the environment variable's value. Cannot be used if value is not empty.","$ref":"#/components/schemas/io.k8s.api.core.v1.EnvVarSource"}}},"io.k8s.api.core.v1.EnvVarSource":{"description":"EnvVarSource represents a source for the value of an EnvVar.","type":"object","properties":{"configMapKeyRef":{"description":"Selects a key of a ConfigMap.","$ref":"#/components/schemas/io.k8s.api.core.v1.ConfigMapKeySelector"},"fieldRef":{"description":"Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['\u003cKEY\u003e']`, `metadata.annotations['\u003cKEY\u003e']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.","$ref":"#/components/schemas/io.k8s.api.core.v1.ObjectFieldSelector"},"resourceFieldRef":{"description":"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.","$ref":"#/components/schemas/io.k8s.api.core.v1.ResourceFieldSelector"},"secretKeyRef":{"description":"Selects a key of a secret in the pod's namespace","$ref":"#/components/schemas/io.k8s.api.core.v1.SecretKeySelector"}}},"io.k8s.api.core.v1.EphemeralContainer":{"description":"An EphemeralContainer is a temporary container that you may add to an existing Pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a Pod is removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the Pod to exceed its resource allocation.\n\nTo add an ephemeral container, use the ephemeralcontainers subresource of an existing Pod. Ephemeral containers may not be removed or restarted.\n\nThis is a beta feature available on clusters that haven't disabled the EphemeralContainers feature gate.","type":"object","required":["name"],"properties":{"args":{"description":"Arguments to the entrypoint. The image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell","type":"array","items":{"type":"string","default":""}},"command":{"description":"Entrypoint array. Not executed within a shell. The image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell","type":"array","items":{"type":"string","default":""}},"env":{"description":"List of environment variables to set in the container. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.EnvVar"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge"},"envFrom":{"description":"List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.EnvFromSource"}},"image":{"description":"Container image name. More info: https://kubernetes.io/docs/concepts/containers/images","type":"string"},"imagePullPolicy":{"description":"Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n\n","type":"string"},"lifecycle":{"description":"Lifecycle is not allowed for ephemeral containers.","$ref":"#/components/schemas/io.k8s.api.core.v1.Lifecycle"},"livenessProbe":{"description":"Probes are not allowed for ephemeral containers.","$ref":"#/components/schemas/io.k8s.api.core.v1.Probe"},"name":{"description":"Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.","type":"string","default":""},"ports":{"description":"Ports are not allowed for ephemeral containers.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.ContainerPort"},"x-kubernetes-list-map-keys":["containerPort","protocol"],"x-kubernetes-list-type":"map","x-kubernetes-patch-merge-key":"containerPort","x-kubernetes-patch-strategy":"merge"},"readinessProbe":{"description":"Probes are not allowed for ephemeral containers.","$ref":"#/components/schemas/io.k8s.api.core.v1.Probe"},"resources":{"description":"Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.ResourceRequirements"},"securityContext":{"description":"Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.","$ref":"#/components/schemas/io.k8s.api.core.v1.SecurityContext"},"startupProbe":{"description":"Probes are not allowed for ephemeral containers.","$ref":"#/components/schemas/io.k8s.api.core.v1.Probe"},"stdin":{"description":"Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.","type":"boolean"},"stdinOnce":{"description":"Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false","type":"boolean"},"targetContainerName":{"description":"If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container uses the namespaces configured in the Pod spec.\n\nThe container runtime must implement support for this feature. If the runtime does not support namespace targeting then the result of setting this field is undefined.","type":"string"},"terminationMessagePath":{"description":"Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.","type":"string"},"terminationMessagePolicy":{"description":"Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.\n\n","type":"string"},"tty":{"description":"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.","type":"boolean"},"volumeDevices":{"description":"volumeDevices is the list of block devices to be used by the container.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.VolumeDevice"},"x-kubernetes-patch-merge-key":"devicePath","x-kubernetes-patch-strategy":"merge"},"volumeMounts":{"description":"Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.VolumeMount"},"x-kubernetes-patch-merge-key":"mountPath","x-kubernetes-patch-strategy":"merge"},"workingDir":{"description":"Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.","type":"string"}}},"io.k8s.api.core.v1.EphemeralVolumeSource":{"description":"Represents an ephemeral volume that is handled by a normal storage driver.","type":"object","properties":{"volumeClaimTemplate":{"description":"Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `\u003cpod name\u003e-\u003cvolume name\u003e` where `\u003cvolume name\u003e` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.\n\nRequired, must not be nil.","$ref":"#/components/schemas/io.k8s.api.core.v1.PersistentVolumeClaimTemplate"}}},"io.k8s.api.core.v1.ExecAction":{"description":"ExecAction describes a \"run in container\" action.","type":"object","properties":{"command":{"description":"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.","type":"array","items":{"type":"string","default":""}}}},"io.k8s.api.core.v1.FCVolumeSource":{"description":"Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.","type":"object","properties":{"fsType":{"description":"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.","type":"string"},"lun":{"description":"lun is Optional: FC target lun number","type":"integer","format":"int32"},"readOnly":{"description":"readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"targetWWNs":{"description":"targetWWNs is Optional: FC target worldwide names (WWNs)","type":"array","items":{"type":"string","default":""}},"wwids":{"description":"wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.","type":"array","items":{"type":"string","default":""}}}},"io.k8s.api.core.v1.FlexVolumeSource":{"description":"FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.","type":"object","required":["driver"],"properties":{"driver":{"description":"driver is the name of the driver to use for this volume.","type":"string","default":""},"fsType":{"description":"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.","type":"string"},"options":{"description":"options is Optional: this field holds extra command options if any.","type":"object","additionalProperties":{"type":"string","default":""}},"readOnly":{"description":"readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretRef":{"description":"secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"}}},"io.k8s.api.core.v1.FlockerVolumeSource":{"description":"Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.","type":"object","properties":{"datasetName":{"description":"datasetName is Name of the dataset stored as metadata -\u003e name on the dataset for Flocker should be considered as deprecated","type":"string"},"datasetUUID":{"description":"datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset","type":"string"}}},"io.k8s.api.core.v1.GCEPersistentDiskVolumeSource":{"description":"Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.","type":"object","required":["pdName"],"properties":{"fsType":{"description":"fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk","type":"string"},"partition":{"description":"partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk","type":"integer","format":"int32"},"pdName":{"description":"pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk","type":"string","default":""},"readOnly":{"description":"readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk","type":"boolean"}}},"io.k8s.api.core.v1.GRPCAction":{"type":"object","required":["port"],"properties":{"port":{"description":"Port number of the gRPC service. Number must be in the range 1 to 65535.","type":"integer","format":"int32","default":0},"service":{"description":"Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC.","type":"string","default":""}}},"io.k8s.api.core.v1.GitRepoVolumeSource":{"description":"Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.\n\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.","type":"object","required":["repository"],"properties":{"directory":{"description":"directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.","type":"string"},"repository":{"description":"repository is the URL","type":"string","default":""},"revision":{"description":"revision is the commit hash for the specified revision.","type":"string"}}},"io.k8s.api.core.v1.GlusterfsVolumeSource":{"description":"Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.","type":"object","required":["endpoints","path"],"properties":{"endpoints":{"description":"endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"string","default":""},"path":{"description":"path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"string","default":""},"readOnly":{"description":"readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"boolean"}}},"io.k8s.api.core.v1.HTTPGetAction":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","type":"object","required":["port"],"properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.HTTPHeader"}},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"description":"Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.util.intstr.IntOrString"},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.\n\n","type":"string"}}},"io.k8s.api.core.v1.HTTPHeader":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","type":"object","required":["name","value"],"properties":{"name":{"description":"The header field name","type":"string","default":""},"value":{"description":"The header field value","type":"string","default":""}}},"io.k8s.api.core.v1.HostAlias":{"description":"HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.","type":"object","properties":{"hostnames":{"description":"Hostnames for the above IP address.","type":"array","items":{"type":"string","default":""}},"ip":{"description":"IP address of the host file entry.","type":"string"}}},"io.k8s.api.core.v1.HostPathVolumeSource":{"description":"Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.","type":"object","required":["path"],"properties":{"path":{"description":"path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath","type":"string","default":""},"type":{"description":"type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath","type":"string"}}},"io.k8s.api.core.v1.ISCSIVolumeSource":{"description":"Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.","type":"object","required":["targetPortal","iqn","lun"],"properties":{"chapAuthDiscovery":{"description":"chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication","type":"boolean"},"chapAuthSession":{"description":"chapAuthSession defines whether support iSCSI Session CHAP authentication","type":"boolean"},"fsType":{"description":"fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi","type":"string"},"initiatorName":{"description":"initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface \u003ctarget portal\u003e:\u003cvolume name\u003e will be created for the connection.","type":"string"},"iqn":{"description":"iqn is the target iSCSI Qualified Name.","type":"string","default":""},"iscsiInterface":{"description":"iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).","type":"string"},"lun":{"description":"lun represents iSCSI Target Lun number.","type":"integer","format":"int32","default":0},"portals":{"description":"portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).","type":"array","items":{"type":"string","default":""}},"readOnly":{"description":"readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.","type":"boolean"},"secretRef":{"description":"secretRef is the CHAP Secret for iSCSI target and initiator authentication","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"targetPortal":{"description":"targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).","type":"string","default":""}}},"io.k8s.api.core.v1.KeyToPath":{"description":"Maps a string key to a path within a volume.","type":"object","required":["key","path"],"properties":{"key":{"description":"key is the key to project.","type":"string","default":""},"mode":{"description":"mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","type":"integer","format":"int32"},"path":{"description":"path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.","type":"string","default":""}}},"io.k8s.api.core.v1.Lifecycle":{"description":"Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.","type":"object","properties":{"postStart":{"description":"PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks","$ref":"#/components/schemas/io.k8s.api.core.v1.LifecycleHandler"},"preStop":{"description":"PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks","$ref":"#/components/schemas/io.k8s.api.core.v1.LifecycleHandler"}}},"io.k8s.api.core.v1.LifecycleHandler":{"description":"LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified.","type":"object","properties":{"exec":{"description":"Exec specifies the action to take.","$ref":"#/components/schemas/io.k8s.api.core.v1.ExecAction"},"httpGet":{"description":"HTTPGet specifies the http request to perform.","$ref":"#/components/schemas/io.k8s.api.core.v1.HTTPGetAction"},"tcpSocket":{"description":"Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.","$ref":"#/components/schemas/io.k8s.api.core.v1.TCPSocketAction"}}},"io.k8s.api.core.v1.LocalObjectReference":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","type":"object","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.NFSVolumeSource":{"description":"Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.","type":"object","required":["server","path"],"properties":{"path":{"description":"path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","type":"string","default":""},"readOnly":{"description":"readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","type":"boolean"},"server":{"description":"server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","type":"string","default":""}}},"io.k8s.api.core.v1.NodeAffinity":{"description":"Node affinity is a group of node affinity scheduling rules.","type":"object","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PreferredSchedulingTerm"}},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.","$ref":"#/components/schemas/io.k8s.api.core.v1.NodeSelector"}}},"io.k8s.api.core.v1.NodeSelector":{"description":"A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.","type":"object","required":["nodeSelectorTerms"],"properties":{"nodeSelectorTerms":{"description":"Required. A list of node selector terms. The terms are ORed.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.NodeSelectorTerm"}}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.NodeSelectorRequirement":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","type":"object","required":["key","operator"],"properties":{"key":{"description":"The label key that the selector applies to.","type":"string","default":""},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n\n","type":"string","default":""},"values":{"description":"An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.","type":"array","items":{"type":"string","default":""}}}},"io.k8s.api.core.v1.NodeSelectorTerm":{"description":"A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.","type":"object","properties":{"matchExpressions":{"description":"A list of node selector requirements by node's labels.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.NodeSelectorRequirement"}},"matchFields":{"description":"A list of node selector requirements by node's fields.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.NodeSelectorRequirement"}}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.ObjectFieldSelector":{"description":"ObjectFieldSelector selects an APIVersioned field of an object.","type":"object","required":["fieldPath"],"properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string","default":""}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.ObjectReference":{"description":"ObjectReference contains enough information to let you inspect or modify the referred object.","type":"object","properties":{"apiVersion":{"description":"API version of the referent.","type":"string"},"fieldPath":{"description":"If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.","type":"string"},"kind":{"description":"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"namespace":{"description":"Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/","type":"string"},"resourceVersion":{"description":"Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency","type":"string"},"uid":{"description":"UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids","type":"string"}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.PersistentVolumeClaimSpec":{"description":"PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes","type":"object","properties":{"accessModes":{"description":"accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1","type":"array","items":{"type":"string","default":""}},"dataSource":{"description":"dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.","$ref":"#/components/schemas/io.k8s.api.core.v1.TypedLocalObjectReference"},"dataSourceRef":{"description":"dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While DataSource ignores disallowed values (dropping them), DataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n(Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.","$ref":"#/components/schemas/io.k8s.api.core.v1.TypedLocalObjectReference"},"resources":{"description":"resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.ResourceRequirements"},"selector":{"description":"selector is a label query over volumes to consider for binding.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"},"storageClassName":{"description":"storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1","type":"string"},"volumeMode":{"description":"volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.","type":"string"},"volumeName":{"description":"volumeName is the binding reference to the PersistentVolume backing this claim.","type":"string"}}},"io.k8s.api.core.v1.PersistentVolumeClaimTemplate":{"description":"PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.","type":"object","required":["spec"],"properties":{"metadata":{"description":"May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"},"spec":{"description":"The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PersistentVolumeClaimSpec"}}},"io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource":{"description":"PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).","type":"object","required":["claimName"],"properties":{"claimName":{"description":"claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims","type":"string","default":""},"readOnly":{"description":"readOnly Will force the ReadOnly setting in VolumeMounts. Default false.","type":"boolean"}}},"io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource":{"description":"Represents a Photon Controller persistent disk resource.","type":"object","required":["pdID"],"properties":{"fsType":{"description":"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.","type":"string"},"pdID":{"description":"pdID is the ID that identifies Photon Controller persistent disk","type":"string","default":""}}},"io.k8s.api.core.v1.PodAffinity":{"description":"Pod affinity is a group of inter pod affinity scheduling rules.","type":"object","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.WeightedPodAffinityTerm"}},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodAffinityTerm"}}}},"io.k8s.api.core.v1.PodAffinityTerm":{"description":"Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e matches that of any node on which a pod of the set of pods is running","type":"object","required":["topologyKey"],"properties":{"labelSelector":{"description":"A label query over a set of resources, in this case pods.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"},"namespaceSelector":{"description":"A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"},"namespaces":{"description":"namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\"","type":"array","items":{"type":"string","default":""}},"topologyKey":{"description":"This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.","type":"string","default":""}}},"io.k8s.api.core.v1.PodAntiAffinity":{"description":"Pod anti affinity is a group of inter pod anti affinity scheduling rules.","type":"object","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.WeightedPodAffinityTerm"}},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodAffinityTerm"}}}},"io.k8s.api.core.v1.PodDNSConfig":{"description":"PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.","type":"object","properties":{"nameservers":{"description":"A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.","type":"array","items":{"type":"string","default":""}},"options":{"description":"A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodDNSConfigOption"}},"searches":{"description":"A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.","type":"array","items":{"type":"string","default":""}}}},"io.k8s.api.core.v1.PodDNSConfigOption":{"description":"PodDNSConfigOption defines DNS resolver options of a pod.","type":"object","properties":{"name":{"description":"Required.","type":"string"},"value":{"type":"string"}}},"io.k8s.api.core.v1.PodOS":{"description":"PodOS defines the OS parameters of a pod.","type":"object","required":["name"],"properties":{"name":{"description":"Name is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration Clients should expect to handle additional values and treat unrecognized values in this field as os: null","type":"string","default":""}}},"io.k8s.api.core.v1.PodReadinessGate":{"description":"PodReadinessGate contains the reference to a pod condition","type":"object","required":["conditionType"],"properties":{"conditionType":{"description":"ConditionType refers to a condition in the pod's condition list with matching type.\n\n","type":"string","default":""}}},"io.k8s.api.core.v1.PodSecurityContext":{"description":"PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.","type":"object","properties":{"fsGroup":{"description":"A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.","type":"integer","format":"int64"},"fsGroupChangePolicy":{"description":"fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used. Note that this field cannot be set when spec.os.name is windows.","type":"string"},"runAsGroup":{"description":"The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.","type":"integer","format":"int64"},"runAsNonRoot":{"description":"Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","type":"boolean"},"runAsUser":{"description":"The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.","type":"integer","format":"int64"},"seLinuxOptions":{"description":"The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.","$ref":"#/components/schemas/io.k8s.api.core.v1.SELinuxOptions"},"seccompProfile":{"description":"The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.","$ref":"#/components/schemas/io.k8s.api.core.v1.SeccompProfile"},"supplementalGroups":{"description":"A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. Note that this field cannot be set when spec.os.name is windows.","type":"array","items":{"type":"integer","format":"int64","default":0}},"sysctls":{"description":"Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.Sysctl"}},"windowsOptions":{"description":"The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.","$ref":"#/components/schemas/io.k8s.api.core.v1.WindowsSecurityContextOptions"}}},"io.k8s.api.core.v1.PodSpec":{"description":"PodSpec is a description of a pod.","type":"object","required":["containers"],"properties":{"activeDeadlineSeconds":{"description":"Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.","type":"integer","format":"int64"},"affinity":{"description":"If specified, the pod's scheduling constraints","$ref":"#/components/schemas/io.k8s.api.core.v1.Affinity"},"automountServiceAccountToken":{"description":"AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.","type":"boolean"},"containers":{"description":"List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.Container"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge"},"dnsConfig":{"description":"Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.","$ref":"#/components/schemas/io.k8s.api.core.v1.PodDNSConfig"},"dnsPolicy":{"description":"Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.\n\n","type":"string"},"enableServiceLinks":{"description":"EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true.","type":"boolean"},"ephemeralContainers":{"description":"List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is beta-level and available on clusters that haven't disabled the EphemeralContainers feature gate.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.EphemeralContainer"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge"},"hostAliases":{"description":"HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.HostAlias"},"x-kubernetes-patch-merge-key":"ip","x-kubernetes-patch-strategy":"merge"},"hostIPC":{"description":"Use the host's ipc namespace. Optional: Default to false.","type":"boolean"},"hostNetwork":{"description":"Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.","type":"boolean"},"hostPID":{"description":"Use the host's pid namespace. Optional: Default to false.","type":"boolean"},"hostname":{"description":"Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.","type":"string"},"imagePullSecrets":{"description":"ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge"},"initContainers":{"description":"List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.Container"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge"},"nodeName":{"description":"NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.","type":"string"},"nodeSelector":{"description":"NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/","type":"object","additionalProperties":{"type":"string","default":""},"x-kubernetes-map-type":"atomic"},"os":{"description":"Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup This is an alpha field and requires the IdentifyPodOS feature","$ref":"#/components/schemas/io.k8s.api.core.v1.PodOS"},"overhead":{"description":"Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.","type":"object","additionalProperties":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity"}},"preemptionPolicy":{"description":"PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.","type":"string"},"priority":{"description":"The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.","type":"integer","format":"int32"},"priorityClassName":{"description":"If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.","type":"string"},"readinessGates":{"description":"If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodReadinessGate"}},"restartPolicy":{"description":"Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy\n\n","type":"string"},"runtimeClassName":{"description":"RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class This is a beta feature as of Kubernetes v1.14.","type":"string"},"schedulerName":{"description":"If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.","type":"string"},"securityContext":{"description":"SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.","$ref":"#/components/schemas/io.k8s.api.core.v1.PodSecurityContext"},"serviceAccount":{"description":"DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.","type":"string"},"serviceAccountName":{"description":"ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/","type":"string"},"setHostnameAsFQDN":{"description":"If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.","type":"boolean"},"shareProcessNamespace":{"description":"Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.","type":"boolean"},"subdomain":{"description":"If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all.","type":"string"},"terminationGracePeriodSeconds":{"description":"Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.","type":"integer","format":"int64"},"tolerations":{"description":"If specified, the pod's tolerations.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.Toleration"}},"topologySpreadConstraints":{"description":"TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.TopologySpreadConstraint"},"x-kubernetes-list-map-keys":["topologyKey","whenUnsatisfiable"],"x-kubernetes-list-type":"map","x-kubernetes-patch-merge-key":"topologyKey","x-kubernetes-patch-strategy":"merge"},"volumes":{"description":"List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.Volume"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge,retainKeys"}}},"io.k8s.api.core.v1.PodTemplateSpec":{"description":"PodTemplateSpec describes the data a pod should have when created from a template","type":"object","properties":{"metadata":{"description":"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"},"spec":{"description":"Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodSpec"}}},"io.k8s.api.core.v1.PortworxVolumeSource":{"description":"PortworxVolumeSource represents a Portworx volume resource.","type":"object","required":["volumeID"],"properties":{"fsType":{"description":"fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.","type":"string"},"readOnly":{"description":"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"volumeID":{"description":"volumeID uniquely identifies a Portworx volume","type":"string","default":""}}},"io.k8s.api.core.v1.PreferredSchedulingTerm":{"description":"An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).","type":"object","required":["weight","preference"],"properties":{"preference":{"description":"A node selector term, associated with the corresponding weight.","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.NodeSelectorTerm"},"weight":{"description":"Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.","type":"integer","format":"int32","default":0}}},"io.k8s.api.core.v1.Probe":{"description":"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.","type":"object","properties":{"exec":{"description":"Exec specifies the action to take.","$ref":"#/components/schemas/io.k8s.api.core.v1.ExecAction"},"failureThreshold":{"description":"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.","type":"integer","format":"int32"},"grpc":{"description":"GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate.","$ref":"#/components/schemas/io.k8s.api.core.v1.GRPCAction"},"httpGet":{"description":"HTTPGet specifies the http request to perform.","$ref":"#/components/schemas/io.k8s.api.core.v1.HTTPGetAction"},"initialDelaySeconds":{"description":"Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","type":"integer","format":"int32"},"periodSeconds":{"description":"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.","type":"integer","format":"int32"},"successThreshold":{"description":"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.","type":"integer","format":"int32"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port.","$ref":"#/components/schemas/io.k8s.api.core.v1.TCPSocketAction"},"terminationGracePeriodSeconds":{"description":"Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.","type":"integer","format":"int64"},"timeoutSeconds":{"description":"Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","type":"integer","format":"int32"}}},"io.k8s.api.core.v1.ProjectedVolumeSource":{"description":"Represents a projected volume source","type":"object","properties":{"defaultMode":{"description":"defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","type":"integer","format":"int32"},"sources":{"description":"sources is the list of volume projections","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.VolumeProjection"}}}},"io.k8s.api.core.v1.QuobyteVolumeSource":{"description":"Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.","type":"object","required":["registry","volume"],"properties":{"group":{"description":"group to map volume access to Default is no group","type":"string"},"readOnly":{"description":"readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.","type":"boolean"},"registry":{"description":"registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes","type":"string","default":""},"tenant":{"description":"tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin","type":"string"},"user":{"description":"user to map volume access to Defaults to serivceaccount user","type":"string"},"volume":{"description":"volume is a string that references an already created Quobyte volume by name.","type":"string","default":""}}},"io.k8s.api.core.v1.RBDVolumeSource":{"description":"Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.","type":"object","required":["monitors","image"],"properties":{"fsType":{"description":"fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd","type":"string"},"image":{"description":"image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string","default":""},"keyring":{"description":"keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string"},"monitors":{"description":"monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"array","items":{"type":"string","default":""}},"pool":{"description":"pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string"},"readOnly":{"description":"readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"boolean"},"secretRef":{"description":"secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"user":{"description":"user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string"}}},"io.k8s.api.core.v1.ResourceFieldSelector":{"description":"ResourceFieldSelector represents container resources (cpu, memory) and their output format","type":"object","required":["resource"],"properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{"description":"Specifies the output format of the exposed resources, defaults to \"1\"","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity"},"resource":{"description":"Required: resource to select","type":"string","default":""}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.ResourceRequirements":{"description":"ResourceRequirements describes the compute resource requirements.","type":"object","properties":{"limits":{"description":"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/","type":"object","additionalProperties":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity"}},"requests":{"description":"Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/","type":"object","additionalProperties":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity"}}}},"io.k8s.api.core.v1.SELinuxOptions":{"description":"SELinuxOptions are the labels to be applied to the container","type":"object","properties":{"level":{"description":"Level is SELinux level label that applies to the container.","type":"string"},"role":{"description":"Role is a SELinux role label that applies to the container.","type":"string"},"type":{"description":"Type is a SELinux type label that applies to the container.","type":"string"},"user":{"description":"User is a SELinux user label that applies to the container.","type":"string"}}},"io.k8s.api.core.v1.ScaleIOVolumeSource":{"description":"ScaleIOVolumeSource represents a persistent ScaleIO volume","type":"object","required":["gateway","system","secretRef"],"properties":{"fsType":{"description":"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".","type":"string"},"gateway":{"description":"gateway is the host address of the ScaleIO API Gateway.","type":"string","default":""},"protectionDomain":{"description":"protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.","type":"string"},"readOnly":{"description":"readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretRef":{"description":"secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"sslEnabled":{"description":"sslEnabled Flag enable/disable SSL communication with Gateway, default false","type":"boolean"},"storageMode":{"description":"storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.","type":"string"},"storagePool":{"description":"storagePool is the ScaleIO Storage Pool associated with the protection domain.","type":"string"},"system":{"description":"system is the name of the storage system as configured in ScaleIO.","type":"string","default":""},"volumeName":{"description":"volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.","type":"string"}}},"io.k8s.api.core.v1.SeccompProfile":{"description":"SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.","type":"object","required":["type"],"properties":{"localhostProfile":{"description":"localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is \"Localhost\".","type":"string"},"type":{"description":"type indicates which kind of seccomp profile will be applied. Valid options are:\n\nLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.\n\n","type":"string","default":""}},"x-kubernetes-unions":[{"discriminator":"type","fields-to-discriminateBy":{"localhostProfile":"LocalhostProfile"}}]},"io.k8s.api.core.v1.SecretEnvSource":{"description":"SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.","type":"object","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret must be defined","type":"boolean"}}},"io.k8s.api.core.v1.SecretKeySelector":{"description":"SecretKeySelector selects a key of a Secret.","type":"object","required":["key"],"properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string","default":""},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.SecretProjection":{"description":"Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.","type":"object","properties":{"items":{"description":"items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.KeyToPath"}},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"optional field specify whether the Secret or its key must be defined","type":"boolean"}}},"io.k8s.api.core.v1.SecretVolumeSource":{"description":"Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.","type":"object","properties":{"defaultMode":{"description":"defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","type":"integer","format":"int32"},"items":{"description":"items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.KeyToPath"}},"optional":{"description":"optional field specify whether the Secret or its keys must be defined","type":"boolean"},"secretName":{"description":"secretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret","type":"string"}}},"io.k8s.api.core.v1.SecurityContext":{"description":"SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.","type":"object","properties":{"allowPrivilegeEscalation":{"description":"AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.","type":"boolean"},"capabilities":{"description":"The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.","$ref":"#/components/schemas/io.k8s.api.core.v1.Capabilities"},"privileged":{"description":"Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.","type":"boolean"},"procMount":{"description":"procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.","type":"string"},"readOnlyRootFilesystem":{"description":"Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.","type":"boolean"},"runAsGroup":{"description":"The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.","type":"integer","format":"int64"},"runAsNonRoot":{"description":"Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","type":"boolean"},"runAsUser":{"description":"The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.","type":"integer","format":"int64"},"seLinuxOptions":{"description":"The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.","$ref":"#/components/schemas/io.k8s.api.core.v1.SELinuxOptions"},"seccompProfile":{"description":"The seccomp options to use by this container. If seccomp options are provided at both the pod \u0026 container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.","$ref":"#/components/schemas/io.k8s.api.core.v1.SeccompProfile"},"windowsOptions":{"description":"The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.","$ref":"#/components/schemas/io.k8s.api.core.v1.WindowsSecurityContextOptions"}}},"io.k8s.api.core.v1.ServiceAccountTokenProjection":{"description":"ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).","type":"object","required":["path"],"properties":{"audience":{"description":"audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.","type":"string"},"expirationSeconds":{"description":"expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.","type":"integer","format":"int64"},"path":{"description":"path is the path relative to the mount point of the file to project the token into.","type":"string","default":""}}},"io.k8s.api.core.v1.StorageOSVolumeSource":{"description":"Represents a StorageOS persistent volume resource.","type":"object","properties":{"fsType":{"description":"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.","type":"string"},"readOnly":{"description":"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretRef":{"description":"secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"volumeName":{"description":"volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.","type":"string"},"volumeNamespace":{"description":"volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.","type":"string"}}},"io.k8s.api.core.v1.Sysctl":{"description":"Sysctl defines a kernel parameter to be set","type":"object","required":["name","value"],"properties":{"name":{"description":"Name of a property to set","type":"string","default":""},"value":{"description":"Value of a property to set","type":"string","default":""}}},"io.k8s.api.core.v1.TCPSocketAction":{"description":"TCPSocketAction describes an action based on opening a socket","type":"object","required":["port"],"properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"description":"Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.util.intstr.IntOrString"}}},"io.k8s.api.core.v1.Toleration":{"description":"The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.","type":"object","properties":{"effect":{"description":"Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.\n\n","type":"string"},"key":{"description":"Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.","type":"string"},"operator":{"description":"Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.\n\n","type":"string"},"tolerationSeconds":{"description":"TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.","type":"integer","format":"int64"},"value":{"description":"Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.","type":"string"}}},"io.k8s.api.core.v1.TopologySpreadConstraint":{"description":"TopologySpreadConstraint specifies how to spread matching pods among the given topology.","type":"object","required":["maxSkew","topologyKey","whenUnsatisfiable"],"properties":{"labelSelector":{"description":"LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"},"maxSkew":{"description":"MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.","type":"integer","format":"int32","default":0},"topologyKey":{"description":"TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each \u003ckey, value\u003e as a \"bucket\", and try to put balanced number of pods into each bucket. It's a required field.","type":"string","default":""},"whenUnsatisfiable":{"description":"WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assignment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.\n\n","type":"string","default":""}}},"io.k8s.api.core.v1.TypedLocalObjectReference":{"description":"TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.","type":"object","required":["kind","name"],"properties":{"apiGroup":{"description":"APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.","type":"string"},"kind":{"description":"Kind is the type of resource being referenced","type":"string","default":""},"name":{"description":"Name is the name of resource being referenced","type":"string","default":""}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.Volume":{"description":"Volume represents a named volume in a pod that may be accessed by any container in the pod.","type":"object","required":["name"],"properties":{"awsElasticBlockStore":{"description":"awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore","$ref":"#/components/schemas/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource"},"azureDisk":{"description":"azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.","$ref":"#/components/schemas/io.k8s.api.core.v1.AzureDiskVolumeSource"},"azureFile":{"description":"azureFile represents an Azure File Service mount on the host and bind mount to the pod.","$ref":"#/components/schemas/io.k8s.api.core.v1.AzureFileVolumeSource"},"cephfs":{"description":"cephFS represents a Ceph FS mount on the host that shares a pod's lifetime","$ref":"#/components/schemas/io.k8s.api.core.v1.CephFSVolumeSource"},"cinder":{"description":"cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","$ref":"#/components/schemas/io.k8s.api.core.v1.CinderVolumeSource"},"configMap":{"description":"configMap represents a configMap that should populate this volume","$ref":"#/components/schemas/io.k8s.api.core.v1.ConfigMapVolumeSource"},"csi":{"description":"csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).","$ref":"#/components/schemas/io.k8s.api.core.v1.CSIVolumeSource"},"downwardAPI":{"description":"downwardAPI represents downward API about the pod that should populate this volume","$ref":"#/components/schemas/io.k8s.api.core.v1.DownwardAPIVolumeSource"},"emptyDir":{"description":"emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir","$ref":"#/components/schemas/io.k8s.api.core.v1.EmptyDirVolumeSource"},"ephemeral":{"description":"ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.","$ref":"#/components/schemas/io.k8s.api.core.v1.EphemeralVolumeSource"},"fc":{"description":"fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.","$ref":"#/components/schemas/io.k8s.api.core.v1.FCVolumeSource"},"flexVolume":{"description":"flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.","$ref":"#/components/schemas/io.k8s.api.core.v1.FlexVolumeSource"},"flocker":{"description":"flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running","$ref":"#/components/schemas/io.k8s.api.core.v1.FlockerVolumeSource"},"gcePersistentDisk":{"description":"gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk","$ref":"#/components/schemas/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource"},"gitRepo":{"description":"gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.","$ref":"#/components/schemas/io.k8s.api.core.v1.GitRepoVolumeSource"},"glusterfs":{"description":"glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md","$ref":"#/components/schemas/io.k8s.api.core.v1.GlusterfsVolumeSource"},"hostPath":{"description":"hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath","$ref":"#/components/schemas/io.k8s.api.core.v1.HostPathVolumeSource"},"iscsi":{"description":"iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md","$ref":"#/components/schemas/io.k8s.api.core.v1.ISCSIVolumeSource"},"name":{"description":"name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string","default":""},"nfs":{"description":"nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","$ref":"#/components/schemas/io.k8s.api.core.v1.NFSVolumeSource"},"persistentVolumeClaim":{"description":"persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims","$ref":"#/components/schemas/io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource"},"photonPersistentDisk":{"description":"photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine","$ref":"#/components/schemas/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource"},"portworxVolume":{"description":"portworxVolume represents a portworx volume attached and mounted on kubelets host machine","$ref":"#/components/schemas/io.k8s.api.core.v1.PortworxVolumeSource"},"projected":{"description":"projected items for all in one resources secrets, configmaps, and downward API","$ref":"#/components/schemas/io.k8s.api.core.v1.ProjectedVolumeSource"},"quobyte":{"description":"quobyte represents a Quobyte mount on the host that shares a pod's lifetime","$ref":"#/components/schemas/io.k8s.api.core.v1.QuobyteVolumeSource"},"rbd":{"description":"rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md","$ref":"#/components/schemas/io.k8s.api.core.v1.RBDVolumeSource"},"scaleIO":{"description":"scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.","$ref":"#/components/schemas/io.k8s.api.core.v1.ScaleIOVolumeSource"},"secret":{"description":"secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret","$ref":"#/components/schemas/io.k8s.api.core.v1.SecretVolumeSource"},"storageos":{"description":"storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.","$ref":"#/components/schemas/io.k8s.api.core.v1.StorageOSVolumeSource"},"vsphereVolume":{"description":"vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine","$ref":"#/components/schemas/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource"}}},"io.k8s.api.core.v1.VolumeDevice":{"description":"volumeDevice describes a mapping of a raw block device within a container.","type":"object","required":["name","devicePath"],"properties":{"devicePath":{"description":"devicePath is the path inside of the container that the device will be mapped to.","type":"string","default":""},"name":{"description":"name must match the name of a persistentVolumeClaim in the pod","type":"string","default":""}}},"io.k8s.api.core.v1.VolumeMount":{"description":"VolumeMount describes a mounting of a Volume within a container.","type":"object","required":["name","mountPath"],"properties":{"mountPath":{"description":"Path within the container at which the volume should be mounted. Must not contain ':'.","type":"string","default":""},"mountPropagation":{"description":"mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.","type":"string"},"name":{"description":"This must match the Name of a Volume.","type":"string","default":""},"readOnly":{"description":"Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.","type":"boolean"},"subPath":{"description":"Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).","type":"string"},"subPathExpr":{"description":"Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.","type":"string"}}},"io.k8s.api.core.v1.VolumeProjection":{"description":"Projection that may be projected along with other supported volume types","type":"object","properties":{"configMap":{"description":"configMap information about the configMap data to project","$ref":"#/components/schemas/io.k8s.api.core.v1.ConfigMapProjection"},"downwardAPI":{"description":"downwardAPI information about the downwardAPI data to project","$ref":"#/components/schemas/io.k8s.api.core.v1.DownwardAPIProjection"},"secret":{"description":"secret information about the secret data to project","$ref":"#/components/schemas/io.k8s.api.core.v1.SecretProjection"},"serviceAccountToken":{"description":"serviceAccountToken is information about the serviceAccountToken data to project","$ref":"#/components/schemas/io.k8s.api.core.v1.ServiceAccountTokenProjection"}}},"io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource":{"description":"Represents a vSphere volume resource.","type":"object","required":["volumePath"],"properties":{"fsType":{"description":"fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.","type":"string"},"storagePolicyID":{"description":"storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.","type":"string"},"storagePolicyName":{"description":"storagePolicyName is the storage Policy Based Management (SPBM) profile name.","type":"string"},"volumePath":{"description":"volumePath is the path that identifies vSphere volume vmdk","type":"string","default":""}}},"io.k8s.api.core.v1.WeightedPodAffinityTerm":{"description":"The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)","type":"object","required":["weight","podAffinityTerm"],"properties":{"podAffinityTerm":{"description":"Required. A pod affinity term, associated with the corresponding weight.","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodAffinityTerm"},"weight":{"description":"weight associated with matching the corresponding podAffinityTerm, in the range 1-100.","type":"integer","format":"int32","default":0}}},"io.k8s.api.core.v1.WindowsSecurityContextOptions":{"description":"WindowsSecurityContextOptions contain Windows-specific options and credentials.","type":"object","properties":{"gmsaCredentialSpec":{"description":"GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.","type":"string"},"gmsaCredentialSpecName":{"description":"GMSACredentialSpecName is the name of the GMSA credential spec to use.","type":"string"},"hostProcess":{"description":"HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.","type":"boolean"},"runAsUserName":{"description":"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","type":"string"}}},"io.k8s.apimachinery.pkg.api.resource.Quantity":{"description":"Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n\u003cquantity\u003e ::= \u003csignedNumber\u003e\u003csuffix\u003e\n (Note that \u003csuffix\u003e may be empty, from the \"\" case in \u003cdecimalSI\u003e.)\n\u003cdigit\u003e ::= 0 | 1 | ... | 9 \u003cdigits\u003e ::= \u003cdigit\u003e | \u003cdigit\u003e\u003cdigits\u003e \u003cnumber\u003e ::= \u003cdigits\u003e | \u003cdigits\u003e.\u003cdigits\u003e | \u003cdigits\u003e. | .\u003cdigits\u003e \u003csign\u003e ::= \"+\" | \"-\" \u003csignedNumber\u003e ::= \u003cnumber\u003e | \u003csign\u003e\u003cnumber\u003e \u003csuffix\u003e ::= \u003cbinarySI\u003e | \u003cdecimalExponent\u003e | \u003cdecimalSI\u003e \u003cbinarySI\u003e ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\u003cdecimalSI\u003e ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\u003cdecimalExponent\u003e ::= \"e\" \u003csignedNumber\u003e | \"E\" \u003csignedNumber\u003e\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.","type":"string"},"io.k8s.apimachinery.pkg.apis.meta.v1.APIResource":{"description":"APIResource specifies the name of a resource and whether it is namespaced.","type":"object","required":["name","singularName","namespaced","kind","verbs"],"properties":{"categories":{"description":"categories is a list of the grouped resources this resource belongs to (e.g. 'all')","type":"array","items":{"type":"string","default":""}},"group":{"description":"group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".","type":"string"},"kind":{"description":"kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')","type":"string","default":""},"name":{"description":"name is the plural name of the resource.","type":"string","default":""},"namespaced":{"description":"namespaced indicates if a resource is namespaced or not.","type":"boolean","default":false},"shortNames":{"description":"shortNames is a list of suggested short names of the resource.","type":"array","items":{"type":"string","default":""}},"singularName":{"description":"singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.","type":"string","default":""},"storageVersionHash":{"description":"The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.","type":"string"},"verbs":{"description":"verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)","type":"array","items":{"type":"string","default":""}},"version":{"description":"version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".","type":"string"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList":{"description":"APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.","type":"object","required":["groupVersion","resources"],"properties":{"apiVersion":{"description":"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources","type":"string"},"groupVersion":{"description":"groupVersion is the group and version this APIResourceList is for.","type":"string","default":""},"kind":{"description":"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"resources":{"description":"resources contains the name of the resources and if they are namespaced.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResource"}}},"x-kubernetes-group-version-kind":[{"group":"","kind":"APIResourceList","version":"v1"}]},"io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions":{"description":"DeleteOptions may be provided when deleting an API object.","type":"object","properties":{"apiVersion":{"description":"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources","type":"string"},"dryRun":{"description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","type":"array","items":{"type":"string","default":""}},"gracePeriodSeconds":{"description":"The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.","type":"integer","format":"int64"},"kind":{"description":"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"orphanDependents":{"description":"Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.","type":"boolean"},"preconditions":{"description":"Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions"},"propagationPolicy":{"description":"Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.","type":"string"}},"x-kubernetes-group-version-kind":[{"group":"","kind":"DeleteOptions","version":"v1"},{"group":"admission.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"admission.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"admissionregistration.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"admissionregistration.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"apiextensions.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"apiextensions.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"apiregistration.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"apiregistration.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"apps","kind":"DeleteOptions","version":"v1"},{"group":"apps","kind":"DeleteOptions","version":"v1beta1"},{"group":"apps","kind":"DeleteOptions","version":"v1beta2"},{"group":"authentication.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"authentication.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"authorization.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"authorization.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"autoscaling","kind":"DeleteOptions","version":"v1"},{"group":"autoscaling","kind":"DeleteOptions","version":"v2"},{"group":"autoscaling","kind":"DeleteOptions","version":"v2beta1"},{"group":"autoscaling","kind":"DeleteOptions","version":"v2beta2"},{"group":"batch","kind":"DeleteOptions","version":"v1"},{"group":"batch","kind":"DeleteOptions","version":"v1beta1"},{"group":"certificates.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"certificates.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"coordination.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"coordination.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"discovery.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"discovery.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"events.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"events.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"extensions","kind":"DeleteOptions","version":"v1beta1"},{"group":"flowcontrol.apiserver.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"flowcontrol.apiserver.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"flowcontrol.apiserver.k8s.io","kind":"DeleteOptions","version":"v1beta2"},{"group":"imagepolicy.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"internal.apiserver.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"networking.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"networking.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"node.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"node.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"node.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"policy","kind":"DeleteOptions","version":"v1"},{"group":"policy","kind":"DeleteOptions","version":"v1beta1"},{"group":"rbac.authorization.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"rbac.authorization.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"rbac.authorization.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"scheduling.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"scheduling.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"scheduling.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"storage.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"storage.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"storage.k8s.io","kind":"DeleteOptions","version":"v1beta1"}]},"io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1":{"description":"FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:\u003cname\u003e', where \u003cname\u003e is the name of a field in a struct, or key in a map 'v:\u003cvalue\u003e', where \u003cvalue\u003e is the exact json formatted value of a list item 'i:\u003cindex\u003e', where \u003cindex\u003e is position of a item in a list 'k:\u003ckeys\u003e', where \u003ckeys\u003e is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff","type":"object"},"io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector":{"description":"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.","type":"object","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement"}},"matchLabels":{"description":"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.","type":"object","additionalProperties":{"type":"string","default":""}}},"x-kubernetes-map-type":"atomic"},"io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","type":"object","required":["key","operator"],"properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string","default":"","x-kubernetes-patch-merge-key":"key","x-kubernetes-patch-strategy":"merge"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string","default":""},"values":{"description":"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.","type":"array","items":{"type":"string","default":""}}}},"io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta":{"description":"ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.","type":"object","properties":{"continue":{"description":"continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.","type":"string"},"remainingItemCount":{"description":"remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.","type":"integer","format":"int64"},"resourceVersion":{"description":"String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"selfLink is DEPRECATED read-only field that is no longer populated by the system.","type":"string"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry":{"description":"ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.","type":"object","properties":{"apiVersion":{"description":"APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.","type":"string"},"fieldsType":{"description":"FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"","type":"string"},"fieldsV1":{"description":"FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1"},"manager":{"description":"Manager is an identifier of the workflow managing these fields.","type":"string"},"operation":{"description":"Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.","type":"string"},"subresource":{"description":"Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.","type":"string"},"time":{"description":"Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta":{"description":"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.","type":"object","properties":{"annotations":{"description":"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations","type":"object","additionalProperties":{"type":"string","default":""}},"clusterName":{"description":"The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.","type":"string"},"creationTimestamp":{"description":"CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"},"deletionGracePeriodSeconds":{"description":"Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.","type":"integer","format":"int64"},"deletionTimestamp":{"description":"DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"},"finalizers":{"description":"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.","type":"array","items":{"type":"string","default":""},"x-kubernetes-patch-strategy":"merge"},"generateName":{"description":"GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency","type":"string"},"generation":{"description":"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.","type":"integer","format":"int64"},"labels":{"description":"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels","type":"object","additionalProperties":{"type":"string","default":""}},"managedFields":{"description":"ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry"}},"name":{"description":"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names","type":"string"},"namespace":{"description":"Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces","type":"string"},"ownerReferences":{"description":"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference"},"x-kubernetes-patch-merge-key":"uid","x-kubernetes-patch-strategy":"merge"},"resourceVersion":{"description":"An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"selfLink is DEPRECATED read-only field that is no longer populated by the system.","type":"string"},"uid":{"description":"UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference":{"description":"OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.","type":"object","required":["apiVersion","kind","name","uid"],"properties":{"apiVersion":{"description":"API version of the referent.","type":"string","default":""},"blockOwnerDeletion":{"description":"If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.","type":"boolean"},"controller":{"description":"If true, this reference points to the managing controller.","type":"boolean"},"kind":{"description":"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string","default":""},"name":{"description":"Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names","type":"string","default":""},"uid":{"description":"UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string","default":""}},"x-kubernetes-map-type":"atomic"},"io.k8s.apimachinery.pkg.apis.meta.v1.Patch":{"description":"Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.","type":"object"},"io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions":{"description":"Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.","type":"object","properties":{"resourceVersion":{"description":"Specifies the target ResourceVersion","type":"string"},"uid":{"description":"Specifies the target UID.","type":"string"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.Status":{"description":"Status is a return value for calls that don't return other objects.","type":"object","properties":{"apiVersion":{"description":"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources","type":"string"},"code":{"description":"Suggested HTTP return code for this status, 0 if not set.","type":"integer","format":"int32"},"details":{"description":"Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails"},"kind":{"description":"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"message":{"description":"A human-readable description of the status of this operation.","type":"string"},"metadata":{"description":"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"},"reason":{"description":"A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.","type":"string"},"status":{"description":"Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","type":"string"}},"x-kubernetes-group-version-kind":[{"group":"","kind":"Status","version":"v1"}]},"io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause":{"description":"StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.","type":"object","properties":{"field":{"description":"The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"","type":"string"},"message":{"description":"A human-readable description of the cause of the error. This field may be presented as-is to a reader.","type":"string"},"reason":{"description":"A machine-readable description of the cause of the error. If this value is empty there is no information available.","type":"string"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails":{"description":"StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.","type":"object","properties":{"causes":{"description":"The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause"}},"group":{"description":"The group attribute of the resource associated with the status StatusReason.","type":"string"},"kind":{"description":"The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"name":{"description":"The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).","type":"string"},"retryAfterSeconds":{"description":"If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.","type":"integer","format":"int32"},"uid":{"description":"UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.Time":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","type":"string","format":"date-time"},"io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent":{"description":"Event represents a single event to a watched resource.","type":"object","required":["type","object"],"properties":{"object":{"description":"Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension"},"type":{"type":"string","default":""}},"x-kubernetes-group-version-kind":[{"group":"","kind":"WatchEvent","version":"v1"},{"group":"admission.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"admission.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"admissionregistration.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"admissionregistration.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"apiextensions.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"apiextensions.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"apiregistration.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"apiregistration.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"apps","kind":"WatchEvent","version":"v1"},{"group":"apps","kind":"WatchEvent","version":"v1beta1"},{"group":"apps","kind":"WatchEvent","version":"v1beta2"},{"group":"authentication.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"authentication.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"authorization.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"authorization.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"autoscaling","kind":"WatchEvent","version":"v1"},{"group":"autoscaling","kind":"WatchEvent","version":"v2"},{"group":"autoscaling","kind":"WatchEvent","version":"v2beta1"},{"group":"autoscaling","kind":"WatchEvent","version":"v2beta2"},{"group":"batch","kind":"WatchEvent","version":"v1"},{"group":"batch","kind":"WatchEvent","version":"v1beta1"},{"group":"certificates.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"certificates.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"coordination.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"coordination.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"discovery.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"discovery.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"events.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"events.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"extensions","kind":"WatchEvent","version":"v1beta1"},{"group":"flowcontrol.apiserver.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"flowcontrol.apiserver.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"flowcontrol.apiserver.k8s.io","kind":"WatchEvent","version":"v1beta2"},{"group":"imagepolicy.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"internal.apiserver.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"networking.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"networking.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"node.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"node.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"node.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"policy","kind":"WatchEvent","version":"v1"},{"group":"policy","kind":"WatchEvent","version":"v1beta1"},{"group":"rbac.authorization.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"rbac.authorization.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"rbac.authorization.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"scheduling.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"scheduling.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"scheduling.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"storage.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"storage.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"storage.k8s.io","kind":"WatchEvent","version":"v1beta1"}]},"io.k8s.apimachinery.pkg.runtime.RawExtension":{"description":"RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)","type":"object"},"io.k8s.apimachinery.pkg.util.intstr.IntOrString":{"description":"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.","type":"string","format":"int-or-string"}}}} \ No newline at end of file diff --git a/discovery/testdata/apis/batch/v1beta1.json b/discovery/testdata/apis/batch/v1beta1.json new file mode 100644 index 000000000..a9088f203 --- /dev/null +++ b/discovery/testdata/apis/batch/v1beta1.json @@ -0,0 +1 @@ +{"openapi":"3.0.0","info":{"title":"Kubernetes","version":"v1.24.0"},"paths":{"/apis/batch/v1beta1/":{"get":{"tags":["batch_v1beta1"],"description":"get available resources","operationId":"getBatchV1beta1APIResources","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList"}}}}}}},"/apis/batch/v1beta1/cronjobs":{"get":{"tags":["batch_v1beta1"],"description":"list or watch objects of kind CronJob","operationId":"listBatchV1beta1CronJobForAllNamespaces","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJobList"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJobList"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJobList"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJobList"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJobList"}}}}}},"parameters":[{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}}]},"/apis/batch/v1beta1/namespaces/{namespace}/cronjobs":{"get":{"tags":["batch_v1beta1"],"description":"list or watch objects of kind CronJob","operationId":"listBatchV1beta1NamespacedCronJob","parameters":[{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}},{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJobList"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJobList"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJobList"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJobList"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJobList"}}}}}},"post":{"tags":["batch_v1beta1"],"description":"create a CronJob","operationId":"createBatchV1beta1NamespacedCronJob","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}}}},"delete":{"tags":["batch_v1beta1"],"description":"delete collection of CronJob","operationId":"deleteBatchV1beta1CollectionNamespacedCronJob","parameters":[{"name":"gracePeriodSeconds","in":"query","description":"The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.","schema":{"type":"integer","uniqueItems":true}},{"name":"orphanDependents","in":"query","description":"Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.","schema":{"type":"boolean","uniqueItems":true}},{"name":"propagationPolicy","in":"query","description":"Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.","schema":{"type":"string","uniqueItems":true}},{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}}}}}},"parameters":[{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}}]},"/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}":{"get":{"tags":["batch_v1beta1"],"description":"read the specified CronJob","operationId":"readBatchV1beta1NamespacedCronJob","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}}}},"put":{"tags":["batch_v1beta1"],"description":"replace the specified CronJob","operationId":"replaceBatchV1beta1NamespacedCronJob","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}}}},"delete":{"tags":["batch_v1beta1"],"description":"delete a CronJob","operationId":"deleteBatchV1beta1NamespacedCronJob","parameters":[{"name":"gracePeriodSeconds","in":"query","description":"The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.","schema":{"type":"integer","uniqueItems":true}},{"name":"orphanDependents","in":"query","description":"Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.","schema":{"type":"boolean","uniqueItems":true}},{"name":"propagationPolicy","in":"query","description":"Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.","schema":{"type":"string","uniqueItems":true}},{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status"}}}}}},"patch":{"tags":["batch_v1beta1"],"description":"partially update the specified CronJob","operationId":"patchBatchV1beta1NamespacedCronJob","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"force","in":"query","description":"Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.","schema":{"type":"boolean","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}}}},"parameters":[{"name":"name","in":"path","description":"name of the CronJob","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}}]},"/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status":{"get":{"tags":["batch_v1beta1"],"description":"read status of the specified CronJob","operationId":"readBatchV1beta1NamespacedCronJobStatus","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}}}},"put":{"tags":["batch_v1beta1"],"description":"replace status of the specified CronJob","operationId":"replaceBatchV1beta1NamespacedCronJobStatus","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}}}},"patch":{"tags":["batch_v1beta1"],"description":"partially update status of the specified CronJob","operationId":"patchBatchV1beta1NamespacedCronJobStatus","parameters":[{"name":"dryRun","in":"query","description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","schema":{"type":"string","uniqueItems":true}},{"name":"force","in":"query","description":"Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.","schema":{"type":"boolean","uniqueItems":true}},{"name":"fieldManager","in":"query","description":"fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).","schema":{"type":"string","uniqueItems":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}}}}}},"parameters":[{"name":"name","in":"path","description":"name of the CronJob","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}}]},"/apis/batch/v1beta1/watch/cronjobs":{"get":{"tags":["batch_v1beta1"],"description":"watch individual changes to a list of CronJob. deprecated: use the 'watch' parameter with a list operation instead.","operationId":"watchBatchV1beta1CronJobListForAllNamespaces","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}}}}}},"parameters":[{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}}]},"/apis/batch/v1beta1/watch/namespaces/{namespace}/cronjobs":{"get":{"tags":["batch_v1beta1"],"description":"watch individual changes to a list of CronJob. deprecated: use the 'watch' parameter with a list operation instead.","operationId":"watchBatchV1beta1NamespacedCronJobList","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}}}}}},"parameters":[{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}}]},"/apis/batch/v1beta1/watch/namespaces/{namespace}/cronjobs/{name}":{"get":{"tags":["batch_v1beta1"],"description":"watch changes to an object of kind CronJob. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.","operationId":"watchBatchV1beta1NamespacedCronJob","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/json;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/vnd.kubernetes.protobuf;stream=watch":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}},"application/yaml":{"schema":{"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent"}}}}}},"parameters":[{"name":"allowWatchBookmarks","in":"query","description":"allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.","schema":{"type":"boolean","uniqueItems":true}},{"name":"continue","in":"query","description":"The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.","schema":{"type":"string","uniqueItems":true}},{"name":"fieldSelector","in":"query","description":"A selector to restrict the list of returned objects by their fields. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"labelSelector","in":"query","description":"A selector to restrict the list of returned objects by their labels. Defaults to everything.","schema":{"type":"string","uniqueItems":true}},{"name":"limit","in":"query","description":"limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.","schema":{"type":"integer","uniqueItems":true}},{"name":"name","in":"path","description":"name of the CronJob","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"namespace","in":"path","description":"object name and auth scope, such as for teams and projects","required":true,"schema":{"type":"string","uniqueItems":true}},{"name":"pretty","in":"query","description":"If 'true', then the output is pretty printed.","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersion","in":"query","description":"resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"resourceVersionMatch","in":"query","description":"resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset","schema":{"type":"string","uniqueItems":true}},{"name":"timeoutSeconds","in":"query","description":"Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.","schema":{"type":"integer","uniqueItems":true}},{"name":"watch","in":"query","description":"Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.","schema":{"type":"boolean","uniqueItems":true}}]}},"components":{"schemas":{"io.k8s.api.batch.v1.JobSpec":{"description":"JobSpec describes how the job execution will look like.","type":"object","required":["template"],"properties":{"activeDeadlineSeconds":{"description":"Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.","type":"integer","format":"int64"},"backoffLimit":{"description":"Specifies the number of retries before marking this job failed. Defaults to 6","type":"integer","format":"int32"},"completionMode":{"description":"CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nThis field is beta-level. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job.","type":"string"},"completions":{"description":"Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/","type":"integer","format":"int32"},"manualSelector":{"description":"manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector","type":"boolean"},"parallelism":{"description":"Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) \u003c .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/","type":"integer","format":"int32"},"selector":{"description":"A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"},"suspend":{"description":"Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.\n\nThis field is beta-level, gated by SuspendJob feature flag (enabled by default).","type":"boolean"},"template":{"description":"Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodTemplateSpec"},"ttlSecondsAfterFinished":{"description":"ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes.","type":"integer","format":"int32"}}},"io.k8s.api.batch.v1beta1.CronJob":{"description":"CronJob represents the configuration of a single cron job.","type":"object","properties":{"apiVersion":{"description":"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources","type":"string"},"kind":{"description":"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"description":"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"},"spec":{"description":"Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJobSpec"},"status":{"description":"Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJobStatus"}},"x-kubernetes-group-version-kind":[{"group":"batch","kind":"CronJob","version":"v1beta1"}]},"io.k8s.api.batch.v1beta1.CronJobList":{"description":"CronJobList is a collection of cron jobs.","type":"object","required":["items"],"properties":{"apiVersion":{"description":"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources","type":"string"},"items":{"description":"items is the list of CronJobs.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.CronJob"}},"kind":{"description":"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"description":"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"}},"x-kubernetes-group-version-kind":[{"group":"batch","kind":"CronJobList","version":"v1beta1"}]},"io.k8s.api.batch.v1beta1.CronJobSpec":{"description":"CronJobSpec describes how the job execution will look like and when it will actually run.","type":"object","required":["schedule","jobTemplate"],"properties":{"concurrencyPolicy":{"description":"Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one","type":"string"},"failedJobsHistoryLimit":{"description":"The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.","type":"integer","format":"int32"},"jobTemplate":{"description":"Specifies the job that will be created when executing a CronJob.","default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1beta1.JobTemplateSpec"},"schedule":{"description":"The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.","type":"string","default":""},"startingDeadlineSeconds":{"description":"Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.","type":"integer","format":"int64"},"successfulJobsHistoryLimit":{"description":"The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.","type":"integer","format":"int32"},"suspend":{"description":"This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.","type":"boolean"}}},"io.k8s.api.batch.v1beta1.CronJobStatus":{"description":"CronJobStatus represents the current state of a cron job.","type":"object","properties":{"active":{"description":"A list of pointers to currently running jobs.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.ObjectReference"},"x-kubernetes-list-type":"atomic"},"lastScheduleTime":{"description":"Information when was the last time the job was successfully scheduled.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"},"lastSuccessfulTime":{"description":"Information when was the last time the job successfully completed.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"}}},"io.k8s.api.batch.v1beta1.JobTemplateSpec":{"description":"JobTemplateSpec describes the data a Job should have when created from a template","type":"object","properties":{"metadata":{"description":"Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"},"spec":{"description":"Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","default":{},"$ref":"#/components/schemas/io.k8s.api.batch.v1.JobSpec"}}},"io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource":{"description":"Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.","type":"object","required":["volumeID"],"properties":{"fsType":{"description":"fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore","type":"string"},"partition":{"description":"partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).","type":"integer","format":"int32"},"readOnly":{"description":"readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore","type":"boolean"},"volumeID":{"description":"volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore","type":"string","default":""}}},"io.k8s.api.core.v1.Affinity":{"description":"Affinity is a group of affinity scheduling rules.","type":"object","properties":{"nodeAffinity":{"description":"Describes node affinity scheduling rules for the pod.","$ref":"#/components/schemas/io.k8s.api.core.v1.NodeAffinity"},"podAffinity":{"description":"Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).","$ref":"#/components/schemas/io.k8s.api.core.v1.PodAffinity"},"podAntiAffinity":{"description":"Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).","$ref":"#/components/schemas/io.k8s.api.core.v1.PodAntiAffinity"}}},"io.k8s.api.core.v1.AzureDiskVolumeSource":{"description":"AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.","type":"object","required":["diskName","diskURI"],"properties":{"cachingMode":{"description":"cachingMode is the Host Caching mode: None, Read Only, Read Write.","type":"string"},"diskName":{"description":"diskName is the Name of the data disk in the blob storage","type":"string","default":""},"diskURI":{"description":"diskURI is the URI of data disk in the blob storage","type":"string","default":""},"fsType":{"description":"fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.","type":"string"},"kind":{"description":"kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared","type":"string"},"readOnly":{"description":"readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"}}},"io.k8s.api.core.v1.AzureFileVolumeSource":{"description":"AzureFile represents an Azure File Service mount on the host and bind mount to the pod.","type":"object","required":["secretName","shareName"],"properties":{"readOnly":{"description":"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretName":{"description":"secretName is the name of secret that contains Azure Storage Account Name and Key","type":"string","default":""},"shareName":{"description":"shareName is the azure share Name","type":"string","default":""}}},"io.k8s.api.core.v1.CSIVolumeSource":{"description":"Represents a source location of a volume to mount, managed by an external CSI driver","type":"object","required":["driver"],"properties":{"driver":{"description":"driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.","type":"string","default":""},"fsType":{"description":"fsType to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.","type":"string"},"nodePublishSecretRef":{"description":"nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"readOnly":{"description":"readOnly specifies a read-only configuration for the volume. Defaults to false (read/write).","type":"boolean"},"volumeAttributes":{"description":"volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.","type":"object","additionalProperties":{"type":"string","default":""}}}},"io.k8s.api.core.v1.Capabilities":{"description":"Adds and removes POSIX capabilities from running containers.","type":"object","properties":{"add":{"description":"Added capabilities","type":"array","items":{"type":"string","default":""}},"drop":{"description":"Removed capabilities","type":"array","items":{"type":"string","default":""}}}},"io.k8s.api.core.v1.CephFSVolumeSource":{"description":"Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.","type":"object","required":["monitors"],"properties":{"monitors":{"description":"monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","type":"array","items":{"type":"string","default":""}},"path":{"description":"path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /","type":"string"},"readOnly":{"description":"readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","type":"boolean"},"secretFile":{"description":"secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","type":"string"},"secretRef":{"description":"secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"user":{"description":"user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","type":"string"}}},"io.k8s.api.core.v1.CinderVolumeSource":{"description":"Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.","type":"object","required":["volumeID"],"properties":{"fsType":{"description":"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","type":"string"},"readOnly":{"description":"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","type":"boolean"},"secretRef":{"description":"secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"volumeID":{"description":"volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","type":"string","default":""}}},"io.k8s.api.core.v1.ConfigMapEnvSource":{"description":"ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.","type":"object","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap must be defined","type":"boolean"}}},"io.k8s.api.core.v1.ConfigMapKeySelector":{"description":"Selects a key from a ConfigMap.","type":"object","required":["key"],"properties":{"key":{"description":"The key to select.","type":"string","default":""},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.ConfigMapProjection":{"description":"Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.","type":"object","properties":{"items":{"description":"items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.KeyToPath"}},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"optional specify whether the ConfigMap or its keys must be defined","type":"boolean"}}},"io.k8s.api.core.v1.ConfigMapVolumeSource":{"description":"Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.","type":"object","properties":{"defaultMode":{"description":"defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","type":"integer","format":"int32"},"items":{"description":"items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.KeyToPath"}},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"optional specify whether the ConfigMap or its keys must be defined","type":"boolean"}}},"io.k8s.api.core.v1.Container":{"description":"A single application container that you want to run within a pod.","type":"object","required":["name"],"properties":{"args":{"description":"Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell","type":"array","items":{"type":"string","default":""}},"command":{"description":"Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell","type":"array","items":{"type":"string","default":""}},"env":{"description":"List of environment variables to set in the container. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.EnvVar"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge"},"envFrom":{"description":"List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.EnvFromSource"}},"image":{"description":"Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.","type":"string"},"imagePullPolicy":{"description":"Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n\n","type":"string"},"lifecycle":{"description":"Actions that the management system should take in response to container lifecycle events. Cannot be updated.","$ref":"#/components/schemas/io.k8s.api.core.v1.Lifecycle"},"livenessProbe":{"description":"Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","$ref":"#/components/schemas/io.k8s.api.core.v1.Probe"},"name":{"description":"Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.","type":"string","default":""},"ports":{"description":"List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.ContainerPort"},"x-kubernetes-list-map-keys":["containerPort","protocol"],"x-kubernetes-list-type":"map","x-kubernetes-patch-merge-key":"containerPort","x-kubernetes-patch-strategy":"merge"},"readinessProbe":{"description":"Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","$ref":"#/components/schemas/io.k8s.api.core.v1.Probe"},"resources":{"description":"Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.ResourceRequirements"},"securityContext":{"description":"SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/","$ref":"#/components/schemas/io.k8s.api.core.v1.SecurityContext"},"startupProbe":{"description":"StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","$ref":"#/components/schemas/io.k8s.api.core.v1.Probe"},"stdin":{"description":"Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.","type":"boolean"},"stdinOnce":{"description":"Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false","type":"boolean"},"terminationMessagePath":{"description":"Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.","type":"string"},"terminationMessagePolicy":{"description":"Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.\n\n","type":"string"},"tty":{"description":"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.","type":"boolean"},"volumeDevices":{"description":"volumeDevices is the list of block devices to be used by the container.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.VolumeDevice"},"x-kubernetes-patch-merge-key":"devicePath","x-kubernetes-patch-strategy":"merge"},"volumeMounts":{"description":"Pod volumes to mount into the container's filesystem. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.VolumeMount"},"x-kubernetes-patch-merge-key":"mountPath","x-kubernetes-patch-strategy":"merge"},"workingDir":{"description":"Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.","type":"string"}}},"io.k8s.api.core.v1.ContainerPort":{"description":"ContainerPort represents a network port in a single container.","type":"object","required":["containerPort"],"properties":{"containerPort":{"description":"Number of port to expose on the pod's IP address. This must be a valid port number, 0 \u003c x \u003c 65536.","type":"integer","format":"int32","default":0},"hostIP":{"description":"What host IP to bind the external port to.","type":"string"},"hostPort":{"description":"Number of port to expose on the host. If specified, this must be a valid port number, 0 \u003c x \u003c 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.","type":"integer","format":"int32"},"name":{"description":"If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.","type":"string"},"protocol":{"description":"Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".\n\n","type":"string","default":"TCP"}}},"io.k8s.api.core.v1.DownwardAPIProjection":{"description":"Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.","type":"object","properties":{"items":{"description":"Items is a list of DownwardAPIVolume file","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.DownwardAPIVolumeFile"}}}},"io.k8s.api.core.v1.DownwardAPIVolumeFile":{"description":"DownwardAPIVolumeFile represents information to create the file containing the pod field","type":"object","required":["path"],"properties":{"fieldRef":{"description":"Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.","$ref":"#/components/schemas/io.k8s.api.core.v1.ObjectFieldSelector"},"mode":{"description":"Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","type":"integer","format":"int32"},"path":{"description":"Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'","type":"string","default":""},"resourceFieldRef":{"description":"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.","$ref":"#/components/schemas/io.k8s.api.core.v1.ResourceFieldSelector"}}},"io.k8s.api.core.v1.DownwardAPIVolumeSource":{"description":"DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.","type":"object","properties":{"defaultMode":{"description":"Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","type":"integer","format":"int32"},"items":{"description":"Items is a list of downward API volume file","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.DownwardAPIVolumeFile"}}}},"io.k8s.api.core.v1.EmptyDirVolumeSource":{"description":"Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.","type":"object","properties":{"medium":{"description":"medium represents what type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir","type":"string"},"sizeLimit":{"description":"sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity"}}},"io.k8s.api.core.v1.EnvFromSource":{"description":"EnvFromSource represents the source of a set of ConfigMaps","type":"object","properties":{"configMapRef":{"description":"The ConfigMap to select from","$ref":"#/components/schemas/io.k8s.api.core.v1.ConfigMapEnvSource"},"prefix":{"description":"An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.","type":"string"},"secretRef":{"description":"The Secret to select from","$ref":"#/components/schemas/io.k8s.api.core.v1.SecretEnvSource"}}},"io.k8s.api.core.v1.EnvVar":{"description":"EnvVar represents an environment variable present in a Container.","type":"object","required":["name"],"properties":{"name":{"description":"Name of the environment variable. Must be a C_IDENTIFIER.","type":"string","default":""},"value":{"description":"Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".","type":"string"},"valueFrom":{"description":"Source for the environment variable's value. Cannot be used if value is not empty.","$ref":"#/components/schemas/io.k8s.api.core.v1.EnvVarSource"}}},"io.k8s.api.core.v1.EnvVarSource":{"description":"EnvVarSource represents a source for the value of an EnvVar.","type":"object","properties":{"configMapKeyRef":{"description":"Selects a key of a ConfigMap.","$ref":"#/components/schemas/io.k8s.api.core.v1.ConfigMapKeySelector"},"fieldRef":{"description":"Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['\u003cKEY\u003e']`, `metadata.annotations['\u003cKEY\u003e']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.","$ref":"#/components/schemas/io.k8s.api.core.v1.ObjectFieldSelector"},"resourceFieldRef":{"description":"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.","$ref":"#/components/schemas/io.k8s.api.core.v1.ResourceFieldSelector"},"secretKeyRef":{"description":"Selects a key of a secret in the pod's namespace","$ref":"#/components/schemas/io.k8s.api.core.v1.SecretKeySelector"}}},"io.k8s.api.core.v1.EphemeralContainer":{"description":"An EphemeralContainer is a temporary container that you may add to an existing Pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a Pod is removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the Pod to exceed its resource allocation.\n\nTo add an ephemeral container, use the ephemeralcontainers subresource of an existing Pod. Ephemeral containers may not be removed or restarted.\n\nThis is a beta feature available on clusters that haven't disabled the EphemeralContainers feature gate.","type":"object","required":["name"],"properties":{"args":{"description":"Arguments to the entrypoint. The image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell","type":"array","items":{"type":"string","default":""}},"command":{"description":"Entrypoint array. Not executed within a shell. The image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell","type":"array","items":{"type":"string","default":""}},"env":{"description":"List of environment variables to set in the container. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.EnvVar"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge"},"envFrom":{"description":"List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.EnvFromSource"}},"image":{"description":"Container image name. More info: https://kubernetes.io/docs/concepts/containers/images","type":"string"},"imagePullPolicy":{"description":"Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n\n","type":"string"},"lifecycle":{"description":"Lifecycle is not allowed for ephemeral containers.","$ref":"#/components/schemas/io.k8s.api.core.v1.Lifecycle"},"livenessProbe":{"description":"Probes are not allowed for ephemeral containers.","$ref":"#/components/schemas/io.k8s.api.core.v1.Probe"},"name":{"description":"Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.","type":"string","default":""},"ports":{"description":"Ports are not allowed for ephemeral containers.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.ContainerPort"},"x-kubernetes-list-map-keys":["containerPort","protocol"],"x-kubernetes-list-type":"map","x-kubernetes-patch-merge-key":"containerPort","x-kubernetes-patch-strategy":"merge"},"readinessProbe":{"description":"Probes are not allowed for ephemeral containers.","$ref":"#/components/schemas/io.k8s.api.core.v1.Probe"},"resources":{"description":"Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.ResourceRequirements"},"securityContext":{"description":"Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.","$ref":"#/components/schemas/io.k8s.api.core.v1.SecurityContext"},"startupProbe":{"description":"Probes are not allowed for ephemeral containers.","$ref":"#/components/schemas/io.k8s.api.core.v1.Probe"},"stdin":{"description":"Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.","type":"boolean"},"stdinOnce":{"description":"Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false","type":"boolean"},"targetContainerName":{"description":"If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container uses the namespaces configured in the Pod spec.\n\nThe container runtime must implement support for this feature. If the runtime does not support namespace targeting then the result of setting this field is undefined.","type":"string"},"terminationMessagePath":{"description":"Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.","type":"string"},"terminationMessagePolicy":{"description":"Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.\n\n","type":"string"},"tty":{"description":"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.","type":"boolean"},"volumeDevices":{"description":"volumeDevices is the list of block devices to be used by the container.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.VolumeDevice"},"x-kubernetes-patch-merge-key":"devicePath","x-kubernetes-patch-strategy":"merge"},"volumeMounts":{"description":"Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.VolumeMount"},"x-kubernetes-patch-merge-key":"mountPath","x-kubernetes-patch-strategy":"merge"},"workingDir":{"description":"Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.","type":"string"}}},"io.k8s.api.core.v1.EphemeralVolumeSource":{"description":"Represents an ephemeral volume that is handled by a normal storage driver.","type":"object","properties":{"volumeClaimTemplate":{"description":"Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `\u003cpod name\u003e-\u003cvolume name\u003e` where `\u003cvolume name\u003e` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.\n\nRequired, must not be nil.","$ref":"#/components/schemas/io.k8s.api.core.v1.PersistentVolumeClaimTemplate"}}},"io.k8s.api.core.v1.ExecAction":{"description":"ExecAction describes a \"run in container\" action.","type":"object","properties":{"command":{"description":"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.","type":"array","items":{"type":"string","default":""}}}},"io.k8s.api.core.v1.FCVolumeSource":{"description":"Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.","type":"object","properties":{"fsType":{"description":"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.","type":"string"},"lun":{"description":"lun is Optional: FC target lun number","type":"integer","format":"int32"},"readOnly":{"description":"readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"targetWWNs":{"description":"targetWWNs is Optional: FC target worldwide names (WWNs)","type":"array","items":{"type":"string","default":""}},"wwids":{"description":"wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.","type":"array","items":{"type":"string","default":""}}}},"io.k8s.api.core.v1.FlexVolumeSource":{"description":"FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.","type":"object","required":["driver"],"properties":{"driver":{"description":"driver is the name of the driver to use for this volume.","type":"string","default":""},"fsType":{"description":"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.","type":"string"},"options":{"description":"options is Optional: this field holds extra command options if any.","type":"object","additionalProperties":{"type":"string","default":""}},"readOnly":{"description":"readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretRef":{"description":"secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"}}},"io.k8s.api.core.v1.FlockerVolumeSource":{"description":"Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.","type":"object","properties":{"datasetName":{"description":"datasetName is Name of the dataset stored as metadata -\u003e name on the dataset for Flocker should be considered as deprecated","type":"string"},"datasetUUID":{"description":"datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset","type":"string"}}},"io.k8s.api.core.v1.GCEPersistentDiskVolumeSource":{"description":"Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.","type":"object","required":["pdName"],"properties":{"fsType":{"description":"fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk","type":"string"},"partition":{"description":"partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk","type":"integer","format":"int32"},"pdName":{"description":"pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk","type":"string","default":""},"readOnly":{"description":"readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk","type":"boolean"}}},"io.k8s.api.core.v1.GRPCAction":{"type":"object","required":["port"],"properties":{"port":{"description":"Port number of the gRPC service. Number must be in the range 1 to 65535.","type":"integer","format":"int32","default":0},"service":{"description":"Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC.","type":"string","default":""}}},"io.k8s.api.core.v1.GitRepoVolumeSource":{"description":"Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.\n\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.","type":"object","required":["repository"],"properties":{"directory":{"description":"directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.","type":"string"},"repository":{"description":"repository is the URL","type":"string","default":""},"revision":{"description":"revision is the commit hash for the specified revision.","type":"string"}}},"io.k8s.api.core.v1.GlusterfsVolumeSource":{"description":"Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.","type":"object","required":["endpoints","path"],"properties":{"endpoints":{"description":"endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"string","default":""},"path":{"description":"path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"string","default":""},"readOnly":{"description":"readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"boolean"}}},"io.k8s.api.core.v1.HTTPGetAction":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","type":"object","required":["port"],"properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.HTTPHeader"}},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"description":"Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.util.intstr.IntOrString"},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.\n\n","type":"string"}}},"io.k8s.api.core.v1.HTTPHeader":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","type":"object","required":["name","value"],"properties":{"name":{"description":"The header field name","type":"string","default":""},"value":{"description":"The header field value","type":"string","default":""}}},"io.k8s.api.core.v1.HostAlias":{"description":"HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.","type":"object","properties":{"hostnames":{"description":"Hostnames for the above IP address.","type":"array","items":{"type":"string","default":""}},"ip":{"description":"IP address of the host file entry.","type":"string"}}},"io.k8s.api.core.v1.HostPathVolumeSource":{"description":"Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.","type":"object","required":["path"],"properties":{"path":{"description":"path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath","type":"string","default":""},"type":{"description":"type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath","type":"string"}}},"io.k8s.api.core.v1.ISCSIVolumeSource":{"description":"Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.","type":"object","required":["targetPortal","iqn","lun"],"properties":{"chapAuthDiscovery":{"description":"chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication","type":"boolean"},"chapAuthSession":{"description":"chapAuthSession defines whether support iSCSI Session CHAP authentication","type":"boolean"},"fsType":{"description":"fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi","type":"string"},"initiatorName":{"description":"initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface \u003ctarget portal\u003e:\u003cvolume name\u003e will be created for the connection.","type":"string"},"iqn":{"description":"iqn is the target iSCSI Qualified Name.","type":"string","default":""},"iscsiInterface":{"description":"iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).","type":"string"},"lun":{"description":"lun represents iSCSI Target Lun number.","type":"integer","format":"int32","default":0},"portals":{"description":"portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).","type":"array","items":{"type":"string","default":""}},"readOnly":{"description":"readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.","type":"boolean"},"secretRef":{"description":"secretRef is the CHAP Secret for iSCSI target and initiator authentication","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"targetPortal":{"description":"targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).","type":"string","default":""}}},"io.k8s.api.core.v1.KeyToPath":{"description":"Maps a string key to a path within a volume.","type":"object","required":["key","path"],"properties":{"key":{"description":"key is the key to project.","type":"string","default":""},"mode":{"description":"mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","type":"integer","format":"int32"},"path":{"description":"path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.","type":"string","default":""}}},"io.k8s.api.core.v1.Lifecycle":{"description":"Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.","type":"object","properties":{"postStart":{"description":"PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks","$ref":"#/components/schemas/io.k8s.api.core.v1.LifecycleHandler"},"preStop":{"description":"PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks","$ref":"#/components/schemas/io.k8s.api.core.v1.LifecycleHandler"}}},"io.k8s.api.core.v1.LifecycleHandler":{"description":"LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified.","type":"object","properties":{"exec":{"description":"Exec specifies the action to take.","$ref":"#/components/schemas/io.k8s.api.core.v1.ExecAction"},"httpGet":{"description":"HTTPGet specifies the http request to perform.","$ref":"#/components/schemas/io.k8s.api.core.v1.HTTPGetAction"},"tcpSocket":{"description":"Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.","$ref":"#/components/schemas/io.k8s.api.core.v1.TCPSocketAction"}}},"io.k8s.api.core.v1.LocalObjectReference":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","type":"object","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.NFSVolumeSource":{"description":"Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.","type":"object","required":["server","path"],"properties":{"path":{"description":"path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","type":"string","default":""},"readOnly":{"description":"readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","type":"boolean"},"server":{"description":"server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","type":"string","default":""}}},"io.k8s.api.core.v1.NodeAffinity":{"description":"Node affinity is a group of node affinity scheduling rules.","type":"object","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PreferredSchedulingTerm"}},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.","$ref":"#/components/schemas/io.k8s.api.core.v1.NodeSelector"}}},"io.k8s.api.core.v1.NodeSelector":{"description":"A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.","type":"object","required":["nodeSelectorTerms"],"properties":{"nodeSelectorTerms":{"description":"Required. A list of node selector terms. The terms are ORed.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.NodeSelectorTerm"}}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.NodeSelectorRequirement":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","type":"object","required":["key","operator"],"properties":{"key":{"description":"The label key that the selector applies to.","type":"string","default":""},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n\n","type":"string","default":""},"values":{"description":"An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.","type":"array","items":{"type":"string","default":""}}}},"io.k8s.api.core.v1.NodeSelectorTerm":{"description":"A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.","type":"object","properties":{"matchExpressions":{"description":"A list of node selector requirements by node's labels.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.NodeSelectorRequirement"}},"matchFields":{"description":"A list of node selector requirements by node's fields.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.NodeSelectorRequirement"}}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.ObjectFieldSelector":{"description":"ObjectFieldSelector selects an APIVersioned field of an object.","type":"object","required":["fieldPath"],"properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string","default":""}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.ObjectReference":{"description":"ObjectReference contains enough information to let you inspect or modify the referred object.","type":"object","properties":{"apiVersion":{"description":"API version of the referent.","type":"string"},"fieldPath":{"description":"If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.","type":"string"},"kind":{"description":"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"namespace":{"description":"Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/","type":"string"},"resourceVersion":{"description":"Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency","type":"string"},"uid":{"description":"UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids","type":"string"}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.PersistentVolumeClaimSpec":{"description":"PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes","type":"object","properties":{"accessModes":{"description":"accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1","type":"array","items":{"type":"string","default":""}},"dataSource":{"description":"dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.","$ref":"#/components/schemas/io.k8s.api.core.v1.TypedLocalObjectReference"},"dataSourceRef":{"description":"dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While DataSource ignores disallowed values (dropping them), DataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n(Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.","$ref":"#/components/schemas/io.k8s.api.core.v1.TypedLocalObjectReference"},"resources":{"description":"resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.ResourceRequirements"},"selector":{"description":"selector is a label query over volumes to consider for binding.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"},"storageClassName":{"description":"storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1","type":"string"},"volumeMode":{"description":"volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.","type":"string"},"volumeName":{"description":"volumeName is the binding reference to the PersistentVolume backing this claim.","type":"string"}}},"io.k8s.api.core.v1.PersistentVolumeClaimTemplate":{"description":"PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.","type":"object","required":["spec"],"properties":{"metadata":{"description":"May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"},"spec":{"description":"The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PersistentVolumeClaimSpec"}}},"io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource":{"description":"PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).","type":"object","required":["claimName"],"properties":{"claimName":{"description":"claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims","type":"string","default":""},"readOnly":{"description":"readOnly Will force the ReadOnly setting in VolumeMounts. Default false.","type":"boolean"}}},"io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource":{"description":"Represents a Photon Controller persistent disk resource.","type":"object","required":["pdID"],"properties":{"fsType":{"description":"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.","type":"string"},"pdID":{"description":"pdID is the ID that identifies Photon Controller persistent disk","type":"string","default":""}}},"io.k8s.api.core.v1.PodAffinity":{"description":"Pod affinity is a group of inter pod affinity scheduling rules.","type":"object","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.WeightedPodAffinityTerm"}},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodAffinityTerm"}}}},"io.k8s.api.core.v1.PodAffinityTerm":{"description":"Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e matches that of any node on which a pod of the set of pods is running","type":"object","required":["topologyKey"],"properties":{"labelSelector":{"description":"A label query over a set of resources, in this case pods.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"},"namespaceSelector":{"description":"A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"},"namespaces":{"description":"namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\"","type":"array","items":{"type":"string","default":""}},"topologyKey":{"description":"This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.","type":"string","default":""}}},"io.k8s.api.core.v1.PodAntiAffinity":{"description":"Pod anti affinity is a group of inter pod anti affinity scheduling rules.","type":"object","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.WeightedPodAffinityTerm"}},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodAffinityTerm"}}}},"io.k8s.api.core.v1.PodDNSConfig":{"description":"PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.","type":"object","properties":{"nameservers":{"description":"A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.","type":"array","items":{"type":"string","default":""}},"options":{"description":"A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodDNSConfigOption"}},"searches":{"description":"A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.","type":"array","items":{"type":"string","default":""}}}},"io.k8s.api.core.v1.PodDNSConfigOption":{"description":"PodDNSConfigOption defines DNS resolver options of a pod.","type":"object","properties":{"name":{"description":"Required.","type":"string"},"value":{"type":"string"}}},"io.k8s.api.core.v1.PodOS":{"description":"PodOS defines the OS parameters of a pod.","type":"object","required":["name"],"properties":{"name":{"description":"Name is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration Clients should expect to handle additional values and treat unrecognized values in this field as os: null","type":"string","default":""}}},"io.k8s.api.core.v1.PodReadinessGate":{"description":"PodReadinessGate contains the reference to a pod condition","type":"object","required":["conditionType"],"properties":{"conditionType":{"description":"ConditionType refers to a condition in the pod's condition list with matching type.\n\n","type":"string","default":""}}},"io.k8s.api.core.v1.PodSecurityContext":{"description":"PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.","type":"object","properties":{"fsGroup":{"description":"A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.","type":"integer","format":"int64"},"fsGroupChangePolicy":{"description":"fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used. Note that this field cannot be set when spec.os.name is windows.","type":"string"},"runAsGroup":{"description":"The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.","type":"integer","format":"int64"},"runAsNonRoot":{"description":"Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","type":"boolean"},"runAsUser":{"description":"The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.","type":"integer","format":"int64"},"seLinuxOptions":{"description":"The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.","$ref":"#/components/schemas/io.k8s.api.core.v1.SELinuxOptions"},"seccompProfile":{"description":"The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.","$ref":"#/components/schemas/io.k8s.api.core.v1.SeccompProfile"},"supplementalGroups":{"description":"A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. Note that this field cannot be set when spec.os.name is windows.","type":"array","items":{"type":"integer","format":"int64","default":0}},"sysctls":{"description":"Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.Sysctl"}},"windowsOptions":{"description":"The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.","$ref":"#/components/schemas/io.k8s.api.core.v1.WindowsSecurityContextOptions"}}},"io.k8s.api.core.v1.PodSpec":{"description":"PodSpec is a description of a pod.","type":"object","required":["containers"],"properties":{"activeDeadlineSeconds":{"description":"Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.","type":"integer","format":"int64"},"affinity":{"description":"If specified, the pod's scheduling constraints","$ref":"#/components/schemas/io.k8s.api.core.v1.Affinity"},"automountServiceAccountToken":{"description":"AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.","type":"boolean"},"containers":{"description":"List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.Container"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge"},"dnsConfig":{"description":"Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.","$ref":"#/components/schemas/io.k8s.api.core.v1.PodDNSConfig"},"dnsPolicy":{"description":"Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.\n\n","type":"string"},"enableServiceLinks":{"description":"EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true.","type":"boolean"},"ephemeralContainers":{"description":"List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is beta-level and available on clusters that haven't disabled the EphemeralContainers feature gate.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.EphemeralContainer"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge"},"hostAliases":{"description":"HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.HostAlias"},"x-kubernetes-patch-merge-key":"ip","x-kubernetes-patch-strategy":"merge"},"hostIPC":{"description":"Use the host's ipc namespace. Optional: Default to false.","type":"boolean"},"hostNetwork":{"description":"Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.","type":"boolean"},"hostPID":{"description":"Use the host's pid namespace. Optional: Default to false.","type":"boolean"},"hostname":{"description":"Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.","type":"string"},"imagePullSecrets":{"description":"ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge"},"initContainers":{"description":"List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.Container"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge"},"nodeName":{"description":"NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.","type":"string"},"nodeSelector":{"description":"NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/","type":"object","additionalProperties":{"type":"string","default":""},"x-kubernetes-map-type":"atomic"},"os":{"description":"Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup This is an alpha field and requires the IdentifyPodOS feature","$ref":"#/components/schemas/io.k8s.api.core.v1.PodOS"},"overhead":{"description":"Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.","type":"object","additionalProperties":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity"}},"preemptionPolicy":{"description":"PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.","type":"string"},"priority":{"description":"The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.","type":"integer","format":"int32"},"priorityClassName":{"description":"If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.","type":"string"},"readinessGates":{"description":"If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodReadinessGate"}},"restartPolicy":{"description":"Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy\n\n","type":"string"},"runtimeClassName":{"description":"RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class This is a beta feature as of Kubernetes v1.14.","type":"string"},"schedulerName":{"description":"If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.","type":"string"},"securityContext":{"description":"SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.","$ref":"#/components/schemas/io.k8s.api.core.v1.PodSecurityContext"},"serviceAccount":{"description":"DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.","type":"string"},"serviceAccountName":{"description":"ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/","type":"string"},"setHostnameAsFQDN":{"description":"If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.","type":"boolean"},"shareProcessNamespace":{"description":"Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.","type":"boolean"},"subdomain":{"description":"If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all.","type":"string"},"terminationGracePeriodSeconds":{"description":"Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.","type":"integer","format":"int64"},"tolerations":{"description":"If specified, the pod's tolerations.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.Toleration"}},"topologySpreadConstraints":{"description":"TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.TopologySpreadConstraint"},"x-kubernetes-list-map-keys":["topologyKey","whenUnsatisfiable"],"x-kubernetes-list-type":"map","x-kubernetes-patch-merge-key":"topologyKey","x-kubernetes-patch-strategy":"merge"},"volumes":{"description":"List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.Volume"},"x-kubernetes-patch-merge-key":"name","x-kubernetes-patch-strategy":"merge,retainKeys"}}},"io.k8s.api.core.v1.PodTemplateSpec":{"description":"PodTemplateSpec describes the data a pod should have when created from a template","type":"object","properties":{"metadata":{"description":"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"},"spec":{"description":"Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodSpec"}}},"io.k8s.api.core.v1.PortworxVolumeSource":{"description":"PortworxVolumeSource represents a Portworx volume resource.","type":"object","required":["volumeID"],"properties":{"fsType":{"description":"fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.","type":"string"},"readOnly":{"description":"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"volumeID":{"description":"volumeID uniquely identifies a Portworx volume","type":"string","default":""}}},"io.k8s.api.core.v1.PreferredSchedulingTerm":{"description":"An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).","type":"object","required":["weight","preference"],"properties":{"preference":{"description":"A node selector term, associated with the corresponding weight.","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.NodeSelectorTerm"},"weight":{"description":"Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.","type":"integer","format":"int32","default":0}}},"io.k8s.api.core.v1.Probe":{"description":"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.","type":"object","properties":{"exec":{"description":"Exec specifies the action to take.","$ref":"#/components/schemas/io.k8s.api.core.v1.ExecAction"},"failureThreshold":{"description":"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.","type":"integer","format":"int32"},"grpc":{"description":"GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate.","$ref":"#/components/schemas/io.k8s.api.core.v1.GRPCAction"},"httpGet":{"description":"HTTPGet specifies the http request to perform.","$ref":"#/components/schemas/io.k8s.api.core.v1.HTTPGetAction"},"initialDelaySeconds":{"description":"Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","type":"integer","format":"int32"},"periodSeconds":{"description":"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.","type":"integer","format":"int32"},"successThreshold":{"description":"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.","type":"integer","format":"int32"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port.","$ref":"#/components/schemas/io.k8s.api.core.v1.TCPSocketAction"},"terminationGracePeriodSeconds":{"description":"Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.","type":"integer","format":"int64"},"timeoutSeconds":{"description":"Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","type":"integer","format":"int32"}}},"io.k8s.api.core.v1.ProjectedVolumeSource":{"description":"Represents a projected volume source","type":"object","properties":{"defaultMode":{"description":"defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","type":"integer","format":"int32"},"sources":{"description":"sources is the list of volume projections","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.VolumeProjection"}}}},"io.k8s.api.core.v1.QuobyteVolumeSource":{"description":"Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.","type":"object","required":["registry","volume"],"properties":{"group":{"description":"group to map volume access to Default is no group","type":"string"},"readOnly":{"description":"readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.","type":"boolean"},"registry":{"description":"registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes","type":"string","default":""},"tenant":{"description":"tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin","type":"string"},"user":{"description":"user to map volume access to Defaults to serivceaccount user","type":"string"},"volume":{"description":"volume is a string that references an already created Quobyte volume by name.","type":"string","default":""}}},"io.k8s.api.core.v1.RBDVolumeSource":{"description":"Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.","type":"object","required":["monitors","image"],"properties":{"fsType":{"description":"fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd","type":"string"},"image":{"description":"image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string","default":""},"keyring":{"description":"keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string"},"monitors":{"description":"monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"array","items":{"type":"string","default":""}},"pool":{"description":"pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string"},"readOnly":{"description":"readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"boolean"},"secretRef":{"description":"secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"user":{"description":"user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string"}}},"io.k8s.api.core.v1.ResourceFieldSelector":{"description":"ResourceFieldSelector represents container resources (cpu, memory) and their output format","type":"object","required":["resource"],"properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{"description":"Specifies the output format of the exposed resources, defaults to \"1\"","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity"},"resource":{"description":"Required: resource to select","type":"string","default":""}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.ResourceRequirements":{"description":"ResourceRequirements describes the compute resource requirements.","type":"object","properties":{"limits":{"description":"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/","type":"object","additionalProperties":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity"}},"requests":{"description":"Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/","type":"object","additionalProperties":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity"}}}},"io.k8s.api.core.v1.SELinuxOptions":{"description":"SELinuxOptions are the labels to be applied to the container","type":"object","properties":{"level":{"description":"Level is SELinux level label that applies to the container.","type":"string"},"role":{"description":"Role is a SELinux role label that applies to the container.","type":"string"},"type":{"description":"Type is a SELinux type label that applies to the container.","type":"string"},"user":{"description":"User is a SELinux user label that applies to the container.","type":"string"}}},"io.k8s.api.core.v1.ScaleIOVolumeSource":{"description":"ScaleIOVolumeSource represents a persistent ScaleIO volume","type":"object","required":["gateway","system","secretRef"],"properties":{"fsType":{"description":"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".","type":"string"},"gateway":{"description":"gateway is the host address of the ScaleIO API Gateway.","type":"string","default":""},"protectionDomain":{"description":"protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.","type":"string"},"readOnly":{"description":"readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretRef":{"description":"secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"sslEnabled":{"description":"sslEnabled Flag enable/disable SSL communication with Gateway, default false","type":"boolean"},"storageMode":{"description":"storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.","type":"string"},"storagePool":{"description":"storagePool is the ScaleIO Storage Pool associated with the protection domain.","type":"string"},"system":{"description":"system is the name of the storage system as configured in ScaleIO.","type":"string","default":""},"volumeName":{"description":"volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.","type":"string"}}},"io.k8s.api.core.v1.SeccompProfile":{"description":"SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.","type":"object","required":["type"],"properties":{"localhostProfile":{"description":"localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is \"Localhost\".","type":"string"},"type":{"description":"type indicates which kind of seccomp profile will be applied. Valid options are:\n\nLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.\n\n","type":"string","default":""}},"x-kubernetes-unions":[{"discriminator":"type","fields-to-discriminateBy":{"localhostProfile":"LocalhostProfile"}}]},"io.k8s.api.core.v1.SecretEnvSource":{"description":"SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.","type":"object","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret must be defined","type":"boolean"}}},"io.k8s.api.core.v1.SecretKeySelector":{"description":"SecretKeySelector selects a key of a Secret.","type":"object","required":["key"],"properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string","default":""},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.SecretProjection":{"description":"Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.","type":"object","properties":{"items":{"description":"items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.KeyToPath"}},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"optional field specify whether the Secret or its key must be defined","type":"boolean"}}},"io.k8s.api.core.v1.SecretVolumeSource":{"description":"Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.","type":"object","properties":{"defaultMode":{"description":"defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","type":"integer","format":"int32"},"items":{"description":"items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.KeyToPath"}},"optional":{"description":"optional field specify whether the Secret or its keys must be defined","type":"boolean"},"secretName":{"description":"secretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret","type":"string"}}},"io.k8s.api.core.v1.SecurityContext":{"description":"SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.","type":"object","properties":{"allowPrivilegeEscalation":{"description":"AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.","type":"boolean"},"capabilities":{"description":"The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.","$ref":"#/components/schemas/io.k8s.api.core.v1.Capabilities"},"privileged":{"description":"Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.","type":"boolean"},"procMount":{"description":"procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.","type":"string"},"readOnlyRootFilesystem":{"description":"Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.","type":"boolean"},"runAsGroup":{"description":"The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.","type":"integer","format":"int64"},"runAsNonRoot":{"description":"Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","type":"boolean"},"runAsUser":{"description":"The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.","type":"integer","format":"int64"},"seLinuxOptions":{"description":"The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.","$ref":"#/components/schemas/io.k8s.api.core.v1.SELinuxOptions"},"seccompProfile":{"description":"The seccomp options to use by this container. If seccomp options are provided at both the pod \u0026 container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.","$ref":"#/components/schemas/io.k8s.api.core.v1.SeccompProfile"},"windowsOptions":{"description":"The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.","$ref":"#/components/schemas/io.k8s.api.core.v1.WindowsSecurityContextOptions"}}},"io.k8s.api.core.v1.ServiceAccountTokenProjection":{"description":"ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).","type":"object","required":["path"],"properties":{"audience":{"description":"audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.","type":"string"},"expirationSeconds":{"description":"expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.","type":"integer","format":"int64"},"path":{"description":"path is the path relative to the mount point of the file to project the token into.","type":"string","default":""}}},"io.k8s.api.core.v1.StorageOSVolumeSource":{"description":"Represents a StorageOS persistent volume resource.","type":"object","properties":{"fsType":{"description":"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.","type":"string"},"readOnly":{"description":"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretRef":{"description":"secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.","$ref":"#/components/schemas/io.k8s.api.core.v1.LocalObjectReference"},"volumeName":{"description":"volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.","type":"string"},"volumeNamespace":{"description":"volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.","type":"string"}}},"io.k8s.api.core.v1.Sysctl":{"description":"Sysctl defines a kernel parameter to be set","type":"object","required":["name","value"],"properties":{"name":{"description":"Name of a property to set","type":"string","default":""},"value":{"description":"Value of a property to set","type":"string","default":""}}},"io.k8s.api.core.v1.TCPSocketAction":{"description":"TCPSocketAction describes an action based on opening a socket","type":"object","required":["port"],"properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"description":"Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.util.intstr.IntOrString"}}},"io.k8s.api.core.v1.Toleration":{"description":"The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.","type":"object","properties":{"effect":{"description":"Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.\n\n","type":"string"},"key":{"description":"Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.","type":"string"},"operator":{"description":"Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.\n\n","type":"string"},"tolerationSeconds":{"description":"TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.","type":"integer","format":"int64"},"value":{"description":"Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.","type":"string"}}},"io.k8s.api.core.v1.TopologySpreadConstraint":{"description":"TopologySpreadConstraint specifies how to spread matching pods among the given topology.","type":"object","required":["maxSkew","topologyKey","whenUnsatisfiable"],"properties":{"labelSelector":{"description":"LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"},"maxSkew":{"description":"MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.","type":"integer","format":"int32","default":0},"topologyKey":{"description":"TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each \u003ckey, value\u003e as a \"bucket\", and try to put balanced number of pods into each bucket. It's a required field.","type":"string","default":""},"whenUnsatisfiable":{"description":"WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assignment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.\n\n","type":"string","default":""}}},"io.k8s.api.core.v1.TypedLocalObjectReference":{"description":"TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.","type":"object","required":["kind","name"],"properties":{"apiGroup":{"description":"APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.","type":"string"},"kind":{"description":"Kind is the type of resource being referenced","type":"string","default":""},"name":{"description":"Name is the name of resource being referenced","type":"string","default":""}},"x-kubernetes-map-type":"atomic"},"io.k8s.api.core.v1.Volume":{"description":"Volume represents a named volume in a pod that may be accessed by any container in the pod.","type":"object","required":["name"],"properties":{"awsElasticBlockStore":{"description":"awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore","$ref":"#/components/schemas/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource"},"azureDisk":{"description":"azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.","$ref":"#/components/schemas/io.k8s.api.core.v1.AzureDiskVolumeSource"},"azureFile":{"description":"azureFile represents an Azure File Service mount on the host and bind mount to the pod.","$ref":"#/components/schemas/io.k8s.api.core.v1.AzureFileVolumeSource"},"cephfs":{"description":"cephFS represents a Ceph FS mount on the host that shares a pod's lifetime","$ref":"#/components/schemas/io.k8s.api.core.v1.CephFSVolumeSource"},"cinder":{"description":"cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","$ref":"#/components/schemas/io.k8s.api.core.v1.CinderVolumeSource"},"configMap":{"description":"configMap represents a configMap that should populate this volume","$ref":"#/components/schemas/io.k8s.api.core.v1.ConfigMapVolumeSource"},"csi":{"description":"csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).","$ref":"#/components/schemas/io.k8s.api.core.v1.CSIVolumeSource"},"downwardAPI":{"description":"downwardAPI represents downward API about the pod that should populate this volume","$ref":"#/components/schemas/io.k8s.api.core.v1.DownwardAPIVolumeSource"},"emptyDir":{"description":"emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir","$ref":"#/components/schemas/io.k8s.api.core.v1.EmptyDirVolumeSource"},"ephemeral":{"description":"ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.","$ref":"#/components/schemas/io.k8s.api.core.v1.EphemeralVolumeSource"},"fc":{"description":"fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.","$ref":"#/components/schemas/io.k8s.api.core.v1.FCVolumeSource"},"flexVolume":{"description":"flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.","$ref":"#/components/schemas/io.k8s.api.core.v1.FlexVolumeSource"},"flocker":{"description":"flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running","$ref":"#/components/schemas/io.k8s.api.core.v1.FlockerVolumeSource"},"gcePersistentDisk":{"description":"gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk","$ref":"#/components/schemas/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource"},"gitRepo":{"description":"gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.","$ref":"#/components/schemas/io.k8s.api.core.v1.GitRepoVolumeSource"},"glusterfs":{"description":"glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md","$ref":"#/components/schemas/io.k8s.api.core.v1.GlusterfsVolumeSource"},"hostPath":{"description":"hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath","$ref":"#/components/schemas/io.k8s.api.core.v1.HostPathVolumeSource"},"iscsi":{"description":"iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md","$ref":"#/components/schemas/io.k8s.api.core.v1.ISCSIVolumeSource"},"name":{"description":"name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string","default":""},"nfs":{"description":"nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","$ref":"#/components/schemas/io.k8s.api.core.v1.NFSVolumeSource"},"persistentVolumeClaim":{"description":"persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims","$ref":"#/components/schemas/io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource"},"photonPersistentDisk":{"description":"photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine","$ref":"#/components/schemas/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource"},"portworxVolume":{"description":"portworxVolume represents a portworx volume attached and mounted on kubelets host machine","$ref":"#/components/schemas/io.k8s.api.core.v1.PortworxVolumeSource"},"projected":{"description":"projected items for all in one resources secrets, configmaps, and downward API","$ref":"#/components/schemas/io.k8s.api.core.v1.ProjectedVolumeSource"},"quobyte":{"description":"quobyte represents a Quobyte mount on the host that shares a pod's lifetime","$ref":"#/components/schemas/io.k8s.api.core.v1.QuobyteVolumeSource"},"rbd":{"description":"rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md","$ref":"#/components/schemas/io.k8s.api.core.v1.RBDVolumeSource"},"scaleIO":{"description":"scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.","$ref":"#/components/schemas/io.k8s.api.core.v1.ScaleIOVolumeSource"},"secret":{"description":"secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret","$ref":"#/components/schemas/io.k8s.api.core.v1.SecretVolumeSource"},"storageos":{"description":"storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.","$ref":"#/components/schemas/io.k8s.api.core.v1.StorageOSVolumeSource"},"vsphereVolume":{"description":"vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine","$ref":"#/components/schemas/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource"}}},"io.k8s.api.core.v1.VolumeDevice":{"description":"volumeDevice describes a mapping of a raw block device within a container.","type":"object","required":["name","devicePath"],"properties":{"devicePath":{"description":"devicePath is the path inside of the container that the device will be mapped to.","type":"string","default":""},"name":{"description":"name must match the name of a persistentVolumeClaim in the pod","type":"string","default":""}}},"io.k8s.api.core.v1.VolumeMount":{"description":"VolumeMount describes a mounting of a Volume within a container.","type":"object","required":["name","mountPath"],"properties":{"mountPath":{"description":"Path within the container at which the volume should be mounted. Must not contain ':'.","type":"string","default":""},"mountPropagation":{"description":"mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.","type":"string"},"name":{"description":"This must match the Name of a Volume.","type":"string","default":""},"readOnly":{"description":"Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.","type":"boolean"},"subPath":{"description":"Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).","type":"string"},"subPathExpr":{"description":"Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.","type":"string"}}},"io.k8s.api.core.v1.VolumeProjection":{"description":"Projection that may be projected along with other supported volume types","type":"object","properties":{"configMap":{"description":"configMap information about the configMap data to project","$ref":"#/components/schemas/io.k8s.api.core.v1.ConfigMapProjection"},"downwardAPI":{"description":"downwardAPI information about the downwardAPI data to project","$ref":"#/components/schemas/io.k8s.api.core.v1.DownwardAPIProjection"},"secret":{"description":"secret information about the secret data to project","$ref":"#/components/schemas/io.k8s.api.core.v1.SecretProjection"},"serviceAccountToken":{"description":"serviceAccountToken is information about the serviceAccountToken data to project","$ref":"#/components/schemas/io.k8s.api.core.v1.ServiceAccountTokenProjection"}}},"io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource":{"description":"Represents a vSphere volume resource.","type":"object","required":["volumePath"],"properties":{"fsType":{"description":"fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.","type":"string"},"storagePolicyID":{"description":"storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.","type":"string"},"storagePolicyName":{"description":"storagePolicyName is the storage Policy Based Management (SPBM) profile name.","type":"string"},"volumePath":{"description":"volumePath is the path that identifies vSphere volume vmdk","type":"string","default":""}}},"io.k8s.api.core.v1.WeightedPodAffinityTerm":{"description":"The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)","type":"object","required":["weight","podAffinityTerm"],"properties":{"podAffinityTerm":{"description":"Required. A pod affinity term, associated with the corresponding weight.","default":{},"$ref":"#/components/schemas/io.k8s.api.core.v1.PodAffinityTerm"},"weight":{"description":"weight associated with matching the corresponding podAffinityTerm, in the range 1-100.","type":"integer","format":"int32","default":0}}},"io.k8s.api.core.v1.WindowsSecurityContextOptions":{"description":"WindowsSecurityContextOptions contain Windows-specific options and credentials.","type":"object","properties":{"gmsaCredentialSpec":{"description":"GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.","type":"string"},"gmsaCredentialSpecName":{"description":"GMSACredentialSpecName is the name of the GMSA credential spec to use.","type":"string"},"hostProcess":{"description":"HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.","type":"boolean"},"runAsUserName":{"description":"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","type":"string"}}},"io.k8s.apimachinery.pkg.api.resource.Quantity":{"description":"Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n\u003cquantity\u003e ::= \u003csignedNumber\u003e\u003csuffix\u003e\n (Note that \u003csuffix\u003e may be empty, from the \"\" case in \u003cdecimalSI\u003e.)\n\u003cdigit\u003e ::= 0 | 1 | ... | 9 \u003cdigits\u003e ::= \u003cdigit\u003e | \u003cdigit\u003e\u003cdigits\u003e \u003cnumber\u003e ::= \u003cdigits\u003e | \u003cdigits\u003e.\u003cdigits\u003e | \u003cdigits\u003e. | .\u003cdigits\u003e \u003csign\u003e ::= \"+\" | \"-\" \u003csignedNumber\u003e ::= \u003cnumber\u003e | \u003csign\u003e\u003cnumber\u003e \u003csuffix\u003e ::= \u003cbinarySI\u003e | \u003cdecimalExponent\u003e | \u003cdecimalSI\u003e \u003cbinarySI\u003e ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\u003cdecimalSI\u003e ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\u003cdecimalExponent\u003e ::= \"e\" \u003csignedNumber\u003e | \"E\" \u003csignedNumber\u003e\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.","type":"string"},"io.k8s.apimachinery.pkg.apis.meta.v1.APIResource":{"description":"APIResource specifies the name of a resource and whether it is namespaced.","type":"object","required":["name","singularName","namespaced","kind","verbs"],"properties":{"categories":{"description":"categories is a list of the grouped resources this resource belongs to (e.g. 'all')","type":"array","items":{"type":"string","default":""}},"group":{"description":"group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".","type":"string"},"kind":{"description":"kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')","type":"string","default":""},"name":{"description":"name is the plural name of the resource.","type":"string","default":""},"namespaced":{"description":"namespaced indicates if a resource is namespaced or not.","type":"boolean","default":false},"shortNames":{"description":"shortNames is a list of suggested short names of the resource.","type":"array","items":{"type":"string","default":""}},"singularName":{"description":"singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.","type":"string","default":""},"storageVersionHash":{"description":"The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.","type":"string"},"verbs":{"description":"verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)","type":"array","items":{"type":"string","default":""}},"version":{"description":"version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".","type":"string"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList":{"description":"APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.","type":"object","required":["groupVersion","resources"],"properties":{"apiVersion":{"description":"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources","type":"string"},"groupVersion":{"description":"groupVersion is the group and version this APIResourceList is for.","type":"string","default":""},"kind":{"description":"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"resources":{"description":"resources contains the name of the resources and if they are namespaced.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResource"}}},"x-kubernetes-group-version-kind":[{"group":"","kind":"APIResourceList","version":"v1"}]},"io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions":{"description":"DeleteOptions may be provided when deleting an API object.","type":"object","properties":{"apiVersion":{"description":"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources","type":"string"},"dryRun":{"description":"When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed","type":"array","items":{"type":"string","default":""}},"gracePeriodSeconds":{"description":"The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.","type":"integer","format":"int64"},"kind":{"description":"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"orphanDependents":{"description":"Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.","type":"boolean"},"preconditions":{"description":"Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions"},"propagationPolicy":{"description":"Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.","type":"string"}},"x-kubernetes-group-version-kind":[{"group":"","kind":"DeleteOptions","version":"v1"},{"group":"admission.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"admission.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"admissionregistration.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"admissionregistration.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"apiextensions.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"apiextensions.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"apiregistration.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"apiregistration.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"apps","kind":"DeleteOptions","version":"v1"},{"group":"apps","kind":"DeleteOptions","version":"v1beta1"},{"group":"apps","kind":"DeleteOptions","version":"v1beta2"},{"group":"authentication.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"authentication.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"authorization.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"authorization.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"autoscaling","kind":"DeleteOptions","version":"v1"},{"group":"autoscaling","kind":"DeleteOptions","version":"v2"},{"group":"autoscaling","kind":"DeleteOptions","version":"v2beta1"},{"group":"autoscaling","kind":"DeleteOptions","version":"v2beta2"},{"group":"batch","kind":"DeleteOptions","version":"v1"},{"group":"batch","kind":"DeleteOptions","version":"v1beta1"},{"group":"certificates.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"certificates.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"coordination.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"coordination.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"discovery.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"discovery.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"events.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"events.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"extensions","kind":"DeleteOptions","version":"v1beta1"},{"group":"flowcontrol.apiserver.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"flowcontrol.apiserver.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"flowcontrol.apiserver.k8s.io","kind":"DeleteOptions","version":"v1beta2"},{"group":"imagepolicy.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"internal.apiserver.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"networking.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"networking.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"node.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"node.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"node.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"policy","kind":"DeleteOptions","version":"v1"},{"group":"policy","kind":"DeleteOptions","version":"v1beta1"},{"group":"rbac.authorization.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"rbac.authorization.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"rbac.authorization.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"scheduling.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"scheduling.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"scheduling.k8s.io","kind":"DeleteOptions","version":"v1beta1"},{"group":"storage.k8s.io","kind":"DeleteOptions","version":"v1"},{"group":"storage.k8s.io","kind":"DeleteOptions","version":"v1alpha1"},{"group":"storage.k8s.io","kind":"DeleteOptions","version":"v1beta1"}]},"io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1":{"description":"FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:\u003cname\u003e', where \u003cname\u003e is the name of a field in a struct, or key in a map 'v:\u003cvalue\u003e', where \u003cvalue\u003e is the exact json formatted value of a list item 'i:\u003cindex\u003e', where \u003cindex\u003e is position of a item in a list 'k:\u003ckeys\u003e', where \u003ckeys\u003e is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff","type":"object"},"io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector":{"description":"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.","type":"object","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement"}},"matchLabels":{"description":"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.","type":"object","additionalProperties":{"type":"string","default":""}}},"x-kubernetes-map-type":"atomic"},"io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","type":"object","required":["key","operator"],"properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string","default":"","x-kubernetes-patch-merge-key":"key","x-kubernetes-patch-strategy":"merge"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string","default":""},"values":{"description":"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.","type":"array","items":{"type":"string","default":""}}}},"io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta":{"description":"ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.","type":"object","properties":{"continue":{"description":"continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.","type":"string"},"remainingItemCount":{"description":"remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.","type":"integer","format":"int64"},"resourceVersion":{"description":"String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"selfLink is DEPRECATED read-only field that is no longer populated by the system.","type":"string"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry":{"description":"ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.","type":"object","properties":{"apiVersion":{"description":"APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.","type":"string"},"fieldsType":{"description":"FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"","type":"string"},"fieldsV1":{"description":"FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1"},"manager":{"description":"Manager is an identifier of the workflow managing these fields.","type":"string"},"operation":{"description":"Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.","type":"string"},"subresource":{"description":"Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.","type":"string"},"time":{"description":"Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta":{"description":"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.","type":"object","properties":{"annotations":{"description":"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations","type":"object","additionalProperties":{"type":"string","default":""}},"clusterName":{"description":"The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.","type":"string"},"creationTimestamp":{"description":"CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"},"deletionGracePeriodSeconds":{"description":"Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.","type":"integer","format":"int64"},"deletionTimestamp":{"description":"DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"},"finalizers":{"description":"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.","type":"array","items":{"type":"string","default":""},"x-kubernetes-patch-strategy":"merge"},"generateName":{"description":"GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency","type":"string"},"generation":{"description":"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.","type":"integer","format":"int64"},"labels":{"description":"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels","type":"object","additionalProperties":{"type":"string","default":""}},"managedFields":{"description":"ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry"}},"name":{"description":"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names","type":"string"},"namespace":{"description":"Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces","type":"string"},"ownerReferences":{"description":"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference"},"x-kubernetes-patch-merge-key":"uid","x-kubernetes-patch-strategy":"merge"},"resourceVersion":{"description":"An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"selfLink is DEPRECATED read-only field that is no longer populated by the system.","type":"string"},"uid":{"description":"UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference":{"description":"OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.","type":"object","required":["apiVersion","kind","name","uid"],"properties":{"apiVersion":{"description":"API version of the referent.","type":"string","default":""},"blockOwnerDeletion":{"description":"If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.","type":"boolean"},"controller":{"description":"If true, this reference points to the managing controller.","type":"boolean"},"kind":{"description":"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string","default":""},"name":{"description":"Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names","type":"string","default":""},"uid":{"description":"UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string","default":""}},"x-kubernetes-map-type":"atomic"},"io.k8s.apimachinery.pkg.apis.meta.v1.Patch":{"description":"Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.","type":"object"},"io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions":{"description":"Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.","type":"object","properties":{"resourceVersion":{"description":"Specifies the target ResourceVersion","type":"string"},"uid":{"description":"Specifies the target UID.","type":"string"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.Status":{"description":"Status is a return value for calls that don't return other objects.","type":"object","properties":{"apiVersion":{"description":"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources","type":"string"},"code":{"description":"Suggested HTTP return code for this status, 0 if not set.","type":"integer","format":"int32"},"details":{"description":"Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.","$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails"},"kind":{"description":"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"message":{"description":"A human-readable description of the status of this operation.","type":"string"},"metadata":{"description":"Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"},"reason":{"description":"A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.","type":"string"},"status":{"description":"Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","type":"string"}},"x-kubernetes-group-version-kind":[{"group":"","kind":"Status","version":"v1"}]},"io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause":{"description":"StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.","type":"object","properties":{"field":{"description":"The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"","type":"string"},"message":{"description":"A human-readable description of the cause of the error. This field may be presented as-is to a reader.","type":"string"},"reason":{"description":"A machine-readable description of the cause of the error. If this value is empty there is no information available.","type":"string"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails":{"description":"StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.","type":"object","properties":{"causes":{"description":"The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.","type":"array","items":{"default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause"}},"group":{"description":"The group attribute of the resource associated with the status StatusReason.","type":"string"},"kind":{"description":"The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds","type":"string"},"name":{"description":"The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).","type":"string"},"retryAfterSeconds":{"description":"If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.","type":"integer","format":"int32"},"uid":{"description":"UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}}},"io.k8s.apimachinery.pkg.apis.meta.v1.Time":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","type":"string","format":"date-time"},"io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent":{"description":"Event represents a single event to a watched resource.","type":"object","required":["type","object"],"properties":{"object":{"description":"Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.","default":{},"$ref":"#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension"},"type":{"type":"string","default":""}},"x-kubernetes-group-version-kind":[{"group":"","kind":"WatchEvent","version":"v1"},{"group":"admission.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"admission.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"admissionregistration.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"admissionregistration.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"apiextensions.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"apiextensions.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"apiregistration.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"apiregistration.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"apps","kind":"WatchEvent","version":"v1"},{"group":"apps","kind":"WatchEvent","version":"v1beta1"},{"group":"apps","kind":"WatchEvent","version":"v1beta2"},{"group":"authentication.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"authentication.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"authorization.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"authorization.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"autoscaling","kind":"WatchEvent","version":"v1"},{"group":"autoscaling","kind":"WatchEvent","version":"v2"},{"group":"autoscaling","kind":"WatchEvent","version":"v2beta1"},{"group":"autoscaling","kind":"WatchEvent","version":"v2beta2"},{"group":"batch","kind":"WatchEvent","version":"v1"},{"group":"batch","kind":"WatchEvent","version":"v1beta1"},{"group":"certificates.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"certificates.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"coordination.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"coordination.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"discovery.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"discovery.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"events.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"events.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"extensions","kind":"WatchEvent","version":"v1beta1"},{"group":"flowcontrol.apiserver.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"flowcontrol.apiserver.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"flowcontrol.apiserver.k8s.io","kind":"WatchEvent","version":"v1beta2"},{"group":"imagepolicy.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"internal.apiserver.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"networking.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"networking.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"node.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"node.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"node.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"policy","kind":"WatchEvent","version":"v1"},{"group":"policy","kind":"WatchEvent","version":"v1beta1"},{"group":"rbac.authorization.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"rbac.authorization.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"rbac.authorization.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"scheduling.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"scheduling.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"scheduling.k8s.io","kind":"WatchEvent","version":"v1beta1"},{"group":"storage.k8s.io","kind":"WatchEvent","version":"v1"},{"group":"storage.k8s.io","kind":"WatchEvent","version":"v1alpha1"},{"group":"storage.k8s.io","kind":"WatchEvent","version":"v1beta1"}]},"io.k8s.apimachinery.pkg.runtime.RawExtension":{"description":"RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)","type":"object"},"io.k8s.apimachinery.pkg.util.intstr.IntOrString":{"description":"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.","type":"string","format":"int-or-string"}}}} \ No newline at end of file diff --git a/go.mod b/go.mod index 25d23361b..793b4c1d9 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220329011000-b0917526c547 - k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.60.1 k8s.io/kube-openapi v0.0.0-20220324211241-9f9c01d62a3a k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -40,6 +40,7 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220329011000-b0917526c547 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index 9a05250b9..9fd480f5a 100644 --- a/go.sum +++ b/go.sum @@ -54,7 +54,9 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= @@ -74,6 +76,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633 h1:H2pdYOb3KQ1/YsqVWoWNLQO+fusocsw354rqGTZtAgw= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -99,8 +102,11 @@ github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTg github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -201,6 +207,7 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= @@ -211,6 +218,7 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d h1:7PxY7LVfSZm7PEeBTyK1rj1gABdCO2mbri6GKO1cMDs= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= @@ -613,10 +621,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220329011000-b0917526c547 h1:jeis0+znnEkhzTrX424mzp+MGnsBZjT0e7p6IgDm6as= -k8s.io/api v0.0.0-20220329011000-b0917526c547/go.mod h1:9dsqcUbHQ0TcKcDbIZizDq/CAc9ZzLsdgUQ0EE1Jqbo= -k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1 h1:VaUIEA4wzN15Ak47QL3NBB4pdwQKe5tCztCLTK+8Fnw= -k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1/go.mod h1:WkN7hnr/sIpKTK8v3BZKqLkdqTMz00TBdMWqE0M0O7Q= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= diff --git a/openapi/cached/client.go b/openapi/cached/client.go new file mode 100644 index 000000000..17f63ed26 --- /dev/null +++ b/openapi/cached/client.go @@ -0,0 +1,54 @@ +/* +Copyright 2017 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. +*/ + +package cached + +import ( + "sync" + + "k8s.io/client-go/openapi" +) + +type client struct { + delegate openapi.Client + + once sync.Once + result map[string]openapi.GroupVersion + err error +} + +func NewClient(other openapi.Client) openapi.Client { + return &client{ + delegate: other, + } +} + +func (c *client) Paths() (map[string]openapi.GroupVersion, error) { + c.once.Do(func() { + uncached, err := c.delegate.Paths() + if err != nil { + c.err = err + return + } + + result := make(map[string]openapi.GroupVersion, len(uncached)) + for k, v := range uncached { + result[k] = newGroupVersion(v) + } + c.result = result + }) + return c.result, c.err +} diff --git a/openapi/cached/groupversion.go b/openapi/cached/groupversion.go new file mode 100644 index 000000000..ba78b048b --- /dev/null +++ b/openapi/cached/groupversion.go @@ -0,0 +1,45 @@ +/* +Copyright 2017 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. +*/ + +package cached + +import ( + "sync" + + openapi_v3 "github.com/google/gnostic/openapiv3" + "k8s.io/client-go/openapi" +) + +type groupversion struct { + delegate openapi.GroupVersion + once sync.Once + doc *openapi_v3.Document + err error +} + +func newGroupVersion(delegate openapi.GroupVersion) *groupversion { + return &groupversion{ + delegate: delegate, + } +} + +func (g *groupversion) Schema() (*openapi_v3.Document, error) { + g.once.Do(func() { + g.doc, g.err = g.delegate.Schema() + }) + + return g.doc, g.err +} diff --git a/openapi/client.go b/openapi/client.go new file mode 100644 index 000000000..7b58762ac --- /dev/null +++ b/openapi/client.go @@ -0,0 +1,64 @@ +/* +Copyright 2017 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. +*/ + +package openapi + +import ( + "context" + "encoding/json" + + "k8s.io/client-go/rest" + "k8s.io/kube-openapi/pkg/handler3" +) + +type Client interface { + Paths() (map[string]GroupVersion, error) +} + +type client struct { + // URL includes the `hash` query param to take advantage of cache busting + restClient rest.Interface +} + +func NewClient(restClient rest.Interface) Client { + return &client{ + restClient: restClient, + } +} + +func (c *client) Paths() (map[string]GroupVersion, error) { + data, err := c.restClient.Get(). + AbsPath("/openapi/v3"). + Do(context.TODO()). + Raw() + + if err != nil { + return nil, err + } + + discoMap := &handler3.OpenAPIV3Discovery{} + err = json.Unmarshal(data, discoMap) + if err != nil { + return nil, err + } + + // Create GroupVersions for each element of the result + result := map[string]GroupVersion{} + for k, v := range discoMap.Paths { + result[k] = newGroupVersion(c, v) + } + return result, nil +} diff --git a/openapi/groupversion.go b/openapi/groupversion.go new file mode 100644 index 000000000..c636ca3c6 --- /dev/null +++ b/openapi/groupversion.go @@ -0,0 +1,61 @@ +/* +Copyright 2017 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. +*/ + +package openapi + +import ( + "context" + + openapi_v3 "github.com/google/gnostic/openapiv3" + "google.golang.org/protobuf/proto" + "k8s.io/kube-openapi/pkg/handler3" +) + +const openAPIV3mimePb = "application/com.github.proto-openapi.spec.v3@v1.0+protobuf" + +type GroupVersion interface { + Schema() (*openapi_v3.Document, error) +} + +type groupversion struct { + client *client + item handler3.OpenAPIV3DiscoveryGroupVersion +} + +func newGroupVersion(client *client, item handler3.OpenAPIV3DiscoveryGroupVersion) *groupversion { + return &groupversion{client: client, item: item} +} + +func (g *groupversion) Schema() (*openapi_v3.Document, error) { + // Check if this GVK is in the discovery map, if it is not, then it is not + // available. No point making the request. + data, err := g.client.restClient.Get(). + RequestURI(g.item.ServerRelativeURL). + SetHeader("Accept", openAPIV3mimePb). + Do(context.TODO()). + Raw() + + if err != nil { + return nil, err + } + + document := &openapi_v3.Document{} + if err := proto.Unmarshal(data, document); err != nil { + return nil, err + } + + return document, nil +} diff --git a/restmapper/discovery_test.go b/restmapper/discovery_test.go index 722d38acb..771d96f72 100644 --- a/restmapper/discovery_test.go +++ b/restmapper/discovery_test.go @@ -27,6 +27,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/version" . "k8s.io/client-go/discovery" + "k8s.io/client-go/openapi" restclient "k8s.io/client-go/rest" "k8s.io/client-go/rest/fake" @@ -417,6 +418,10 @@ func (*fakeFailingDiscovery) OpenAPISchema() (*openapi_v2.Document, error) { panic("implement me") } +func (c *fakeFailingDiscovery) OpenAPIV3() openapi.Client { + panic("implement me") +} + type fakeCachedDiscoveryInterface struct { invalidateCalls int fresh bool @@ -490,6 +495,10 @@ func (c *fakeCachedDiscoveryInterface) OpenAPISchema() (*openapi_v2.Document, er return &openapi_v2.Document{}, nil } +func (c *fakeCachedDiscoveryInterface) OpenAPIV3() openapi.Client { + panic("implement me") +} + var ( aGroup = metav1.APIGroup{ Name: "a", diff --git a/restmapper/shortcut_test.go b/restmapper/shortcut_test.go index fc56ce47f..515565d3a 100644 --- a/restmapper/shortcut_test.go +++ b/restmapper/shortcut_test.go @@ -27,6 +27,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/discovery" + "k8s.io/client-go/openapi" restclient "k8s.io/client-go/rest" "k8s.io/client-go/rest/fake" ) @@ -296,3 +297,7 @@ func (c *fakeDiscoveryClient) ServerVersion() (*version.Info, error) { func (c *fakeDiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { return &openapi_v2.Document{}, nil } + +func (c *fakeDiscoveryClient) OpenAPIV3() openapi.Client { + panic("implement me") +} diff --git a/util/testing/fake_openapi_handler.go b/util/testing/fake_openapi_handler.go new file mode 100644 index 000000000..4682ac9b7 --- /dev/null +++ b/util/testing/fake_openapi_handler.go @@ -0,0 +1,174 @@ +/* +Copyright 2021 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. +*/ + +package testing + +import ( + "encoding/json" + "io/fs" + "io/ioutil" + "net/http" + "net/http/httptest" + "os" + "path/filepath" + "strings" + "sync" + + openapi_v3 "github.com/google/gnostic/openapiv3" + "k8s.io/kube-openapi/pkg/handler3" + "k8s.io/kube-openapi/pkg/spec3" +) + +type FakeOpenAPIServer struct { + HttpServer *httptest.Server + ServedDocuments map[string]*openapi_v3.Document + RequestCounters map[string]int +} + +// Creates a mock OpenAPIV3 server as it would be on a standing kubernetes +// API server. +// +// specsPath - Give a path to some test data organized so that each GroupVersion +// has its own OpenAPI V3 JSON file. +// i.e. apps/v1beta1 is stored in /apps/v1beta1.json +func NewFakeOpenAPIV3Server(specsPath string) (*FakeOpenAPIServer, error) { + mux := &testMux{ + counts: map[string]int{}, + } + server := httptest.NewServer(mux) + + openAPIVersionedService, err := handler3.NewOpenAPIService(nil) + if err != nil { + return nil, err + } + + err = openAPIVersionedService.RegisterOpenAPIV3VersionedService("/openapi/v3", mux) + if err != nil { + return nil, err + } + + grouped := make(map[string][]byte) + var testV3Specs = make(map[string]*openapi_v3.Document) + + addSpec := func(path string) { + file, err := os.Open(path) + if err != nil { + panic(err) + } + + defer file.Close() + vals, err := ioutil.ReadAll(file) + if err != nil { + panic(err) + } + + rel, err := filepath.Rel(specsPath, path) + if err == nil { + grouped[rel[:(len(rel)-len(filepath.Ext(rel)))]] = vals + } + } + + filepath.WalkDir(specsPath, func(path string, d fs.DirEntry, err error) error { + if filepath.Ext(path) != ".json" || d.IsDir() { + return nil + } + + addSpec(path) + return nil + }) + + for gv, jsonSpec := range grouped { + spec := &spec3.OpenAPI{} + err = json.Unmarshal(jsonSpec, spec) + if err != nil { + return nil, err + } + gnosticSpec, err := openapi_v3.ParseDocument(jsonSpec) + if err != nil { + return nil, err + } + testV3Specs[gv] = gnosticSpec + openAPIVersionedService.UpdateGroupVersion(gv, spec) + } + + return &FakeOpenAPIServer{ + HttpServer: server, + ServedDocuments: testV3Specs, + RequestCounters: mux.counts, + }, nil +} + +//////////////////////////////////////////////////////////////////////////////// +// Tiny Test HTTP Mux +//////////////////////////////////////////////////////////////////////////////// +// Implements the mux interface used by handler3 for registering the OpenAPI +// handlers + +type testMux struct { + lock sync.Mutex + prefixMap map[string]http.Handler + pathMap map[string]http.Handler + counts map[string]int +} + +func (t *testMux) Handle(path string, handler http.Handler) { + t.lock.Lock() + defer t.lock.Unlock() + + if t.pathMap == nil { + t.pathMap = make(map[string]http.Handler) + } + t.pathMap[path] = handler +} + +func (t *testMux) HandlePrefix(path string, handler http.Handler) { + t.lock.Lock() + defer t.lock.Unlock() + + if t.prefixMap == nil { + t.prefixMap = make(map[string]http.Handler) + } + t.prefixMap[path] = handler +} + +func (t *testMux) ServeHTTP(w http.ResponseWriter, req *http.Request) { + t.lock.Lock() + defer t.lock.Unlock() + + if t.counts == nil { + t.counts = make(map[string]int) + } + + if val, exists := t.counts[req.URL.Path]; exists { + t.counts[req.URL.Path] = val + 1 + } else { + t.counts[req.URL.Path] = 1 + } + + if handler, ok := t.pathMap[req.URL.Path]; ok { + handler.ServeHTTP(w, req) + return + } + + for k, v := range t.prefixMap { + if strings.HasPrefix(req.URL.Path, k) { + v.ServeHTTP(w, req) + return + } + } + + w.WriteHeader(http.StatusNotFound) +} From 27f72fc0bcf5b3cdaf9d38816e78246374d3f365 Mon Sep 17 00:00:00 2001 From: Alexander Zielenski Date: Mon, 28 Mar 2022 10:07:56 -0700 Subject: [PATCH 093/111] update vendor client-go depends on more of kube-openapi v3 now Kubernetes-commit: bb799d97066bbae4eaacd2ecc2a57f7fd42fa142 --- go.mod | 4 ++++ go.sum | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 793b4c1d9..52bbb6a45 100644 --- a/go.mod +++ b/go.mod @@ -9,8 +9,11 @@ require ( github.com/Azure/go-autorest/autorest v0.11.18 github.com/Azure/go-autorest/autorest/adal v0.9.13 github.com/davecgh/go-spew v1.1.1 + github.com/emicklei/go-restful v2.9.5+incompatible // indirect github.com/evanphx/json-patch v4.12.0+incompatible github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect + github.com/go-openapi/jsonreference v0.19.5 // indirect + github.com/go-openapi/swag v0.19.14 // indirect github.com/gogo/protobuf v1.3.2 github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da github.com/golang/protobuf v1.5.2 @@ -21,6 +24,7 @@ require ( github.com/google/uuid v1.1.2 github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 github.com/imdario/mergo v0.3.5 + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 diff --git a/go.sum b/go.sum index 9fd480f5a..e9b6606aa 100644 --- a/go.sum +++ b/go.sum @@ -76,8 +76,9 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633 h1:H2pdYOb3KQ1/YsqVWoWNLQO+fusocsw354rqGTZtAgw= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -104,10 +105,12 @@ github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -193,6 +196,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -207,8 +212,9 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= @@ -218,8 +224,9 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d h1:7PxY7LVfSZm7PEeBTyK1rj1gABdCO2mbri6GKO1cMDs= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= From 400b1becd379c1b846dd51100f4626440eaba5bc Mon Sep 17 00:00:00 2001 From: Ross Peoples Date: Mon, 28 Mar 2022 14:59:03 -0500 Subject: [PATCH 094/111] make update after timeZone support for CronJob Kubernetes-commit: d26e6cca7255c2c96ba28e8e5550bbc87a7577b9 --- applyconfigurations/batch/v1/cronjobspec.go | 9 +++++++++ applyconfigurations/batch/v1beta1/cronjobspec.go | 9 +++++++++ applyconfigurations/internal/internal.go | 6 ++++++ 3 files changed, 24 insertions(+) diff --git a/applyconfigurations/batch/v1/cronjobspec.go b/applyconfigurations/batch/v1/cronjobspec.go index eaf3ba8e6..22a34dcb6 100644 --- a/applyconfigurations/batch/v1/cronjobspec.go +++ b/applyconfigurations/batch/v1/cronjobspec.go @@ -26,6 +26,7 @@ import ( // with apply. type CronJobSpecApplyConfiguration struct { Schedule *string `json:"schedule,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` ConcurrencyPolicy *v1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` Suspend *bool `json:"suspend,omitempty"` @@ -48,6 +49,14 @@ func (b *CronJobSpecApplyConfiguration) WithSchedule(value string) *CronJobSpecA return b } +// WithTimeZone sets the TimeZone field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TimeZone field is set to the value of the last call. +func (b *CronJobSpecApplyConfiguration) WithTimeZone(value string) *CronJobSpecApplyConfiguration { + b.TimeZone = &value + return b +} + // WithStartingDeadlineSeconds sets the StartingDeadlineSeconds field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StartingDeadlineSeconds field is set to the value of the last call. diff --git a/applyconfigurations/batch/v1beta1/cronjobspec.go b/applyconfigurations/batch/v1beta1/cronjobspec.go index 7ca431b1e..68c0777de 100644 --- a/applyconfigurations/batch/v1beta1/cronjobspec.go +++ b/applyconfigurations/batch/v1beta1/cronjobspec.go @@ -26,6 +26,7 @@ import ( // with apply. type CronJobSpecApplyConfiguration struct { Schedule *string `json:"schedule,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` ConcurrencyPolicy *v1beta1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` Suspend *bool `json:"suspend,omitempty"` @@ -48,6 +49,14 @@ func (b *CronJobSpecApplyConfiguration) WithSchedule(value string) *CronJobSpecA return b } +// WithTimeZone sets the TimeZone field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TimeZone field is set to the value of the last call. +func (b *CronJobSpecApplyConfiguration) WithTimeZone(value string) *CronJobSpecApplyConfiguration { + b.TimeZone = &value + return b +} + // WithStartingDeadlineSeconds sets the StartingDeadlineSeconds field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StartingDeadlineSeconds field is set to the value of the last call. diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index b8458d88f..df8cc0f84 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -2956,6 +2956,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: suspend type: scalar: boolean + - name: timeZone + type: + scalar: string - name: io.k8s.api.batch.v1.CronJobStatus map: fields: @@ -3157,6 +3160,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: suspend type: scalar: boolean + - name: timeZone + type: + scalar: string - name: io.k8s.api.batch.v1beta1.CronJobStatus map: fields: From 92adc4de69c6fe20e9daa14eccc6bb4c7d88610b Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Mon, 28 Mar 2022 17:57:10 -0700 Subject: [PATCH 095/111] Merge pull request #82162 from krmayankk/maxun API: maxUnavailable for StatefulSet Kubernetes-commit: f85ff4b5743d501381c76b94a5bc6197b7766190 --- go.mod | 8 ++++---- go.sum | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index bf6791393..25d23361b 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220327010943-9431395a90d0 - k8s.io/apimachinery v0.0.0-20220327010739-4d8ad187e0a0 + k8s.io/api v0.0.0-20220329011000-b0917526c547 + k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1 k8s.io/klog/v2 v2.60.1 k8s.io/kube-openapi v0.0.0-20220324211241-9f9c01d62a3a k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -40,6 +40,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220327010943-9431395a90d0 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220327010739-4d8ad187e0a0 + k8s.io/api => k8s.io/api v0.0.0-20220329011000-b0917526c547 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1 ) diff --git a/go.sum b/go.sum index 2fed6a598..9a05250b9 100644 --- a/go.sum +++ b/go.sum @@ -613,10 +613,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220327010943-9431395a90d0 h1:X+CjFuKiWUYmXxuNueT2v0YNHDZhiRJ0389k24Fh1cg= -k8s.io/api v0.0.0-20220327010943-9431395a90d0/go.mod h1:OHmmfP+B0EkV7rltm6KDhsy7UJUjc3nPo97jKZwLIkM= -k8s.io/apimachinery v0.0.0-20220327010739-4d8ad187e0a0 h1:vZrBcVfdctsRfR+SUOLUmY4+eU4FOnRIpsx03xNPqJ8= -k8s.io/apimachinery v0.0.0-20220327010739-4d8ad187e0a0/go.mod h1:WkN7hnr/sIpKTK8v3BZKqLkdqTMz00TBdMWqE0M0O7Q= +k8s.io/api v0.0.0-20220329011000-b0917526c547 h1:jeis0+znnEkhzTrX424mzp+MGnsBZjT0e7p6IgDm6as= +k8s.io/api v0.0.0-20220329011000-b0917526c547/go.mod h1:9dsqcUbHQ0TcKcDbIZizDq/CAc9ZzLsdgUQ0EE1Jqbo= +k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1 h1:VaUIEA4wzN15Ak47QL3NBB4pdwQKe5tCztCLTK+8Fnw= +k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1/go.mod h1:WkN7hnr/sIpKTK8v3BZKqLkdqTMz00TBdMWqE0M0O7Q= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From fa08fc21f55f49cfcf5fe9e2801b4b15de9cdf11 Mon Sep 17 00:00:00 2001 From: Alexander Zielenski Date: Mon, 28 Mar 2022 18:40:34 -0700 Subject: [PATCH 096/111] adjust comments Kubernetes-commit: e9fc6c28a202ded0228e8505f5e14f5ec2049a3d --- discovery/cached/disk/cached_discovery.go | 2 +- discovery/fake/discovery.go | 2 +- openapi/groupversion.go | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/discovery/cached/disk/cached_discovery.go b/discovery/cached/disk/cached_discovery.go index 004f00a56..d3082d1e1 100644 --- a/discovery/cached/disk/cached_discovery.go +++ b/discovery/cached/disk/cached_discovery.go @@ -59,7 +59,7 @@ type CachedDiscoveryClient struct { // fresh is true if all used cache files were ours fresh bool - /// + // caching openapi v3 client which wraps the delegate's client openapiClient openapi.Client } diff --git a/discovery/fake/discovery.go b/discovery/fake/discovery.go index 1ec4354e4..2eef5365d 100644 --- a/discovery/fake/discovery.go +++ b/discovery/fake/discovery.go @@ -156,7 +156,7 @@ func (c *FakeDiscovery) OpenAPISchema() (*openapi_v2.Document, error) { } func (c *FakeDiscovery) OpenAPIV3() openapi.Client { - panic("implement me") + panic("unimplemented") } // RESTClient returns a RESTClient that is used to communicate with API server diff --git a/openapi/groupversion.go b/openapi/groupversion.go index c636ca3c6..7c35833b4 100644 --- a/openapi/groupversion.go +++ b/openapi/groupversion.go @@ -40,8 +40,6 @@ func newGroupVersion(client *client, item handler3.OpenAPIV3DiscoveryGroupVersio } func (g *groupversion) Schema() (*openapi_v3.Document, error) { - // Check if this GVK is in the discovery map, if it is not, then it is not - // available. No point making the request. data, err := g.client.restClient.Get(). RequestURI(g.item.ServerRelativeURL). SetHeader("Accept", openAPIV3mimePb). From 94a1081fafd87b15933887de85127ed7e4bb885a Mon Sep 17 00:00:00 2001 From: Ricardo Katz Date: Tue, 29 Mar 2022 05:52:48 -0300 Subject: [PATCH 097/111] Implementation on Network Policy Status (#107963) * Implement status subresource in NetworkPolicy * add NetworkPolicyStatus generated files * Fix comments in netpol status review Kubernetes-commit: 42a12010829962c6e87cee8e4bc217d39d7a8043 --- .../extensions/v1beta1/networkpolicy.go | 11 ++++- .../extensions/v1beta1/networkpolicystatus.go | 48 +++++++++++++++++++ applyconfigurations/internal/internal.go | 30 ++++++++++++ .../networking/v1/networkpolicy.go | 11 ++++- .../networking/v1/networkpolicystatus.go | 48 +++++++++++++++++++ applyconfigurations/utils.go | 4 ++ go.mod | 4 +- go.sum | 4 +- .../v1beta1/fake/fake_networkpolicy.go | 35 ++++++++++++++ .../typed/extensions/v1beta1/networkpolicy.go | 48 +++++++++++++++++++ .../networking/v1/fake/fake_networkpolicy.go | 35 ++++++++++++++ .../typed/networking/v1/networkpolicy.go | 48 +++++++++++++++++++ 12 files changed, 320 insertions(+), 6 deletions(-) create mode 100644 applyconfigurations/extensions/v1beta1/networkpolicystatus.go create mode 100644 applyconfigurations/networking/v1/networkpolicystatus.go diff --git a/applyconfigurations/extensions/v1beta1/networkpolicy.go b/applyconfigurations/extensions/v1beta1/networkpolicy.go index 27ea5d9dd..81c84d2d4 100644 --- a/applyconfigurations/extensions/v1beta1/networkpolicy.go +++ b/applyconfigurations/extensions/v1beta1/networkpolicy.go @@ -32,7 +32,8 @@ import ( type NetworkPolicyApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` + Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` + Status *NetworkPolicyStatusApplyConfiguration `json:"status,omitempty"` } // NetworkPolicy constructs an declarative configuration of the NetworkPolicy type for use with @@ -247,3 +248,11 @@ func (b *NetworkPolicyApplyConfiguration) WithSpec(value *NetworkPolicySpecApply b.Spec = value return b } + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *NetworkPolicyApplyConfiguration) WithStatus(value *NetworkPolicyStatusApplyConfiguration) *NetworkPolicyApplyConfiguration { + b.Status = value + return b +} diff --git a/applyconfigurations/extensions/v1beta1/networkpolicystatus.go b/applyconfigurations/extensions/v1beta1/networkpolicystatus.go new file mode 100644 index 000000000..99c89b09b --- /dev/null +++ b/applyconfigurations/extensions/v1beta1/networkpolicystatus.go @@ -0,0 +1,48 @@ +/* +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 applyconfiguration-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// NetworkPolicyStatusApplyConfiguration represents an declarative configuration of the NetworkPolicyStatus type for use +// with apply. +type NetworkPolicyStatusApplyConfiguration struct { + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// NetworkPolicyStatusApplyConfiguration constructs an declarative configuration of the NetworkPolicyStatus type for use with +// apply. +func NetworkPolicyStatus() *NetworkPolicyStatusApplyConfiguration { + return &NetworkPolicyStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *NetworkPolicyStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *NetworkPolicyStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index 4ae62c215..778fedb37 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -7847,6 +7847,10 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.extensions.v1beta1.NetworkPolicySpec default: {} + - name: status + type: + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyStatus + default: {} - name: io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule map: fields: @@ -7926,6 +7930,17 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: atomic +- name: io.k8s.api.extensions.v1beta1.NetworkPolicyStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type - name: io.k8s.api.extensions.v1beta1.PodSecurityPolicy map: fields: @@ -9395,6 +9410,10 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.networking.v1.NetworkPolicySpec default: {} + - name: status + type: + namedType: io.k8s.api.networking.v1.NetworkPolicyStatus + default: {} - name: io.k8s.api.networking.v1.NetworkPolicyEgressRule map: fields: @@ -9474,6 +9493,17 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: atomic +- name: io.k8s.api.networking.v1.NetworkPolicyStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type - name: io.k8s.api.networking.v1.ServiceBackendPort map: fields: diff --git a/applyconfigurations/networking/v1/networkpolicy.go b/applyconfigurations/networking/v1/networkpolicy.go index 409507310..101510e45 100644 --- a/applyconfigurations/networking/v1/networkpolicy.go +++ b/applyconfigurations/networking/v1/networkpolicy.go @@ -32,7 +32,8 @@ import ( type NetworkPolicyApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` + Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` + Status *NetworkPolicyStatusApplyConfiguration `json:"status,omitempty"` } // NetworkPolicy constructs an declarative configuration of the NetworkPolicy type for use with @@ -247,3 +248,11 @@ func (b *NetworkPolicyApplyConfiguration) WithSpec(value *NetworkPolicySpecApply b.Spec = value return b } + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *NetworkPolicyApplyConfiguration) WithStatus(value *NetworkPolicyStatusApplyConfiguration) *NetworkPolicyApplyConfiguration { + b.Status = value + return b +} diff --git a/applyconfigurations/networking/v1/networkpolicystatus.go b/applyconfigurations/networking/v1/networkpolicystatus.go new file mode 100644 index 000000000..032de18ed --- /dev/null +++ b/applyconfigurations/networking/v1/networkpolicystatus.go @@ -0,0 +1,48 @@ +/* +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 applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// NetworkPolicyStatusApplyConfiguration represents an declarative configuration of the NetworkPolicyStatus type for use +// with apply. +type NetworkPolicyStatusApplyConfiguration struct { + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// NetworkPolicyStatusApplyConfiguration constructs an declarative configuration of the NetworkPolicyStatus type for use with +// apply. +func NetworkPolicyStatus() *NetworkPolicyStatusApplyConfiguration { + return &NetworkPolicyStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *NetworkPolicyStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *NetworkPolicyStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/applyconfigurations/utils.go b/applyconfigurations/utils.go index 1bfd77a53..58eda3694 100644 --- a/applyconfigurations/utils.go +++ b/applyconfigurations/utils.go @@ -953,6 +953,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationsextensionsv1beta1.NetworkPolicyPortApplyConfiguration{} case extensionsv1beta1.SchemeGroupVersion.WithKind("NetworkPolicySpec"): return &applyconfigurationsextensionsv1beta1.NetworkPolicySpecApplyConfiguration{} + case extensionsv1beta1.SchemeGroupVersion.WithKind("NetworkPolicyStatus"): + return &applyconfigurationsextensionsv1beta1.NetworkPolicyStatusApplyConfiguration{} case extensionsv1beta1.SchemeGroupVersion.WithKind("PodSecurityPolicy"): return &applyconfigurationsextensionsv1beta1.PodSecurityPolicyApplyConfiguration{} case extensionsv1beta1.SchemeGroupVersion.WithKind("PodSecurityPolicySpec"): @@ -1191,6 +1193,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationsnetworkingv1.NetworkPolicyPortApplyConfiguration{} case networkingv1.SchemeGroupVersion.WithKind("NetworkPolicySpec"): return &applyconfigurationsnetworkingv1.NetworkPolicySpecApplyConfiguration{} + case networkingv1.SchemeGroupVersion.WithKind("NetworkPolicyStatus"): + return &applyconfigurationsnetworkingv1.NetworkPolicyStatusApplyConfiguration{} case networkingv1.SchemeGroupVersion.WithKind("ServiceBackendPort"): return &applyconfigurationsnetworkingv1.ServiceBackendPortApplyConfiguration{} diff --git a/go.mod b/go.mod index c73db8811..079d16f3c 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220329011000-b0917526c547 + k8s.io/api v0.0.0-20220329085248-f457c96d1ad5 k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1 k8s.io/klog/v2 v2.60.1 k8s.io/kube-openapi v0.0.0-20220324211241-9f9c01d62a3a @@ -44,6 +44,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220329011000-b0917526c547 + k8s.io/api => k8s.io/api v0.0.0-20220329085248-f457c96d1ad5 k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1 ) diff --git a/go.sum b/go.sum index 503f25090..329fc86f7 100644 --- a/go.sum +++ b/go.sum @@ -628,8 +628,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220329011000-b0917526c547 h1:jeis0+znnEkhzTrX424mzp+MGnsBZjT0e7p6IgDm6as= -k8s.io/api v0.0.0-20220329011000-b0917526c547/go.mod h1:9dsqcUbHQ0TcKcDbIZizDq/CAc9ZzLsdgUQ0EE1Jqbo= +k8s.io/api v0.0.0-20220329085248-f457c96d1ad5 h1:TXyh1FXkZDbvc5kgfNe3TIiOZWCmkrp/ZpvHdFEJxWc= +k8s.io/api v0.0.0-20220329085248-f457c96d1ad5/go.mod h1:9dsqcUbHQ0TcKcDbIZizDq/CAc9ZzLsdgUQ0EE1Jqbo= k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1 h1:VaUIEA4wzN15Ak47QL3NBB4pdwQKe5tCztCLTK+8Fnw= k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1/go.mod h1:WkN7hnr/sIpKTK8v3BZKqLkdqTMz00TBdMWqE0M0O7Q= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= diff --git a/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go b/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go index 8faa9e6ce..1ff5d8c99 100644 --- a/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go +++ b/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go @@ -105,6 +105,18 @@ func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *v1beta1 return obj.(*v1beta1.NetworkPolicy), err } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeNetworkPolicies) UpdateStatus(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(networkpoliciesResource, "status", c.ns, networkPolicy), &v1beta1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.NetworkPolicy), err +} + // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. func (c *FakeNetworkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. @@ -153,3 +165,26 @@ func (c *FakeNetworkPolicies) Apply(ctx context.Context, networkPolicy *extensio } return obj.(*v1beta1.NetworkPolicy), err } + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeNetworkPolicies) ApplyStatus(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error) { + if networkPolicy == nil { + return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil") + } + data, err := json.Marshal(networkPolicy) + if err != nil { + return nil, err + } + name := networkPolicy.Name + if name == nil { + return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.NetworkPolicy), err +} diff --git a/kubernetes/typed/extensions/v1beta1/networkpolicy.go b/kubernetes/typed/extensions/v1beta1/networkpolicy.go index 978b26db0..f24099b90 100644 --- a/kubernetes/typed/extensions/v1beta1/networkpolicy.go +++ b/kubernetes/typed/extensions/v1beta1/networkpolicy.go @@ -43,6 +43,7 @@ type NetworkPoliciesGetter interface { type NetworkPolicyInterface interface { Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (*v1beta1.NetworkPolicy, error) Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, error) + UpdateStatus(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, 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.NetworkPolicy, error) @@ -50,6 +51,7 @@ type NetworkPolicyInterface interface { Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.NetworkPolicy, err error) Apply(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error) + ApplyStatus(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error) NetworkPolicyExpansion } @@ -139,6 +141,22 @@ func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.Net return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *networkPolicies) UpdateStatus(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (result *v1beta1.NetworkPolicy, err error) { + result = &v1beta1.NetworkPolicy{} + err = c.client.Put(). + Namespace(c.ns). + Resource("networkpolicies"). + Name(networkPolicy.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(networkPolicy). + Do(ctx). + Into(result) + return +} + // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. func (c *networkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). @@ -206,3 +224,33 @@ func (c *networkPolicies) Apply(ctx context.Context, networkPolicy *extensionsv1 Into(result) return } + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *networkPolicies) ApplyStatus(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error) { + if networkPolicy == nil { + return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(networkPolicy) + if err != nil { + return nil, err + } + + name := networkPolicy.Name + if name == nil { + return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply") + } + + result = &v1beta1.NetworkPolicy{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("networkpolicies"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go b/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go index 88e05ba57..16c10cac0 100644 --- a/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go +++ b/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go @@ -105,6 +105,18 @@ func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *network return obj.(*networkingv1.NetworkPolicy), err } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeNetworkPolicies) UpdateStatus(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy, opts v1.UpdateOptions) (*networkingv1.NetworkPolicy, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(networkpoliciesResource, "status", c.ns, networkPolicy), &networkingv1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.NetworkPolicy), err +} + // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. func (c *FakeNetworkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. @@ -153,3 +165,26 @@ func (c *FakeNetworkPolicies) Apply(ctx context.Context, networkPolicy *applycon } return obj.(*networkingv1.NetworkPolicy), err } + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeNetworkPolicies) ApplyStatus(ctx context.Context, networkPolicy *applyconfigurationsnetworkingv1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *networkingv1.NetworkPolicy, err error) { + if networkPolicy == nil { + return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil") + } + data, err := json.Marshal(networkPolicy) + if err != nil { + return nil, err + } + name := networkPolicy.Name + if name == nil { + return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &networkingv1.NetworkPolicy{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.NetworkPolicy), err +} diff --git a/kubernetes/typed/networking/v1/networkpolicy.go b/kubernetes/typed/networking/v1/networkpolicy.go index d7454ce14..97afd6278 100644 --- a/kubernetes/typed/networking/v1/networkpolicy.go +++ b/kubernetes/typed/networking/v1/networkpolicy.go @@ -43,6 +43,7 @@ type NetworkPoliciesGetter interface { type NetworkPolicyInterface interface { Create(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.CreateOptions) (*v1.NetworkPolicy, error) Update(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (*v1.NetworkPolicy, error) + UpdateStatus(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (*v1.NetworkPolicy, 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.NetworkPolicy, error) @@ -50,6 +51,7 @@ type NetworkPolicyInterface interface { Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkPolicy, err error) Apply(ctx context.Context, networkPolicy *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetworkPolicy, err error) + ApplyStatus(ctx context.Context, networkPolicy *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetworkPolicy, err error) NetworkPolicyExpansion } @@ -139,6 +141,22 @@ func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1.NetworkP return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *networkPolicies) UpdateStatus(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (result *v1.NetworkPolicy, err error) { + result = &v1.NetworkPolicy{} + err = c.client.Put(). + Namespace(c.ns). + Resource("networkpolicies"). + Name(networkPolicy.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(networkPolicy). + Do(ctx). + Into(result) + return +} + // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. func (c *networkPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). @@ -206,3 +224,33 @@ func (c *networkPolicies) Apply(ctx context.Context, networkPolicy *networkingv1 Into(result) return } + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *networkPolicies) ApplyStatus(ctx context.Context, networkPolicy *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetworkPolicy, err error) { + if networkPolicy == nil { + return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(networkPolicy) + if err != nil { + return nil, err + } + + name := networkPolicy.Name + if name == nil { + return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply") + } + + result = &v1.NetworkPolicy{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("networkpolicies"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} From 0c14d0c48569a6f6d3fb8f02de0aa5be85ab6054 Mon Sep 17 00:00:00 2001 From: Shiming Zhang Date: Wed, 30 Mar 2022 02:46:07 +0800 Subject: [PATCH 098/111] Field `status.hostIPs` added for Pod (#101566) * Add FeatureGate PodHostIPs * Add HostIPs field and update PodIPs field * Types conversion * Add dropDisabledStatusFields * Add HostIPs for kubelet * Add fuzzer for PodStatus * Add status.hostIPs in ConvertDownwardAPIFieldLabel * Add status.hostIPs in validEnvDownwardAPIFieldPathExpressions * Downward API support for status.hostIPs * Add DownwardAPI validation for status.hostIPs * Add e2e to check that hostIPs works * Add e2e to check that Downward API works * Regenerate Kubernetes-commit: 61b3c028ba618a939559c39befb546ae5e5fd0b9 --- applyconfigurations/core/v1/hostip.go | 39 ++++++++++++++++++++++++ applyconfigurations/core/v1/podstatus.go | 14 +++++++++ applyconfigurations/internal/internal.go | 12 ++++++++ applyconfigurations/utils.go | 2 ++ go.mod | 8 ++--- go.sum | 8 ++--- 6 files changed, 75 insertions(+), 8 deletions(-) create mode 100644 applyconfigurations/core/v1/hostip.go diff --git a/applyconfigurations/core/v1/hostip.go b/applyconfigurations/core/v1/hostip.go new file mode 100644 index 000000000..c2a42cf74 --- /dev/null +++ b/applyconfigurations/core/v1/hostip.go @@ -0,0 +1,39 @@ +/* +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 applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// HostIPApplyConfiguration represents an declarative configuration of the HostIP type for use +// with apply. +type HostIPApplyConfiguration struct { + IP *string `json:"ip,omitempty"` +} + +// HostIPApplyConfiguration constructs an declarative configuration of the HostIP type for use with +// apply. +func HostIP() *HostIPApplyConfiguration { + return &HostIPApplyConfiguration{} +} + +// WithIP sets the IP field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IP field is set to the value of the last call. +func (b *HostIPApplyConfiguration) WithIP(value string) *HostIPApplyConfiguration { + b.IP = &value + return b +} diff --git a/applyconfigurations/core/v1/podstatus.go b/applyconfigurations/core/v1/podstatus.go index 7ee5b9955..0fbfff3d4 100644 --- a/applyconfigurations/core/v1/podstatus.go +++ b/applyconfigurations/core/v1/podstatus.go @@ -32,6 +32,7 @@ type PodStatusApplyConfiguration struct { Reason *string `json:"reason,omitempty"` NominatedNodeName *string `json:"nominatedNodeName,omitempty"` HostIP *string `json:"hostIP,omitempty"` + HostIPs []HostIPApplyConfiguration `json:"hostIPs,omitempty"` PodIP *string `json:"podIP,omitempty"` PodIPs []PodIPApplyConfiguration `json:"podIPs,omitempty"` StartTime *metav1.Time `json:"startTime,omitempty"` @@ -100,6 +101,19 @@ func (b *PodStatusApplyConfiguration) WithHostIP(value string) *PodStatusApplyCo return b } +// WithHostIPs adds the given value to the HostIPs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the HostIPs field. +func (b *PodStatusApplyConfiguration) WithHostIPs(values ...*HostIPApplyConfiguration) *PodStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithHostIPs") + } + b.HostIPs = append(b.HostIPs, *values[i]) + } + return b +} + // WithPodIP sets the PodIP field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PodIP field is set to the value of the last call. diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index 778fedb37..b8458d88f 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -4623,6 +4623,12 @@ var schemaYAML = typed.YAMLObject(`types: - name: ip type: scalar: string +- name: io.k8s.api.core.v1.HostIP + map: + fields: + - name: ip + type: + scalar: string - name: io.k8s.api.core.v1.HostPathVolumeSource map: fields: @@ -5883,6 +5889,12 @@ var schemaYAML = typed.YAMLObject(`types: - name: hostIP type: scalar: string + - name: hostIPs + type: + list: + elementType: + namedType: io.k8s.api.core.v1.HostIP + elementRelationship: associative - name: initContainerStatuses type: list: diff --git a/applyconfigurations/utils.go b/applyconfigurations/utils.go index 58eda3694..90f3ae711 100644 --- a/applyconfigurations/utils.go +++ b/applyconfigurations/utils.go @@ -611,6 +611,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationscorev1.GRPCActionApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("HostAlias"): return &applyconfigurationscorev1.HostAliasApplyConfiguration{} + case corev1.SchemeGroupVersion.WithKind("HostIP"): + return &applyconfigurationscorev1.HostIPApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("HostPathVolumeSource"): return &applyconfigurationscorev1.HostPathVolumeSourceApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("HTTPGetAction"): diff --git a/go.mod b/go.mod index 079d16f3c..f6c9fb9a5 100644 --- a/go.mod +++ b/go.mod @@ -34,8 +34,8 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220329085248-f457c96d1ad5 - k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1 + k8s.io/api v0.0.0-20220329211022-ed1c913933d7 + k8s.io/apimachinery v0.0.0-20220329130813-31e52c987dc1 k8s.io/klog/v2 v2.60.1 k8s.io/kube-openapi v0.0.0-20220324211241-9f9c01d62a3a k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -44,6 +44,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220329085248-f457c96d1ad5 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1 + k8s.io/api => k8s.io/api v0.0.0-20220329211022-ed1c913933d7 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220329130813-31e52c987dc1 ) diff --git a/go.sum b/go.sum index 329fc86f7..b96522f4b 100644 --- a/go.sum +++ b/go.sum @@ -628,10 +628,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220329085248-f457c96d1ad5 h1:TXyh1FXkZDbvc5kgfNe3TIiOZWCmkrp/ZpvHdFEJxWc= -k8s.io/api v0.0.0-20220329085248-f457c96d1ad5/go.mod h1:9dsqcUbHQ0TcKcDbIZizDq/CAc9ZzLsdgUQ0EE1Jqbo= -k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1 h1:VaUIEA4wzN15Ak47QL3NBB4pdwQKe5tCztCLTK+8Fnw= -k8s.io/apimachinery v0.0.0-20220328200121-3b8fb46ed6f1/go.mod h1:WkN7hnr/sIpKTK8v3BZKqLkdqTMz00TBdMWqE0M0O7Q= +k8s.io/api v0.0.0-20220329211022-ed1c913933d7 h1:jkj8qyruAlbi+qRLYnpM9Cz/llMLfJYiykRF0Xqd0qs= +k8s.io/api v0.0.0-20220329211022-ed1c913933d7/go.mod h1:DtY4NYpJTdEZbyZNYT6OchYvejyTwdm7DK07dMzPcII= +k8s.io/apimachinery v0.0.0-20220329130813-31e52c987dc1 h1:ESix+UawmXFu9oem7ngnHSbufLCiIQrvn9TXHB1x/w4= +k8s.io/apimachinery v0.0.0-20220329130813-31e52c987dc1/go.mod h1:WkN7hnr/sIpKTK8v3BZKqLkdqTMz00TBdMWqE0M0O7Q= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 4fdf361910a9b25e683060359adf6ac95c9b6bbe Mon Sep 17 00:00:00 2001 From: Jefftree Date: Mon, 28 Mar 2022 13:20:46 -0700 Subject: [PATCH 099/111] generated: Update kube-openapi and vendor Kubernetes-commit: 550d6383b5219ac43b8c86cf57807c47b82919aa --- go.mod | 11 ++++++----- go.sum | 8 ++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 38df782ec..bb254bb98 100644 --- a/go.mod +++ b/go.mod @@ -34,16 +34,17 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220330011018-e78ec1453ec9 - k8s.io/apimachinery v0.0.0-20220329130813-31e52c987dc1 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.60.1 - k8s.io/kube-openapi v0.0.0-20220324211241-9f9c01d62a3a + k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 sigs.k8s.io/structured-merge-diff/v4 v4.2.1 sigs.k8s.io/yaml v1.2.0 ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220330011018-e78ec1453ec9 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220329130813-31e52c987dc1 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index 008e59680..8c1598ddf 100644 --- a/go.sum +++ b/go.sum @@ -628,17 +628,13 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220330011018-e78ec1453ec9 h1:bDhkCqowj7oJQXnR4ZxXqWQlH5X+ropghHnAKlhOhnE= -k8s.io/api v0.0.0-20220330011018-e78ec1453ec9/go.mod h1:DtY4NYpJTdEZbyZNYT6OchYvejyTwdm7DK07dMzPcII= -k8s.io/apimachinery v0.0.0-20220329130813-31e52c987dc1 h1:ESix+UawmXFu9oem7ngnHSbufLCiIQrvn9TXHB1x/w4= -k8s.io/apimachinery v0.0.0-20220329130813-31e52c987dc1/go.mod h1:WkN7hnr/sIpKTK8v3BZKqLkdqTMz00TBdMWqE0M0O7Q= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20220324211241-9f9c01d62a3a h1:91uLlZzSWSkvb1xuJeHwRMTMLHRHXz7eXPNuKxXJb+0= -k8s.io/kube-openapi v0.0.0-20220324211241-9f9c01d62a3a/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= +k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= +k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From 01ab7fb2112e5ba7a0b2fab65cb493b303bf2fbb Mon Sep 17 00:00:00 2001 From: Abu Kashem Date: Mon, 28 Mar 2022 20:40:49 -0400 Subject: [PATCH 100/111] client-go: reset request body after response is read and closed This commit refactors the retry logic to include resetting the request body. The reset logic will be called iff it is not the first attempt. This refactor is nescessary mainly because now as per the retry logic, we always ensure that the request body is reset *after* the response body is *fully* read and closed in order to reuse the same TCP connection. Previously, the reset of the request body and the call to read and close the response body were not in the right order, which leads to race conditions. This commit also adds a test that verifies the order in which the function calls are made to ensure that we seek only after the response body is closed. Co-authored-by: Madhav Jivrajani Kubernetes-commit: 68c8c458ee8f6629eef806c48c1a776dedad3ec4 --- rest/request.go | 25 ++++----- rest/request_test.go | 127 ++++++++++++++++++++++++++++++++++++++++--- rest/with_retry.go | 53 +++++++----------- 3 files changed, 150 insertions(+), 55 deletions(-) diff --git a/rest/request.go b/rest/request.go index e39b6b9dc..ab9348d9c 100644 --- a/rest/request.go +++ b/rest/request.go @@ -614,15 +614,14 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { } url := r.URL().String() for { - req, err := r.newHTTPRequest(ctx) - if err != nil { - return nil, err - } - if err := r.retry.Before(ctx, r); err != nil { return nil, r.retry.WrapPreviousError(err) } + req, err := r.newHTTPRequest(ctx) + if err != nil { + return nil, err + } resp, err := client.Do(req) updateURLMetrics(ctx, r, resp, err) r.retry.After(ctx, r, resp, err) @@ -722,6 +721,10 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { url := r.URL().String() for { + if err := r.retry.Before(ctx, r); err != nil { + return nil, err + } + req, err := r.newHTTPRequest(ctx) if err != nil { return nil, err @@ -729,11 +732,6 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { if r.body != nil { req.Body = ioutil.NopCloser(r.body) } - - if err := r.retry.Before(ctx, r); err != nil { - return nil, err - } - resp, err := client.Do(req) updateURLMetrics(ctx, r, resp, err) r.retry.After(ctx, r, resp, err) @@ -859,14 +857,13 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp // Right now we make about ten retry attempts if we get a Retry-After response. for { + if err := r.retry.Before(ctx, r); err != nil { + return r.retry.WrapPreviousError(err) + } req, err := r.newHTTPRequest(ctx) if err != nil { return err } - - if err := r.retry.Before(ctx, r); err != nil { - return r.retry.WrapPreviousError(err) - } resp, err := client.Do(req) updateURLMetrics(ctx, r, resp, err) // The value -1 or a value of 0 with a non-nil Body indicates that the length is unknown. diff --git a/rest/request_test.go b/rest/request_test.go index b94288575..8c3c65082 100644 --- a/rest/request_test.go +++ b/rest/request_test.go @@ -938,7 +938,7 @@ func TestRequestWatch(t *testing.T) { }, Err: true, ErrFn: func(err error) bool { - return apierrors.IsInternalError(err) + return !apierrors.IsInternalError(err) && strings.Contains(err.Error(), "failed to reset the request body while retrying a request: EOF") }, }, { @@ -954,7 +954,10 @@ func TestRequestWatch(t *testing.T) { serverReturns: []responseErr{ {response: nil, err: io.EOF}, }, - Empty: true, + Err: true, + ErrFn: func(err error) bool { + return !apierrors.IsInternalError(err) + }, }, { name: "max retries 2, server always returns a response with Retry-After header", @@ -1130,7 +1133,7 @@ func TestRequestStream(t *testing.T) { }, Err: true, ErrFn: func(err error) bool { - return apierrors.IsInternalError(err) + return !apierrors.IsInternalError(err) && strings.Contains(err.Error(), "failed to reset the request body while retrying a request: EOF") }, }, { @@ -1371,8 +1374,6 @@ func (b *testBackoffManager) Sleep(d time.Duration) { } func TestCheckRetryClosesBody(t *testing.T) { - // unblock CI until http://issue.k8s.io/108906 is resolved in 1.24 - t.Skip("http://issue.k8s.io/108906") count := 0 ch := make(chan struct{}) testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { @@ -2435,6 +2436,7 @@ func TestRequestWithRetry(t *testing.T) { body io.Reader serverReturns responseErr errExpected error + errContains string transformFuncInvokedExpected int roundTripInvokedExpected int }{ @@ -2451,7 +2453,7 @@ func TestRequestWithRetry(t *testing.T) { body: &readSeeker{err: io.EOF}, serverReturns: responseErr{response: retryAfterResponse(), err: nil}, errExpected: nil, - transformFuncInvokedExpected: 1, + transformFuncInvokedExpected: 0, roundTripInvokedExpected: 1, }, { @@ -2474,7 +2476,7 @@ func TestRequestWithRetry(t *testing.T) { name: "server returns retryable err, request body Seek returns error, retry aborted", body: &readSeeker{err: io.EOF}, serverReturns: responseErr{response: nil, err: io.ErrUnexpectedEOF}, - errExpected: io.ErrUnexpectedEOF, + errContains: "failed to reset the request body while retrying a request: EOF", transformFuncInvokedExpected: 0, roundTripInvokedExpected: 1, }, @@ -2517,8 +2519,15 @@ func TestRequestWithRetry(t *testing.T) { if test.transformFuncInvokedExpected != transformFuncInvoked { t.Errorf("Expected transform func to be invoked %d times, but got: %d", test.transformFuncInvokedExpected, transformFuncInvoked) } - if test.errExpected != unWrap(err) { - t.Errorf("Expected error: %v, but got: %v", test.errExpected, unWrap(err)) + switch { + case test.errExpected != nil: + if test.errExpected != unWrap(err) { + t.Errorf("Expected error: %v, but got: %v", test.errExpected, unWrap(err)) + } + case len(test.errContains) > 0: + if !strings.Contains(err.Error(), test.errContains) { + t.Errorf("Expected error message to caontain: %q, but got: %q", test.errContains, err.Error()) + } } }) } @@ -3531,3 +3540,103 @@ func TestTransportConcurrency(t *testing.T) { }) } } + +// TODO: see if we can consolidate the other trackers into one. +type requestBodyTracker struct { + io.ReadSeeker + f func(string) +} + +func (t *requestBodyTracker) Read(p []byte) (int, error) { + t.f("Request.Body.Read") + return t.ReadSeeker.Read(p) +} + +func (t *requestBodyTracker) Seek(offset int64, whence int) (int64, error) { + t.f("Request.Body.Seek") + return t.ReadSeeker.Seek(offset, whence) +} + +type responseBodyTracker struct { + io.ReadCloser + f func(string) +} + +func (t *responseBodyTracker) Read(p []byte) (int, error) { + t.f("Response.Body.Read") + return t.ReadCloser.Read(p) +} + +func (t *responseBodyTracker) Close() error { + t.f("Response.Body.Close") + return t.ReadCloser.Close() +} + +type recorder struct { + order []string +} + +func (r *recorder) record(call string) { + r.order = append(r.order, call) +} + +func TestRequestBodyResetOrder(t *testing.T) { + recorder := &recorder{} + respBodyTracker := &responseBodyTracker{ + ReadCloser: nil, // the server will fill it + f: recorder.record, + } + + var attempts int + client := clientForFunc(func(req *http.Request) (*http.Response, error) { + defer func() { + attempts++ + }() + + // read the request body. + ioutil.ReadAll(req.Body) + + // first attempt, we send a retry-after + if attempts == 0 { + resp := retryAfterResponse() + respBodyTracker.ReadCloser = ioutil.NopCloser(bytes.NewReader([]byte{})) + resp.Body = respBodyTracker + return resp, nil + } + + return &http.Response{StatusCode: http.StatusOK}, nil + }) + + reqBodyTracker := &requestBodyTracker{ + ReadSeeker: bytes.NewReader([]byte{}), // empty body ensures one Read operation at most. + f: recorder.record, + } + req := &Request{ + verb: "POST", + body: reqBodyTracker, + c: &RESTClient{ + content: defaultContentConfig(), + Client: client, + }, + backoff: &noSleepBackOff{}, + retry: &withRetry{maxRetries: 1}, + } + + req.Do(context.Background()) + + expected := []string{ + // 1st attempt: the server handler reads the request body + "Request.Body.Read", + // the server sends a retry-after, client reads the + // response body, and closes it + "Response.Body.Read", + "Response.Body.Close", + // client retry logic seeks to the beginning of the request body + "Request.Body.Seek", + // 2nd attempt: the server reads the request body + "Request.Body.Read", + } + if !reflect.DeepEqual(expected, recorder.order) { + t.Errorf("Expected invocation request and response body operations for retry do not match: %s", cmp.Diff(expected, recorder.order)) + } +} diff --git a/rest/with_retry.go b/rest/with_retry.go index e729ad1ec..3082959d1 100644 --- a/rest/with_retry.go +++ b/rest/with_retry.go @@ -78,8 +78,12 @@ type WithRetry interface { IsNextRetry(ctx context.Context, restReq *Request, httpReq *http.Request, resp *http.Response, err error, f IsRetryableErrorFunc) bool // Before should be invoked prior to each attempt, including - // the first one. if an error is returned, the request - // should be aborted immediately. + // the first one. If an error is returned, the request should + // be aborted immediately. + // + // Before may also be additionally responsible for preparing + // the request for the next retry, namely in terms of resetting + // the request body in case it has been read. Before(ctx context.Context, r *Request) error // After should be invoked immediately after an attempt is made. @@ -194,46 +198,18 @@ func (r *withRetry) IsNextRetry(ctx context.Context, restReq *Request, httpReq * r.retryAfter.Wait = time.Duration(seconds) * time.Second r.retryAfter.Reason = getRetryReason(r.attempts, seconds, resp, err) - if err := r.prepareForNextRetry(ctx, restReq); err != nil { - klog.V(4).Infof("Could not retry request - %v", err) - return false - } - return true } -// prepareForNextRetry is responsible for carrying out operations that need -// to be completed before the next retry is initiated: -// - if the request context is already canceled there is no need to -// retry, the function will return ctx.Err(). -// - we need to seek to the beginning of the request body before we -// initiate the next retry, the function should return an error if -// it fails to do so. -func (r *withRetry) prepareForNextRetry(ctx context.Context, request *Request) error { - if ctx.Err() != nil { - return ctx.Err() - } - - // Ensure the response body is fully read and closed before - // we reconnect, so that we reuse the same TCP connection. - if seeker, ok := request.body.(io.Seeker); ok && request.body != nil { - if _, err := seeker.Seek(0, 0); err != nil { - return fmt.Errorf("can't Seek() back to beginning of body for %T", request) - } - } - - klog.V(4).Infof("Got a Retry-After %s response for attempt %d to %v", r.retryAfter.Wait, r.retryAfter.Attempt, request.URL().String()) - return nil -} - func (r *withRetry) Before(ctx context.Context, request *Request) error { + // If the request context is already canceled there + // is no need to retry. if ctx.Err() != nil { r.trackPreviousError(ctx.Err()) return ctx.Err() } url := request.URL() - // r.retryAfter represents the retry after parameters calculated // from the (response, err) tuple from the last attempt, so 'Before' // can apply these retry after parameters prior to the next attempt. @@ -245,6 +221,18 @@ func (r *withRetry) Before(ctx context.Context, request *Request) error { return nil } + // At this point we've made atleast one attempt, post which the response + // body should have been fully read and closed in order for it to be safe + // to reset the request body before we reconnect, in order for us to reuse + // the same TCP connection. + if seeker, ok := request.body.(io.Seeker); ok && request.body != nil { + if _, err := seeker.Seek(0, io.SeekStart); err != nil { + err = fmt.Errorf("failed to reset the request body while retrying a request: %v", err) + r.trackPreviousError(err) + return err + } + } + // if we are here, we have made attempt(s) al least once before. if request.backoff != nil { // TODO(tkashem) with default set to use exponential backoff @@ -263,6 +251,7 @@ func (r *withRetry) Before(ctx context.Context, request *Request) error { return err } + klog.V(4).Infof("Got a Retry-After %s response for attempt %d to %v", r.retryAfter.Wait, r.retryAfter.Attempt, request.URL().String()) return nil } From b1e85f6f0092d90a50f076d0cb1fd70cd8c5966d Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Tue, 29 Mar 2022 20:36:25 -0700 Subject: [PATCH 101/111] Merge pull request #109031 from Jefftree/openapiv3beta OpenAPI V3 Enable Beta Kubernetes-commit: 904c30562a9a34d26ff3e76db29d00daea2e0f60 --- go.mod | 9 ++++----- go.sum | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index bb254bb98..93b72feb9 100644 --- a/go.mod +++ b/go.mod @@ -34,8 +34,8 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0 - k8s.io/apimachinery v0.0.0 + k8s.io/api v0.0.0-20220330051021-b754a94214be + k8s.io/apimachinery v0.0.0-20220330050810-00f071187c12 k8s.io/klog/v2 v2.60.1 k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -44,7 +44,6 @@ require ( ) replace ( - k8s.io/api => ../api - k8s.io/apimachinery => ../apimachinery - k8s.io/client-go => ../client-go + k8s.io/api => k8s.io/api v0.0.0-20220330051021-b754a94214be + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220330050810-00f071187c12 ) diff --git a/go.sum b/go.sum index 8c1598ddf..538938e28 100644 --- a/go.sum +++ b/go.sum @@ -628,6 +628,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.0.0-20220330051021-b754a94214be h1:UnXBdsSVy3e2Y6cyf9rVmzn0wPXyoUuGIZAM43vdTj0= +k8s.io/api v0.0.0-20220330051021-b754a94214be/go.mod h1:gL+2VXubbVTH6gK18uLau2gxoDmu43bdiQmz5TTa3zw= +k8s.io/apimachinery v0.0.0-20220330050810-00f071187c12 h1:+Cp1h0ojFtOluw7Bgiju2A/LqoWzeYyaB+sY/YSflwE= +k8s.io/apimachinery v0.0.0-20220330050810-00f071187c12/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 1cab68940f2d58c846a17055c6d3539265dc318e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Wed, 30 Mar 2022 08:52:10 +0200 Subject: [PATCH 102/111] Add test for indexer with multiple values Kubernetes-commit: 56159f258ca380600b0bc08b2e99cbc745db3560 --- tools/cache/thread_safe_store_test.go | 73 +++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/tools/cache/thread_safe_store_test.go b/tools/cache/thread_safe_store_test.go index 591ff3727..c4cbd4d08 100644 --- a/tools/cache/thread_safe_store_test.go +++ b/tools/cache/thread_safe_store_test.go @@ -18,7 +18,11 @@ package cache import ( "fmt" + "strings" "testing" + + "github.com/google/go-cmp/cmp" + "github.com/stretchr/testify/assert" ) func TestThreadSafeStoreDeleteRemovesEmptySetsFromIndex(t *testing.T) { @@ -92,6 +96,75 @@ func TestThreadSafeStoreAddKeepsNonEmptySetPostDeleteFromIndex(t *testing.T) { } } +func TestThreadSafeStoreIndexingFunctionsWithMultipleValues(t *testing.T) { + testIndexer := "testIndexer" + + indexers := Indexers{ + testIndexer: func(obj interface{}) ([]string, error) { + return strings.Split(obj.(string), ","), nil + }, + } + + indices := Indices{} + store := NewThreadSafeStore(indexers, indices).(*threadSafeMap) + + store.Add("key1", "foo") + store.Add("key2", "bar") + + assert := assert.New(t) + + compare := func(key string, expected []string) error { + values := store.indices[testIndexer][key].List() + if cmp.Equal(values, expected) { + return nil + } + return fmt.Errorf("unexpected index for key %s, diff=%s", key, cmp.Diff(values, expected)) + } + + assert.NoError(compare("foo", []string{"key1"})) + assert.NoError(compare("bar", []string{"key2"})) + + store.Update("key2", "foo,bar") + + assert.NoError(compare("foo", []string{"key1", "key2"})) + assert.NoError(compare("bar", []string{"key2"})) + + store.Update("key1", "foo,bar") + + assert.NoError(compare("foo", []string{"key1", "key2"})) + assert.NoError(compare("bar", []string{"key1", "key2"})) + + store.Add("key3", "foo,bar,baz") + + assert.NoError(compare("foo", []string{"key1", "key2", "key3"})) + assert.NoError(compare("bar", []string{"key1", "key2", "key3"})) + assert.NoError(compare("baz", []string{"key3"})) + + store.Update("key1", "foo") + + assert.NoError(compare("foo", []string{"key1", "key2", "key3"})) + assert.NoError(compare("bar", []string{"key2", "key3"})) + assert.NoError(compare("baz", []string{"key3"})) + + store.Update("key2", "bar") + + assert.NoError(compare("foo", []string{"key1", "key3"})) + assert.NoError(compare("bar", []string{"key2", "key3"})) + assert.NoError(compare("baz", []string{"key3"})) + + store.Delete("key1") + + assert.NoError(compare("foo", []string{"key3"})) + assert.NoError(compare("bar", []string{"key2", "key3"})) + assert.NoError(compare("baz", []string{"key3"})) + + store.Delete("key3") + + assert.NoError(compare("foo", []string{})) + assert.NoError(compare("bar", []string{"key2"})) + assert.NoError(compare("baz", []string{})) +} + func BenchmarkIndexer(b *testing.B) { testIndexer := "testIndexer" From e540ebe9940f6a170fb8a92d15d22c61dad04f32 Mon Sep 17 00:00:00 2001 From: Michael Bolot Date: Tue, 29 Mar 2022 12:35:13 -0500 Subject: [PATCH 103/111] Addresses the issue which caused #109115 Kubernetes-commit: cbbb5f70a47644f9830073d9d0329bf247a328a1 --- tools/cache/thread_safe_store.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/cache/thread_safe_store.go b/tools/cache/thread_safe_store.go index 2ab926825..6d58c0d69 100644 --- a/tools/cache/thread_safe_store.go +++ b/tools/cache/thread_safe_store.go @@ -280,18 +280,15 @@ func (c *threadSafeMap) updateIndices(oldObj interface{}, newObj interface{}, ke c.indices[name] = index } + if len(indexValues) == 1 && len(oldIndexValues) == 1 && indexValues[0] == oldIndexValues[0] { + // We optimize for the most common case where indexFunc returns a single value which has not been changed + continue + } + for _, value := range oldIndexValues { - // We optimize for the most common case where indexFunc returns a single value. - if len(indexValues) == 1 && value == indexValues[0] { - continue - } c.deleteKeyFromIndex(key, value, index) } for _, value := range indexValues { - // We optimize for the most common case where indexFunc returns a single value. - if len(oldIndexValues) == 1 && value == oldIndexValues[0] { - continue - } c.addKeyToIndex(key, value, index) } } From 488e9bb0516e0c037ad8d1e3747bef954535c351 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Wed, 30 Mar 2022 04:04:28 -0700 Subject: [PATCH 104/111] Merge pull request #109137 from wojtek-t/fix_multiple_values_indexer Fix issues in indexer caused by object changing the number of index values Kubernetes-commit: 2e55595d3baeedcab09745355824f38a60cf6d08 --- go.mod | 4 ++-- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 93b72feb9..5f199e7e3 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 k8s.io/api v0.0.0-20220330051021-b754a94214be - k8s.io/apimachinery v0.0.0-20220330050810-00f071187c12 + k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444 k8s.io/klog/v2 v2.60.1 k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -45,5 +45,5 @@ require ( replace ( k8s.io/api => k8s.io/api v0.0.0-20220330051021-b754a94214be - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220330050810-00f071187c12 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444 ) diff --git a/go.sum b/go.sum index 538938e28..2a8ac9fe6 100644 --- a/go.sum +++ b/go.sum @@ -630,8 +630,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20220330051021-b754a94214be h1:UnXBdsSVy3e2Y6cyf9rVmzn0wPXyoUuGIZAM43vdTj0= k8s.io/api v0.0.0-20220330051021-b754a94214be/go.mod h1:gL+2VXubbVTH6gK18uLau2gxoDmu43bdiQmz5TTa3zw= -k8s.io/apimachinery v0.0.0-20220330050810-00f071187c12 h1:+Cp1h0ojFtOluw7Bgiju2A/LqoWzeYyaB+sY/YSflwE= -k8s.io/apimachinery v0.0.0-20220330050810-00f071187c12/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444 h1:whQmS3GtF822OUer+LPJnMFKn6kPfuJOCM/3xUuATIY= +k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 092a109b2b108d1418b3a6fcea1ea217387b6539 Mon Sep 17 00:00:00 2001 From: Sarvesh Rangnekar Date: Wed, 30 Mar 2022 19:39:00 -0700 Subject: [PATCH 105/111] Introduce APIs to support multiple ClusterCIDRs (#108290) * Introduce networking/v1alpha1 api, ClusterCIDRConfig type Introduce networking/v1alpha1 api group. Add `ClusterCIDRConfig` type to networking/v1alpha1 api group, this type will enable the NodeIPAM controller to support multiple ClusterCIDRs. * Change ClusterCIDRConfig.NodeSelector type in api * Fix review comments for API * Update ClusterCIDRConfig API Spec Introduce PerNodeHostBits field, remove PerNodeMaskSize Kubernetes-commit: b9792a9daef4d978c5c30b6d10cbcdfa77a9b6ac --- applyconfigurations/internal/internal.go | 51 ++++ applyconfigurations/meta/v1/listmeta.go | 66 +++++ .../networking/v1alpha1/cidrconfig.go | 48 ++++ .../networking/v1alpha1/clustercidrconfig.go | 256 ++++++++++++++++++ .../v1alpha1/clustercidrconfigspec.go | 70 +++++ .../v1alpha1/clustercidrconfigstatus.go | 48 ++++ applyconfigurations/utils.go | 8 + go.mod | 4 +- go.sum | 4 +- informers/generic.go | 5 + informers/networking/interface.go | 8 + .../networking/v1alpha1/clustercidrconfig.go | 89 ++++++ informers/networking/v1alpha1/interface.go | 45 +++ kubernetes/clientset.go | 13 + kubernetes/fake/clientset_generated.go | 7 + kubernetes/fake/register.go | 2 + kubernetes/scheme/register.go | 2 + .../networking/v1alpha1/clustercidrconfig.go | 243 +++++++++++++++++ kubernetes/typed/networking/v1alpha1/doc.go | 20 ++ .../typed/networking/v1alpha1/fake/doc.go | 20 ++ .../v1alpha1/fake/fake_clustercidrconfig.go | 179 ++++++++++++ .../v1alpha1/fake/fake_networking_client.go | 40 +++ .../v1alpha1/generated_expansion.go | 21 ++ .../networking/v1alpha1/networking_client.go | 107 ++++++++ .../networking/v1alpha1/clustercidrconfig.go | 68 +++++ .../v1alpha1/expansion_generated.go | 23 ++ 26 files changed, 1443 insertions(+), 4 deletions(-) create mode 100644 applyconfigurations/meta/v1/listmeta.go create mode 100644 applyconfigurations/networking/v1alpha1/cidrconfig.go create mode 100644 applyconfigurations/networking/v1alpha1/clustercidrconfig.go create mode 100644 applyconfigurations/networking/v1alpha1/clustercidrconfigspec.go create mode 100644 applyconfigurations/networking/v1alpha1/clustercidrconfigstatus.go create mode 100644 informers/networking/v1alpha1/clustercidrconfig.go create mode 100644 informers/networking/v1alpha1/interface.go create mode 100644 kubernetes/typed/networking/v1alpha1/clustercidrconfig.go create mode 100644 kubernetes/typed/networking/v1alpha1/doc.go create mode 100644 kubernetes/typed/networking/v1alpha1/fake/doc.go create mode 100644 kubernetes/typed/networking/v1alpha1/fake/fake_clustercidrconfig.go create mode 100644 kubernetes/typed/networking/v1alpha1/fake/fake_networking_client.go create mode 100644 kubernetes/typed/networking/v1alpha1/generated_expansion.go create mode 100644 kubernetes/typed/networking/v1alpha1/networking_client.go create mode 100644 listers/networking/v1alpha1/clustercidrconfig.go create mode 100644 listers/networking/v1alpha1/expansion_generated.go diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index df8cc0f84..4d6112f30 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -9531,6 +9531,57 @@ var schemaYAML = typed.YAMLObject(`types: - name: number type: scalar: numeric +- name: io.k8s.api.networking.v1alpha1.ClusterCIDRConfig + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.networking.v1alpha1.ClusterCIDRConfigSpec + default: {} + - name: status + type: + namedType: io.k8s.api.networking.v1alpha1.ClusterCIDRConfigStatus + default: {} +- name: io.k8s.api.networking.v1alpha1.ClusterCIDRConfigSpec + map: + fields: + - name: ipv4CIDR + type: + scalar: string + default: "" + - name: ipv6CIDR + type: + scalar: string + default: "" + - name: nodeSelector + type: + namedType: io.k8s.api.core.v1.NodeSelector + - name: perNodeHostBits + type: + scalar: numeric + default: 0 +- name: io.k8s.api.networking.v1alpha1.ClusterCIDRConfigStatus + map: + elementType: + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable - name: io.k8s.api.networking.v1beta1.HTTPIngressPath map: fields: diff --git a/applyconfigurations/meta/v1/listmeta.go b/applyconfigurations/meta/v1/listmeta.go new file mode 100644 index 000000000..5cadee335 --- /dev/null +++ b/applyconfigurations/meta/v1/listmeta.go @@ -0,0 +1,66 @@ +/* +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 applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ListMetaApplyConfiguration represents an declarative configuration of the ListMeta type for use +// with apply. +type ListMetaApplyConfiguration struct { + SelfLink *string `json:"selfLink,omitempty"` + ResourceVersion *string `json:"resourceVersion,omitempty"` + Continue *string `json:"continue,omitempty"` + RemainingItemCount *int64 `json:"remainingItemCount,omitempty"` +} + +// ListMetaApplyConfiguration constructs an declarative configuration of the ListMeta type for use with +// apply. +func ListMeta() *ListMetaApplyConfiguration { + return &ListMetaApplyConfiguration{} +} + +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ListMetaApplyConfiguration) WithSelfLink(value string) *ListMetaApplyConfiguration { + b.SelfLink = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ListMetaApplyConfiguration) WithResourceVersion(value string) *ListMetaApplyConfiguration { + b.ResourceVersion = &value + return b +} + +// WithContinue sets the Continue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Continue field is set to the value of the last call. +func (b *ListMetaApplyConfiguration) WithContinue(value string) *ListMetaApplyConfiguration { + b.Continue = &value + return b +} + +// WithRemainingItemCount sets the RemainingItemCount field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RemainingItemCount field is set to the value of the last call. +func (b *ListMetaApplyConfiguration) WithRemainingItemCount(value int64) *ListMetaApplyConfiguration { + b.RemainingItemCount = &value + return b +} diff --git a/applyconfigurations/networking/v1alpha1/cidrconfig.go b/applyconfigurations/networking/v1alpha1/cidrconfig.go new file mode 100644 index 000000000..2f792bb44 --- /dev/null +++ b/applyconfigurations/networking/v1alpha1/cidrconfig.go @@ -0,0 +1,48 @@ +/* +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// CIDRConfigApplyConfiguration represents an declarative configuration of the CIDRConfig type for use +// with apply. +type CIDRConfigApplyConfiguration struct { + CIDR *string `json:"cidr,omitempty"` + PerNodeMaskSize *int32 `json:"perNodeMaskSize,omitempty"` +} + +// CIDRConfigApplyConfiguration constructs an declarative configuration of the CIDRConfig type for use with +// apply. +func CIDRConfig() *CIDRConfigApplyConfiguration { + return &CIDRConfigApplyConfiguration{} +} + +// WithCIDR sets the CIDR field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CIDR field is set to the value of the last call. +func (b *CIDRConfigApplyConfiguration) WithCIDR(value string) *CIDRConfigApplyConfiguration { + b.CIDR = &value + return b +} + +// WithPerNodeMaskSize sets the PerNodeMaskSize field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PerNodeMaskSize field is set to the value of the last call. +func (b *CIDRConfigApplyConfiguration) WithPerNodeMaskSize(value int32) *CIDRConfigApplyConfiguration { + b.PerNodeMaskSize = &value + return b +} diff --git a/applyconfigurations/networking/v1alpha1/clustercidrconfig.go b/applyconfigurations/networking/v1alpha1/clustercidrconfig.go new file mode 100644 index 000000000..ce7e4a720 --- /dev/null +++ b/applyconfigurations/networking/v1alpha1/clustercidrconfig.go @@ -0,0 +1,256 @@ +/* +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ClusterCIDRConfigApplyConfiguration represents an declarative configuration of the ClusterCIDRConfig type for use +// with apply. +type ClusterCIDRConfigApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ClusterCIDRConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *networkingv1alpha1.ClusterCIDRConfigStatus `json:"status,omitempty"` +} + +// ClusterCIDRConfig constructs an declarative configuration of the ClusterCIDRConfig type for use with +// apply. +func ClusterCIDRConfig(name string) *ClusterCIDRConfigApplyConfiguration { + b := &ClusterCIDRConfigApplyConfiguration{} + b.WithName(name) + b.WithKind("ClusterCIDRConfig") + b.WithAPIVersion("networking.k8s.io/v1alpha1") + return b +} + +// ExtractClusterCIDRConfig extracts the applied configuration owned by fieldManager from +// clusterCIDRConfig. If no managedFields are found in clusterCIDRConfig for fieldManager, a +// ClusterCIDRConfigApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// clusterCIDRConfig must be a unmodified ClusterCIDRConfig API object that was retrieved from the Kubernetes API. +// ExtractClusterCIDRConfig provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractClusterCIDRConfig(clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfig, fieldManager string) (*ClusterCIDRConfigApplyConfiguration, error) { + return extractClusterCIDRConfig(clusterCIDRConfig, fieldManager, "") +} + +// ExtractClusterCIDRConfigStatus is the same as ExtractClusterCIDRConfig except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractClusterCIDRConfigStatus(clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfig, fieldManager string) (*ClusterCIDRConfigApplyConfiguration, error) { + return extractClusterCIDRConfig(clusterCIDRConfig, fieldManager, "status") +} + +func extractClusterCIDRConfig(clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfig, fieldManager string, subresource string) (*ClusterCIDRConfigApplyConfiguration, error) { + b := &ClusterCIDRConfigApplyConfiguration{} + err := managedfields.ExtractInto(clusterCIDRConfig, internal.Parser().Type("io.k8s.api.networking.v1alpha1.ClusterCIDRConfig"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(clusterCIDRConfig.Name) + + b.WithKind("ClusterCIDRConfig") + b.WithAPIVersion("networking.k8s.io/v1alpha1") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ClusterCIDRConfigApplyConfiguration) WithKind(value string) *ClusterCIDRConfigApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ClusterCIDRConfigApplyConfiguration) WithAPIVersion(value string) *ClusterCIDRConfigApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ClusterCIDRConfigApplyConfiguration) WithName(value string) *ClusterCIDRConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ClusterCIDRConfigApplyConfiguration) WithGenerateName(value string) *ClusterCIDRConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ClusterCIDRConfigApplyConfiguration) WithNamespace(value string) *ClusterCIDRConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ClusterCIDRConfigApplyConfiguration) WithUID(value types.UID) *ClusterCIDRConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ClusterCIDRConfigApplyConfiguration) WithResourceVersion(value string) *ClusterCIDRConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ClusterCIDRConfigApplyConfiguration) WithGeneration(value int64) *ClusterCIDRConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ClusterCIDRConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterCIDRConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ClusterCIDRConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterCIDRConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ClusterCIDRConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterCIDRConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ClusterCIDRConfigApplyConfiguration) WithLabels(entries map[string]string) *ClusterCIDRConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ClusterCIDRConfigApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterCIDRConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ClusterCIDRConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterCIDRConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ClusterCIDRConfigApplyConfiguration) WithFinalizers(values ...string) *ClusterCIDRConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ClusterCIDRConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ClusterCIDRConfigApplyConfiguration) WithSpec(value *ClusterCIDRConfigSpecApplyConfiguration) *ClusterCIDRConfigApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *ClusterCIDRConfigApplyConfiguration) WithStatus(value networkingv1alpha1.ClusterCIDRConfigStatus) *ClusterCIDRConfigApplyConfiguration { + b.Status = &value + return b +} diff --git a/applyconfigurations/networking/v1alpha1/clustercidrconfigspec.go b/applyconfigurations/networking/v1alpha1/clustercidrconfigspec.go new file mode 100644 index 000000000..8553a9180 --- /dev/null +++ b/applyconfigurations/networking/v1alpha1/clustercidrconfigspec.go @@ -0,0 +1,70 @@ +/* +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/core/v1" +) + +// ClusterCIDRConfigSpecApplyConfiguration represents an declarative configuration of the ClusterCIDRConfigSpec type for use +// with apply. +type ClusterCIDRConfigSpecApplyConfiguration struct { + NodeSelector *v1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"` + PerNodeHostBits *int32 `json:"perNodeHostBits,omitempty"` + IPv4CIDR *string `json:"ipv4CIDR,omitempty"` + IPv6CIDR *string `json:"ipv6CIDR,omitempty"` +} + +// ClusterCIDRConfigSpecApplyConfiguration constructs an declarative configuration of the ClusterCIDRConfigSpec type for use with +// apply. +func ClusterCIDRConfigSpec() *ClusterCIDRConfigSpecApplyConfiguration { + return &ClusterCIDRConfigSpecApplyConfiguration{} +} + +// WithNodeSelector sets the NodeSelector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeSelector field is set to the value of the last call. +func (b *ClusterCIDRConfigSpecApplyConfiguration) WithNodeSelector(value *v1.NodeSelectorApplyConfiguration) *ClusterCIDRConfigSpecApplyConfiguration { + b.NodeSelector = value + return b +} + +// WithPerNodeHostBits sets the PerNodeHostBits field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PerNodeHostBits field is set to the value of the last call. +func (b *ClusterCIDRConfigSpecApplyConfiguration) WithPerNodeHostBits(value int32) *ClusterCIDRConfigSpecApplyConfiguration { + b.PerNodeHostBits = &value + return b +} + +// WithIPv4CIDR sets the IPv4CIDR field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IPv4CIDR field is set to the value of the last call. +func (b *ClusterCIDRConfigSpecApplyConfiguration) WithIPv4CIDR(value string) *ClusterCIDRConfigSpecApplyConfiguration { + b.IPv4CIDR = &value + return b +} + +// WithIPv6CIDR sets the IPv6CIDR field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IPv6CIDR field is set to the value of the last call. +func (b *ClusterCIDRConfigSpecApplyConfiguration) WithIPv6CIDR(value string) *ClusterCIDRConfigSpecApplyConfiguration { + b.IPv6CIDR = &value + return b +} diff --git a/applyconfigurations/networking/v1alpha1/clustercidrconfigstatus.go b/applyconfigurations/networking/v1alpha1/clustercidrconfigstatus.go new file mode 100644 index 000000000..4b0cda224 --- /dev/null +++ b/applyconfigurations/networking/v1alpha1/clustercidrconfigstatus.go @@ -0,0 +1,48 @@ +/* +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ClusterCIDRConfigStatusApplyConfiguration represents an declarative configuration of the ClusterCIDRConfigStatus type for use +// with apply. +type ClusterCIDRConfigStatusApplyConfiguration struct { + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// ClusterCIDRConfigStatusApplyConfiguration constructs an declarative configuration of the ClusterCIDRConfigStatus type for use with +// apply. +func ClusterCIDRConfigStatus() *ClusterCIDRConfigStatusApplyConfiguration { + return &ClusterCIDRConfigStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *ClusterCIDRConfigStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *ClusterCIDRConfigStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/applyconfigurations/utils.go b/applyconfigurations/utils.go index 90f3ae711..c59f58be6 100644 --- a/applyconfigurations/utils.go +++ b/applyconfigurations/utils.go @@ -46,6 +46,7 @@ import ( flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" imagepolicyv1alpha1 "k8s.io/api/imagepolicy/v1alpha1" networkingv1 "k8s.io/api/networking/v1" + networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" nodev1 "k8s.io/api/node/v1" nodev1alpha1 "k8s.io/api/node/v1alpha1" @@ -91,6 +92,7 @@ import ( applyconfigurationsimagepolicyv1alpha1 "k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1" applyconfigurationsmetav1 "k8s.io/client-go/applyconfigurations/meta/v1" applyconfigurationsnetworkingv1 "k8s.io/client-go/applyconfigurations/networking/v1" + applyconfigurationsnetworkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" applyconfigurationsnetworkingv1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" applyconfigurationsnodev1 "k8s.io/client-go/applyconfigurations/node/v1" applyconfigurationsnodev1alpha1 "k8s.io/client-go/applyconfigurations/node/v1alpha1" @@ -1200,6 +1202,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} { case networkingv1.SchemeGroupVersion.WithKind("ServiceBackendPort"): return &applyconfigurationsnetworkingv1.ServiceBackendPortApplyConfiguration{} + // Group=networking.k8s.io, Version=v1alpha1 + case networkingv1alpha1.SchemeGroupVersion.WithKind("ClusterCIDRConfig"): + return &applyconfigurationsnetworkingv1alpha1.ClusterCIDRConfigApplyConfiguration{} + case networkingv1alpha1.SchemeGroupVersion.WithKind("ClusterCIDRConfigSpec"): + return &applyconfigurationsnetworkingv1alpha1.ClusterCIDRConfigSpecApplyConfiguration{} + // Group=networking.k8s.io, Version=v1beta1 case networkingv1beta1.SchemeGroupVersion.WithKind("HTTPIngressPath"): return &applyconfigurationsnetworkingv1beta1.HTTPIngressPathApplyConfiguration{} diff --git a/go.mod b/go.mod index 5f199e7e3..c7cf4499f 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220330051021-b754a94214be + k8s.io/api v0.0.0-20220331051217-290a349b5385 k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444 k8s.io/klog/v2 v2.60.1 k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 @@ -44,6 +44,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220330051021-b754a94214be + k8s.io/api => k8s.io/api v0.0.0-20220331051217-290a349b5385 k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444 ) diff --git a/go.sum b/go.sum index 2a8ac9fe6..815f19ee7 100644 --- a/go.sum +++ b/go.sum @@ -628,8 +628,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220330051021-b754a94214be h1:UnXBdsSVy3e2Y6cyf9rVmzn0wPXyoUuGIZAM43vdTj0= -k8s.io/api v0.0.0-20220330051021-b754a94214be/go.mod h1:gL+2VXubbVTH6gK18uLau2gxoDmu43bdiQmz5TTa3zw= +k8s.io/api v0.0.0-20220331051217-290a349b5385 h1:f+qAtGb6ikFhuwOgV62s33+xw7QCi0hrywLfkBtCVRw= +k8s.io/api v0.0.0-20220331051217-290a349b5385/go.mod h1:69QWTzqWVlGn0rU+x3dmk3WAsUQHmeQwIBWMbK1ZEyE= k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444 h1:whQmS3GtF822OUer+LPJnMFKn6kPfuJOCM/3xUuATIY= k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= diff --git a/informers/generic.go b/informers/generic.go index 4c2e53c25..3785f1760 100644 --- a/informers/generic.go +++ b/informers/generic.go @@ -47,6 +47,7 @@ import ( flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" networkingv1 "k8s.io/api/networking/v1" + networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" nodev1 "k8s.io/api/node/v1" nodev1alpha1 "k8s.io/api/node/v1alpha1" @@ -272,6 +273,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case networkingv1.SchemeGroupVersion.WithResource("networkpolicies"): return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1().NetworkPolicies().Informer()}, nil + // Group=networking.k8s.io, Version=v1alpha1 + case networkingv1alpha1.SchemeGroupVersion.WithResource("clustercidrconfigs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha1().ClusterCIDRConfigs().Informer()}, nil + // Group=networking.k8s.io, Version=v1beta1 case networkingv1beta1.SchemeGroupVersion.WithResource("ingresses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().Ingresses().Informer()}, nil diff --git a/informers/networking/interface.go b/informers/networking/interface.go index 4a028d5d1..1c775c465 100644 --- a/informers/networking/interface.go +++ b/informers/networking/interface.go @@ -21,6 +21,7 @@ package networking import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" v1 "k8s.io/client-go/informers/networking/v1" + v1alpha1 "k8s.io/client-go/informers/networking/v1alpha1" v1beta1 "k8s.io/client-go/informers/networking/v1beta1" ) @@ -28,6 +29,8 @@ import ( type Interface interface { // V1 provides access to shared informers for resources in V1. V1() v1.Interface + // V1alpha1 provides access to shared informers for resources in V1alpha1. + V1alpha1() v1alpha1.Interface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface } @@ -48,6 +51,11 @@ func (g *group) V1() v1.Interface { return v1.New(g.factory, g.namespace, g.tweakListOptions) } +// V1alpha1 returns a new v1alpha1.Interface. +func (g *group) V1alpha1() v1alpha1.Interface { + return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +} + // V1beta1 returns a new v1beta1.Interface. func (g *group) V1beta1() v1beta1.Interface { return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) diff --git a/informers/networking/v1alpha1/clustercidrconfig.go b/informers/networking/v1alpha1/clustercidrconfig.go new file mode 100644 index 000000000..9e3e774c1 --- /dev/null +++ b/informers/networking/v1alpha1/clustercidrconfig.go @@ -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 v1alpha1 + +import ( + "context" + time "time" + + networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + 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" + v1alpha1 "k8s.io/client-go/listers/networking/v1alpha1" + cache "k8s.io/client-go/tools/cache" +) + +// ClusterCIDRConfigInformer provides access to a shared informer and lister for +// ClusterCIDRConfigs. +type ClusterCIDRConfigInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ClusterCIDRConfigLister +} + +type clusterCIDRConfigInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewClusterCIDRConfigInformer constructs a new informer for ClusterCIDRConfig 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 NewClusterCIDRConfigInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredClusterCIDRConfigInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredClusterCIDRConfigInformer constructs a new informer for ClusterCIDRConfig 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 NewFilteredClusterCIDRConfigInformer(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.NetworkingV1alpha1().ClusterCIDRConfigs().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.NetworkingV1alpha1().ClusterCIDRConfigs().Watch(context.TODO(), options) + }, + }, + &networkingv1alpha1.ClusterCIDRConfig{}, + resyncPeriod, + indexers, + ) +} + +func (f *clusterCIDRConfigInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredClusterCIDRConfigInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *clusterCIDRConfigInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&networkingv1alpha1.ClusterCIDRConfig{}, f.defaultInformer) +} + +func (f *clusterCIDRConfigInformer) Lister() v1alpha1.ClusterCIDRConfigLister { + return v1alpha1.NewClusterCIDRConfigLister(f.Informer().GetIndexer()) +} diff --git a/informers/networking/v1alpha1/interface.go b/informers/networking/v1alpha1/interface.go new file mode 100644 index 000000000..da6eae1d9 --- /dev/null +++ b/informers/networking/v1alpha1/interface.go @@ -0,0 +1,45 @@ +/* +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 v1alpha1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // ClusterCIDRConfigs returns a ClusterCIDRConfigInformer. + ClusterCIDRConfigs() ClusterCIDRConfigInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// ClusterCIDRConfigs returns a ClusterCIDRConfigInformer. +func (v *version) ClusterCIDRConfigs() ClusterCIDRConfigInformer { + return &clusterCIDRConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/kubernetes/clientset.go b/kubernetes/clientset.go index e46c0537f..0ea0c3c4c 100644 --- a/kubernetes/clientset.go +++ b/kubernetes/clientset.go @@ -53,6 +53,7 @@ import ( flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" flowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1" + networkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" nodev1 "k8s.io/client-go/kubernetes/typed/node/v1" nodev1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1" @@ -104,6 +105,7 @@ type Interface interface { FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface NetworkingV1() networkingv1.NetworkingV1Interface + NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface NodeV1() nodev1.NodeV1Interface NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface @@ -155,6 +157,7 @@ type Clientset struct { flowcontrolV1beta1 *flowcontrolv1beta1.FlowcontrolV1beta1Client flowcontrolV1beta2 *flowcontrolv1beta2.FlowcontrolV1beta2Client networkingV1 *networkingv1.NetworkingV1Client + networkingV1alpha1 *networkingv1alpha1.NetworkingV1alpha1Client networkingV1beta1 *networkingv1beta1.NetworkingV1beta1Client nodeV1 *nodev1.NodeV1Client nodeV1alpha1 *nodev1alpha1.NodeV1alpha1Client @@ -322,6 +325,11 @@ func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface { return c.networkingV1 } +// NetworkingV1alpha1 retrieves the NetworkingV1alpha1Client +func (c *Clientset) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { + return c.networkingV1alpha1 +} + // NetworkingV1beta1 retrieves the NetworkingV1beta1Client func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { return c.networkingV1beta1 @@ -561,6 +569,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } + cs.networkingV1alpha1, err = networkingv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.networkingV1beta1, err = networkingv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -672,6 +684,7 @@ func New(c rest.Interface) *Clientset { cs.flowcontrolV1beta1 = flowcontrolv1beta1.New(c) cs.flowcontrolV1beta2 = flowcontrolv1beta2.New(c) cs.networkingV1 = networkingv1.New(c) + cs.networkingV1alpha1 = networkingv1alpha1.New(c) cs.networkingV1beta1 = networkingv1beta1.New(c) cs.nodeV1 = nodev1.New(c) cs.nodeV1alpha1 = nodev1alpha1.New(c) diff --git a/kubernetes/fake/clientset_generated.go b/kubernetes/fake/clientset_generated.go index 9ab84ff5d..3e468bf90 100644 --- a/kubernetes/fake/clientset_generated.go +++ b/kubernetes/fake/clientset_generated.go @@ -84,6 +84,8 @@ import ( fakeflowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake" networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1" fakenetworkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1/fake" + networkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" + fakenetworkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake" networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" fakenetworkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake" nodev1 "k8s.io/client-go/kubernetes/typed/node/v1" @@ -317,6 +319,11 @@ func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface { return &fakenetworkingv1.FakeNetworkingV1{Fake: &c.Fake} } +// NetworkingV1alpha1 retrieves the NetworkingV1alpha1Client +func (c *Clientset) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { + return &fakenetworkingv1alpha1.FakeNetworkingV1alpha1{Fake: &c.Fake} +} + // NetworkingV1beta1 retrieves the NetworkingV1beta1Client func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { return &fakenetworkingv1beta1.FakeNetworkingV1beta1{Fake: &c.Fake} diff --git a/kubernetes/fake/register.go b/kubernetes/fake/register.go index c3f0a3d52..95c6b74d8 100644 --- a/kubernetes/fake/register.go +++ b/kubernetes/fake/register.go @@ -49,6 +49,7 @@ import ( flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" networkingv1 "k8s.io/api/networking/v1" + networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" nodev1 "k8s.io/api/node/v1" nodev1alpha1 "k8s.io/api/node/v1alpha1" @@ -105,6 +106,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ flowcontrolv1beta1.AddToScheme, flowcontrolv1beta2.AddToScheme, networkingv1.AddToScheme, + networkingv1alpha1.AddToScheme, networkingv1beta1.AddToScheme, nodev1.AddToScheme, nodev1alpha1.AddToScheme, diff --git a/kubernetes/scheme/register.go b/kubernetes/scheme/register.go index b41466151..b4eaeccd0 100644 --- a/kubernetes/scheme/register.go +++ b/kubernetes/scheme/register.go @@ -49,6 +49,7 @@ import ( flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" networkingv1 "k8s.io/api/networking/v1" + networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" nodev1 "k8s.io/api/node/v1" nodev1alpha1 "k8s.io/api/node/v1alpha1" @@ -105,6 +106,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ flowcontrolv1beta1.AddToScheme, flowcontrolv1beta2.AddToScheme, networkingv1.AddToScheme, + networkingv1alpha1.AddToScheme, networkingv1beta1.AddToScheme, nodev1.AddToScheme, nodev1alpha1.AddToScheme, diff --git a/kubernetes/typed/networking/v1alpha1/clustercidrconfig.go b/kubernetes/typed/networking/v1alpha1/clustercidrconfig.go new file mode 100644 index 000000000..5dea6c42c --- /dev/null +++ b/kubernetes/typed/networking/v1alpha1/clustercidrconfig.go @@ -0,0 +1,243 @@ +/* +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 client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "k8s.io/api/networking/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + networkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ClusterCIDRConfigsGetter has a method to return a ClusterCIDRConfigInterface. +// A group's client should implement this interface. +type ClusterCIDRConfigsGetter interface { + ClusterCIDRConfigs() ClusterCIDRConfigInterface +} + +// ClusterCIDRConfigInterface has methods to work with ClusterCIDRConfig resources. +type ClusterCIDRConfigInterface interface { + Create(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.CreateOptions) (*v1alpha1.ClusterCIDRConfig, error) + Update(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (*v1alpha1.ClusterCIDRConfig, error) + UpdateStatus(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (*v1alpha1.ClusterCIDRConfig, 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.ClusterCIDRConfig, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ClusterCIDRConfigList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterCIDRConfig, err error) + Apply(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) + ApplyStatus(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) + ClusterCIDRConfigExpansion +} + +// clusterCIDRConfigs implements ClusterCIDRConfigInterface +type clusterCIDRConfigs struct { + client rest.Interface +} + +// newClusterCIDRConfigs returns a ClusterCIDRConfigs +func newClusterCIDRConfigs(c *NetworkingV1alpha1Client) *clusterCIDRConfigs { + return &clusterCIDRConfigs{ + client: c.RESTClient(), + } +} + +// Get takes name of the clusterCIDRConfig, and returns the corresponding clusterCIDRConfig object, and an error if there is any. +func (c *clusterCIDRConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { + result = &v1alpha1.ClusterCIDRConfig{} + err = c.client.Get(). + Resource("clustercidrconfigs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterCIDRConfigs that match those selectors. +func (c *clusterCIDRConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterCIDRConfigList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.ClusterCIDRConfigList{} + err = c.client.Get(). + Resource("clustercidrconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterCIDRConfigs. +func (c *clusterCIDRConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("clustercidrconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a clusterCIDRConfig and creates it. Returns the server's representation of the clusterCIDRConfig, and an error, if there is any. +func (c *clusterCIDRConfigs) Create(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.CreateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { + result = &v1alpha1.ClusterCIDRConfig{} + err = c.client.Post(). + Resource("clustercidrconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterCIDRConfig). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a clusterCIDRConfig and updates it. Returns the server's representation of the clusterCIDRConfig, and an error, if there is any. +func (c *clusterCIDRConfigs) Update(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { + result = &v1alpha1.ClusterCIDRConfig{} + err = c.client.Put(). + Resource("clustercidrconfigs"). + Name(clusterCIDRConfig.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterCIDRConfig). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *clusterCIDRConfigs) UpdateStatus(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { + result = &v1alpha1.ClusterCIDRConfig{} + err = c.client.Put(). + Resource("clustercidrconfigs"). + Name(clusterCIDRConfig.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(clusterCIDRConfig). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the clusterCIDRConfig and deletes it. Returns an error if one occurs. +func (c *clusterCIDRConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("clustercidrconfigs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterCIDRConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("clustercidrconfigs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched clusterCIDRConfig. +func (c *clusterCIDRConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterCIDRConfig, err error) { + result = &v1alpha1.ClusterCIDRConfig{} + err = c.client.Patch(pt). + Resource("clustercidrconfigs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied clusterCIDRConfig. +func (c *clusterCIDRConfigs) Apply(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { + if clusterCIDRConfig == nil { + return nil, fmt.Errorf("clusterCIDRConfig provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(clusterCIDRConfig) + if err != nil { + return nil, err + } + name := clusterCIDRConfig.Name + if name == nil { + return nil, fmt.Errorf("clusterCIDRConfig.Name must be provided to Apply") + } + result = &v1alpha1.ClusterCIDRConfig{} + err = c.client.Patch(types.ApplyPatchType). + Resource("clustercidrconfigs"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *clusterCIDRConfigs) ApplyStatus(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { + if clusterCIDRConfig == nil { + return nil, fmt.Errorf("clusterCIDRConfig provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(clusterCIDRConfig) + if err != nil { + return nil, err + } + + name := clusterCIDRConfig.Name + if name == nil { + return nil, fmt.Errorf("clusterCIDRConfig.Name must be provided to Apply") + } + + result = &v1alpha1.ClusterCIDRConfig{} + err = c.client.Patch(types.ApplyPatchType). + Resource("clustercidrconfigs"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/kubernetes/typed/networking/v1alpha1/doc.go b/kubernetes/typed/networking/v1alpha1/doc.go new file mode 100644 index 000000000..df51baa4d --- /dev/null +++ b/kubernetes/typed/networking/v1alpha1/doc.go @@ -0,0 +1,20 @@ +/* +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 client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/kubernetes/typed/networking/v1alpha1/fake/doc.go b/kubernetes/typed/networking/v1alpha1/fake/doc.go new file mode 100644 index 000000000..16f443990 --- /dev/null +++ b/kubernetes/typed/networking/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +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 client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/kubernetes/typed/networking/v1alpha1/fake/fake_clustercidrconfig.go b/kubernetes/typed/networking/v1alpha1/fake/fake_clustercidrconfig.go new file mode 100644 index 000000000..5efeec7c8 --- /dev/null +++ b/kubernetes/typed/networking/v1alpha1/fake/fake_clustercidrconfig.go @@ -0,0 +1,179 @@ +/* +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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/networking/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + networkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeClusterCIDRConfigs implements ClusterCIDRConfigInterface +type FakeClusterCIDRConfigs struct { + Fake *FakeNetworkingV1alpha1 +} + +var clustercidrconfigsResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1alpha1", Resource: "clustercidrconfigs"} + +var clustercidrconfigsKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1alpha1", Kind: "ClusterCIDRConfig"} + +// Get takes name of the clusterCIDRConfig, and returns the corresponding clusterCIDRConfig object, and an error if there is any. +func (c *FakeClusterCIDRConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(clustercidrconfigsResource, name), &v1alpha1.ClusterCIDRConfig{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterCIDRConfig), err +} + +// List takes label and field selectors, and returns the list of ClusterCIDRConfigs that match those selectors. +func (c *FakeClusterCIDRConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterCIDRConfigList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(clustercidrconfigsResource, clustercidrconfigsKind, opts), &v1alpha1.ClusterCIDRConfigList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ClusterCIDRConfigList{ListMeta: obj.(*v1alpha1.ClusterCIDRConfigList).ListMeta} + for _, item := range obj.(*v1alpha1.ClusterCIDRConfigList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterCIDRConfigs. +func (c *FakeClusterCIDRConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(clustercidrconfigsResource, opts)) +} + +// Create takes the representation of a clusterCIDRConfig and creates it. Returns the server's representation of the clusterCIDRConfig, and an error, if there is any. +func (c *FakeClusterCIDRConfigs) Create(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.CreateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(clustercidrconfigsResource, clusterCIDRConfig), &v1alpha1.ClusterCIDRConfig{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterCIDRConfig), err +} + +// Update takes the representation of a clusterCIDRConfig and updates it. Returns the server's representation of the clusterCIDRConfig, and an error, if there is any. +func (c *FakeClusterCIDRConfigs) Update(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(clustercidrconfigsResource, clusterCIDRConfig), &v1alpha1.ClusterCIDRConfig{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterCIDRConfig), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeClusterCIDRConfigs) UpdateStatus(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (*v1alpha1.ClusterCIDRConfig, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(clustercidrconfigsResource, "status", clusterCIDRConfig), &v1alpha1.ClusterCIDRConfig{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterCIDRConfig), err +} + +// Delete takes name of the clusterCIDRConfig and deletes it. Returns an error if one occurs. +func (c *FakeClusterCIDRConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(clustercidrconfigsResource, name, opts), &v1alpha1.ClusterCIDRConfig{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeClusterCIDRConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clustercidrconfigsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ClusterCIDRConfigList{}) + return err +} + +// Patch applies the patch and returns the patched clusterCIDRConfig. +func (c *FakeClusterCIDRConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterCIDRConfig, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clustercidrconfigsResource, name, pt, data, subresources...), &v1alpha1.ClusterCIDRConfig{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterCIDRConfig), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied clusterCIDRConfig. +func (c *FakeClusterCIDRConfigs) Apply(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { + if clusterCIDRConfig == nil { + return nil, fmt.Errorf("clusterCIDRConfig provided to Apply must not be nil") + } + data, err := json.Marshal(clusterCIDRConfig) + if err != nil { + return nil, err + } + name := clusterCIDRConfig.Name + if name == nil { + return nil, fmt.Errorf("clusterCIDRConfig.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clustercidrconfigsResource, *name, types.ApplyPatchType, data), &v1alpha1.ClusterCIDRConfig{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterCIDRConfig), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeClusterCIDRConfigs) ApplyStatus(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { + if clusterCIDRConfig == nil { + return nil, fmt.Errorf("clusterCIDRConfig provided to Apply must not be nil") + } + data, err := json.Marshal(clusterCIDRConfig) + if err != nil { + return nil, err + } + name := clusterCIDRConfig.Name + if name == nil { + return nil, fmt.Errorf("clusterCIDRConfig.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clustercidrconfigsResource, *name, types.ApplyPatchType, data, "status"), &v1alpha1.ClusterCIDRConfig{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ClusterCIDRConfig), err +} diff --git a/kubernetes/typed/networking/v1alpha1/fake/fake_networking_client.go b/kubernetes/typed/networking/v1alpha1/fake/fake_networking_client.go new file mode 100644 index 000000000..af0f79a0a --- /dev/null +++ b/kubernetes/typed/networking/v1alpha1/fake/fake_networking_client.go @@ -0,0 +1,40 @@ +/* +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 client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeNetworkingV1alpha1 struct { + *testing.Fake +} + +func (c *FakeNetworkingV1alpha1) ClusterCIDRConfigs() v1alpha1.ClusterCIDRConfigInterface { + return &FakeClusterCIDRConfigs{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeNetworkingV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/kubernetes/typed/networking/v1alpha1/generated_expansion.go b/kubernetes/typed/networking/v1alpha1/generated_expansion.go new file mode 100644 index 000000000..a5941b79a --- /dev/null +++ b/kubernetes/typed/networking/v1alpha1/generated_expansion.go @@ -0,0 +1,21 @@ +/* +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 client-gen. DO NOT EDIT. + +package v1alpha1 + +type ClusterCIDRConfigExpansion interface{} diff --git a/kubernetes/typed/networking/v1alpha1/networking_client.go b/kubernetes/typed/networking/v1alpha1/networking_client.go new file mode 100644 index 000000000..d76ca2283 --- /dev/null +++ b/kubernetes/typed/networking/v1alpha1/networking_client.go @@ -0,0 +1,107 @@ +/* +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 client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "net/http" + + v1alpha1 "k8s.io/api/networking/v1alpha1" + "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +type NetworkingV1alpha1Interface interface { + RESTClient() rest.Interface + ClusterCIDRConfigsGetter +} + +// NetworkingV1alpha1Client is used to interact with features provided by the networking.k8s.io group. +type NetworkingV1alpha1Client struct { + restClient rest.Interface +} + +func (c *NetworkingV1alpha1Client) ClusterCIDRConfigs() ClusterCIDRConfigInterface { + return newClusterCIDRConfigs(c) +} + +// NewForConfig creates a new NetworkingV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*NetworkingV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new NetworkingV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*NetworkingV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &NetworkingV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new NetworkingV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *NetworkingV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new NetworkingV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *NetworkingV1alpha1Client { + return &NetworkingV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *NetworkingV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/listers/networking/v1alpha1/clustercidrconfig.go b/listers/networking/v1alpha1/clustercidrconfig.go new file mode 100644 index 000000000..c1811f799 --- /dev/null +++ b/listers/networking/v1alpha1/clustercidrconfig.go @@ -0,0 +1,68 @@ +/* +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 lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "k8s.io/api/networking/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ClusterCIDRConfigLister helps list ClusterCIDRConfigs. +// All objects returned here must be treated as read-only. +type ClusterCIDRConfigLister interface { + // List lists all ClusterCIDRConfigs in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.ClusterCIDRConfig, err error) + // Get retrieves the ClusterCIDRConfig from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.ClusterCIDRConfig, error) + ClusterCIDRConfigListerExpansion +} + +// clusterCIDRConfigLister implements the ClusterCIDRConfigLister interface. +type clusterCIDRConfigLister struct { + indexer cache.Indexer +} + +// NewClusterCIDRConfigLister returns a new ClusterCIDRConfigLister. +func NewClusterCIDRConfigLister(indexer cache.Indexer) ClusterCIDRConfigLister { + return &clusterCIDRConfigLister{indexer: indexer} +} + +// List lists all ClusterCIDRConfigs in the indexer. +func (s *clusterCIDRConfigLister) List(selector labels.Selector) (ret []*v1alpha1.ClusterCIDRConfig, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ClusterCIDRConfig)) + }) + return ret, err +} + +// Get retrieves the ClusterCIDRConfig from the index for a given name. +func (s *clusterCIDRConfigLister) Get(name string) (*v1alpha1.ClusterCIDRConfig, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("clustercidrconfig"), name) + } + return obj.(*v1alpha1.ClusterCIDRConfig), nil +} diff --git a/listers/networking/v1alpha1/expansion_generated.go b/listers/networking/v1alpha1/expansion_generated.go new file mode 100644 index 000000000..713990188 --- /dev/null +++ b/listers/networking/v1alpha1/expansion_generated.go @@ -0,0 +1,23 @@ +/* +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 lister-gen. DO NOT EDIT. + +package v1alpha1 + +// ClusterCIDRConfigListerExpansion allows custom methods to be added to +// ClusterCIDRConfigLister. +type ClusterCIDRConfigListerExpansion interface{} From f699049d30f7ff41eb704566d42cf463fc0e3167 Mon Sep 17 00:00:00 2001 From: Maciej Wyrzuc Date: Wed, 30 Mar 2022 12:50:48 +0000 Subject: [PATCH 106/111] Revert "Field `status.hostIPs` added for Pod (#101566)" This reverts commit 61b3c028ba618a939559c39befb546ae5e5fd0b9. Kubernetes-commit: 1108bed7631f545d43530aa697175d243b99610b --- applyconfigurations/core/v1/hostip.go | 39 ------------------------ applyconfigurations/core/v1/podstatus.go | 14 --------- applyconfigurations/internal/internal.go | 12 -------- applyconfigurations/utils.go | 2 -- 4 files changed, 67 deletions(-) delete mode 100644 applyconfigurations/core/v1/hostip.go diff --git a/applyconfigurations/core/v1/hostip.go b/applyconfigurations/core/v1/hostip.go deleted file mode 100644 index c2a42cf74..000000000 --- a/applyconfigurations/core/v1/hostip.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -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 applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// HostIPApplyConfiguration represents an declarative configuration of the HostIP type for use -// with apply. -type HostIPApplyConfiguration struct { - IP *string `json:"ip,omitempty"` -} - -// HostIPApplyConfiguration constructs an declarative configuration of the HostIP type for use with -// apply. -func HostIP() *HostIPApplyConfiguration { - return &HostIPApplyConfiguration{} -} - -// WithIP sets the IP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IP field is set to the value of the last call. -func (b *HostIPApplyConfiguration) WithIP(value string) *HostIPApplyConfiguration { - b.IP = &value - return b -} diff --git a/applyconfigurations/core/v1/podstatus.go b/applyconfigurations/core/v1/podstatus.go index 0fbfff3d4..7ee5b9955 100644 --- a/applyconfigurations/core/v1/podstatus.go +++ b/applyconfigurations/core/v1/podstatus.go @@ -32,7 +32,6 @@ type PodStatusApplyConfiguration struct { Reason *string `json:"reason,omitempty"` NominatedNodeName *string `json:"nominatedNodeName,omitempty"` HostIP *string `json:"hostIP,omitempty"` - HostIPs []HostIPApplyConfiguration `json:"hostIPs,omitempty"` PodIP *string `json:"podIP,omitempty"` PodIPs []PodIPApplyConfiguration `json:"podIPs,omitempty"` StartTime *metav1.Time `json:"startTime,omitempty"` @@ -101,19 +100,6 @@ func (b *PodStatusApplyConfiguration) WithHostIP(value string) *PodStatusApplyCo return b } -// WithHostIPs adds the given value to the HostIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the HostIPs field. -func (b *PodStatusApplyConfiguration) WithHostIPs(values ...*HostIPApplyConfiguration) *PodStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithHostIPs") - } - b.HostIPs = append(b.HostIPs, *values[i]) - } - return b -} - // WithPodIP sets the PodIP field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PodIP field is set to the value of the last call. diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index 4d6112f30..2a1e9af84 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -4629,12 +4629,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: ip type: scalar: string -- name: io.k8s.api.core.v1.HostIP - map: - fields: - - name: ip - type: - scalar: string - name: io.k8s.api.core.v1.HostPathVolumeSource map: fields: @@ -5895,12 +5889,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: hostIP type: scalar: string - - name: hostIPs - type: - list: - elementType: - namedType: io.k8s.api.core.v1.HostIP - elementRelationship: associative - name: initContainerStatuses type: list: diff --git a/applyconfigurations/utils.go b/applyconfigurations/utils.go index c59f58be6..ae18dac02 100644 --- a/applyconfigurations/utils.go +++ b/applyconfigurations/utils.go @@ -613,8 +613,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationscorev1.GRPCActionApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("HostAlias"): return &applyconfigurationscorev1.HostAliasApplyConfiguration{} - case corev1.SchemeGroupVersion.WithKind("HostIP"): - return &applyconfigurationscorev1.HostIPApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("HostPathVolumeSource"): return &applyconfigurationscorev1.HostPathVolumeSourceApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("HTTPGetAction"): From 8a672f0fd284de7e8c81627847e7127712e51d2f Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Thu, 31 Mar 2022 07:05:02 -0700 Subject: [PATCH 107/111] Merge pull request #109151 from Argh4k/r-101566 Revert "Field `status.hostIPs` added for Pod (#101566)" Kubernetes-commit: 691d4c3989f18e0be22c4499d22eff95d516d32b --- go.mod | 4 ++-- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index c7cf4499f..2df6a0d29 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220331051217-290a349b5385 + k8s.io/api v0.0.0-20220331140502-02c2207317b5 k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444 k8s.io/klog/v2 v2.60.1 k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 @@ -44,6 +44,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220331051217-290a349b5385 + k8s.io/api => k8s.io/api v0.0.0-20220331140502-02c2207317b5 k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444 ) diff --git a/go.sum b/go.sum index 815f19ee7..f986516f2 100644 --- a/go.sum +++ b/go.sum @@ -628,8 +628,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220331051217-290a349b5385 h1:f+qAtGb6ikFhuwOgV62s33+xw7QCi0hrywLfkBtCVRw= -k8s.io/api v0.0.0-20220331051217-290a349b5385/go.mod h1:69QWTzqWVlGn0rU+x3dmk3WAsUQHmeQwIBWMbK1ZEyE= +k8s.io/api v0.0.0-20220331140502-02c2207317b5 h1:shLc1jkM9dNz8zPSm2YeE/XOpp1UP36AZOt5DjspI+0= +k8s.io/api v0.0.0-20220331140502-02c2207317b5/go.mod h1:69QWTzqWVlGn0rU+x3dmk3WAsUQHmeQwIBWMbK1ZEyE= k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444 h1:whQmS3GtF822OUer+LPJnMFKn6kPfuJOCM/3xUuATIY= k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= From d8531f5ff06c39c0de4033b768f3df0ab0229acf Mon Sep 17 00:00:00 2001 From: Abu Kashem Date: Tue, 29 Mar 2022 13:09:26 -0400 Subject: [PATCH 108/111] client-go: make retry in Request thread safe Kubernetes-commit: 6618b8ef7c0b552839555d4578b64427d20524ef --- rest/request.go | 52 +++++++++++++++++++++++++++++--------------- rest/request_test.go | 36 ++++++++++++++++++------------ rest/with_retry.go | 13 ----------- 3 files changed, 56 insertions(+), 45 deletions(-) diff --git a/rest/request.go b/rest/request.go index ab9348d9c..3a1560df0 100644 --- a/rest/request.go +++ b/rest/request.go @@ -82,6 +82,12 @@ func (r *RequestConstructionError) Error() string { var noBackoff = &NoBackoff{} +type requestRetryFunc func(maxRetries int) WithRetry + +func defaultRequestRetryFn(maxRetries int) WithRetry { + return &withRetry{maxRetries: maxRetries} +} + // Request allows for building up a request to a server in a chained fashion. // Any errors are stored until the end of your call, so you only have to // check once. @@ -93,6 +99,7 @@ type Request struct { rateLimiter flowcontrol.RateLimiter backoff BackoffManager timeout time.Duration + maxRetries int // generic components accessible via method setters verb string @@ -109,9 +116,10 @@ type Request struct { subresource string // output - err error - body io.Reader - retry WithRetry + err error + body io.Reader + + retryFn requestRetryFunc } // NewRequest creates a new request helper object for accessing runtime.Objects on a server. @@ -142,7 +150,8 @@ func NewRequest(c *RESTClient) *Request { backoff: backoff, timeout: timeout, pathPrefix: pathPrefix, - retry: &withRetry{maxRetries: 10}, + maxRetries: 10, + retryFn: defaultRequestRetryFn, warningHandler: c.warningHandler, } @@ -408,7 +417,10 @@ func (r *Request) Timeout(d time.Duration) *Request { // function is specifically called with a different value. // A zero maxRetries prevent it from doing retires and return an error immediately. func (r *Request) MaxRetries(maxRetries int) *Request { - r.retry.SetMaxRetries(maxRetries) + if maxRetries < 0 { + maxRetries = 0 + } + r.maxRetries = maxRetries return r } @@ -612,19 +624,21 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { } return false } + retry := r.retryFn(r.maxRetries) url := r.URL().String() for { - if err := r.retry.Before(ctx, r); err != nil { - return nil, r.retry.WrapPreviousError(err) + if err := retry.Before(ctx, r); err != nil { + return nil, retry.WrapPreviousError(err) } req, err := r.newHTTPRequest(ctx) if err != nil { return nil, err } + resp, err := client.Do(req) updateURLMetrics(ctx, r, resp, err) - r.retry.After(ctx, r, resp, err) + retry.After(ctx, r, resp, err) if err == nil && resp.StatusCode == http.StatusOK { return r.newStreamWatcher(resp) } @@ -632,7 +646,7 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { done, transformErr := func() (bool, error) { defer readAndCloseResponseBody(resp) - if r.retry.IsNextRetry(ctx, r, req, resp, err, isErrRetryableFunc) { + if retry.IsNextRetry(ctx, r, req, resp, err, isErrRetryableFunc) { return false, nil } @@ -654,7 +668,7 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { // we need to return the error object from that. err = transformErr } - return nil, r.retry.WrapPreviousError(err) + return nil, retry.WrapPreviousError(err) } } } @@ -719,9 +733,10 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { client = http.DefaultClient } + retry := r.retryFn(r.maxRetries) url := r.URL().String() for { - if err := r.retry.Before(ctx, r); err != nil { + if err := retry.Before(ctx, r); err != nil { return nil, err } @@ -734,7 +749,7 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { } resp, err := client.Do(req) updateURLMetrics(ctx, r, resp, err) - r.retry.After(ctx, r, resp, err) + retry.After(ctx, r, resp, err) if err != nil { // we only retry on an HTTP response with 'Retry-After' header return nil, err @@ -749,7 +764,7 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { done, transformErr := func() (bool, error) { defer resp.Body.Close() - if r.retry.IsNextRetry(ctx, r, req, resp, err, neverRetryError) { + if retry.IsNextRetry(ctx, r, req, resp, err, neverRetryError) { return false, nil } result := r.transformResponse(resp, req) @@ -856,9 +871,10 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp } // Right now we make about ten retry attempts if we get a Retry-After response. + retry := r.retryFn(r.maxRetries) for { - if err := r.retry.Before(ctx, r); err != nil { - return r.retry.WrapPreviousError(err) + if err := retry.Before(ctx, r); err != nil { + return retry.WrapPreviousError(err) } req, err := r.newHTTPRequest(ctx) if err != nil { @@ -871,7 +887,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp if req.ContentLength >= 0 && !(req.Body != nil && req.ContentLength == 0) { metrics.RequestSize.Observe(ctx, r.verb, r.URL().Host, float64(req.ContentLength)) } - r.retry.After(ctx, r, resp, err) + retry.After(ctx, r, resp, err) done := func() bool { defer readAndCloseResponseBody(resp) @@ -884,7 +900,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp fn(req, resp) } - if r.retry.IsNextRetry(ctx, r, req, resp, err, isErrRetryableFunc) { + if retry.IsNextRetry(ctx, r, req, resp, err, isErrRetryableFunc) { return false } @@ -892,7 +908,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp return true }() if done { - return r.retry.WrapPreviousError(err) + return retry.WrapPreviousError(err) } } } diff --git a/rest/request_test.go b/rest/request_test.go index 8c3c65082..c685fce7b 100644 --- a/rest/request_test.go +++ b/rest/request_test.go @@ -998,7 +998,8 @@ func TestRequestWatch(t *testing.T) { c.Client = client } testCase.Request.backoff = &noSleepBackOff{} - testCase.Request.retry = &withRetry{maxRetries: testCase.maxRetries} + testCase.Request.maxRetries = testCase.maxRetries + testCase.Request.retryFn = defaultRequestRetryFn watch, err := testCase.Request.Watch(context.Background()) @@ -1211,7 +1212,8 @@ func TestRequestStream(t *testing.T) { c.Client = client } testCase.Request.backoff = &noSleepBackOff{} - testCase.Request.retry = &withRetry{maxRetries: testCase.maxRetries} + testCase.Request.maxRetries = testCase.maxRetries + testCase.Request.retryFn = defaultRequestRetryFn body, err := testCase.Request.Stream(context.Background()) @@ -1266,7 +1268,7 @@ func TestRequestDo(t *testing.T) { } for i, testCase := range testCases { testCase.Request.backoff = &NoBackoff{} - testCase.Request.retry = &withRetry{} + testCase.Request.retryFn = defaultRequestRetryFn body, err := testCase.Request.Do(context.Background()).Raw() hasErr := err != nil if hasErr != testCase.Err { @@ -1429,8 +1431,9 @@ func TestConnectionResetByPeerIsRetried(t *testing.T) { return nil, &net.OpError{Err: syscall.ECONNRESET} }), }, - backoff: backoff, - retry: &withRetry{maxRetries: 10}, + backoff: backoff, + maxRetries: 10, + retryFn: defaultRequestRetryFn, } // We expect two retries of "connection reset by peer" and the success. _, err := req.Do(context.Background()).Raw() @@ -2504,8 +2507,9 @@ func TestRequestWithRetry(t *testing.T) { c: &RESTClient{ Client: client, }, - backoff: &noSleepBackOff{}, - retry: &withRetry{maxRetries: 1}, + backoff: &noSleepBackOff{}, + maxRetries: 1, + retryFn: defaultRequestRetryFn, } var transformFuncInvoked int @@ -2782,8 +2786,9 @@ func testRequestWithRetry(t *testing.T, key string, doFunc func(ctx context.Cont content: defaultContentConfig(), Client: client, }, - backoff: &noSleepBackOff{}, - retry: &withRetry{maxRetries: test.maxRetries}, + backoff: &noSleepBackOff{}, + maxRetries: test.maxRetries, + retryFn: defaultRequestRetryFn, } doFunc(context.Background(), req) @@ -3006,7 +3011,8 @@ func testRetryWithRateLimiterBackoffAndMetrics(t *testing.T, key string, doFunc pathPrefix: "/api/v1", rateLimiter: interceptor, backoff: interceptor, - retry: &withRetry{maxRetries: test.maxRetries}, + maxRetries: test.maxRetries, + retryFn: defaultRequestRetryFn, } doFunc(ctx, req) @@ -3140,7 +3146,7 @@ func testWithRetryInvokeOrder(t *testing.T, key string, doFunc func(ctx context. pathPrefix: "/api/v1", rateLimiter: flowcontrol.NewFakeAlwaysRateLimiter(), backoff: &NoBackoff{}, - retry: interceptor, + retryFn: func(_ int) WithRetry { return interceptor }, } doFunc(context.Background(), req) @@ -3315,7 +3321,8 @@ func testWithWrapPreviousError(t *testing.T, doFunc func(ctx context.Context, r pathPrefix: "/api/v1", rateLimiter: flowcontrol.NewFakeAlwaysRateLimiter(), backoff: &noSleepBackOff{}, - retry: &withRetry{maxRetries: test.maxRetries}, + maxRetries: test.maxRetries, + retryFn: defaultRequestRetryFn, } err = doFunc(context.Background(), req) @@ -3618,8 +3625,9 @@ func TestRequestBodyResetOrder(t *testing.T) { content: defaultContentConfig(), Client: client, }, - backoff: &noSleepBackOff{}, - retry: &withRetry{maxRetries: 1}, + backoff: &noSleepBackOff{}, + maxRetries: 1, + retryFn: defaultRequestRetryFn, } req.Do(context.Background()) diff --git a/rest/with_retry.go b/rest/with_retry.go index 3082959d1..497d2608f 100644 --- a/rest/with_retry.go +++ b/rest/with_retry.go @@ -52,12 +52,6 @@ var neverRetryError = IsRetryableErrorFunc(func(_ *http.Request, _ error) bool { // Note that WithRetry is not safe for concurrent use by multiple // goroutines without additional locking or coordination. type WithRetry interface { - // SetMaxRetries makes the request use the specified integer as a ceiling - // for retries upon receiving a 429 status code and the "Retry-After" header - // in the response. - // A zero maxRetries should prevent from doing any retry and return immediately. - SetMaxRetries(maxRetries int) - // IsNextRetry advances the retry counter appropriately // and returns true if the request should be retried, // otherwise it returns false, if: @@ -144,13 +138,6 @@ type withRetry struct { previousErr, currentErr error } -func (r *withRetry) SetMaxRetries(maxRetries int) { - if maxRetries < 0 { - maxRetries = 0 - } - r.maxRetries = maxRetries -} - func (r *withRetry) trackPreviousError(err error) { // keep track of two most recent errors if r.currentErr != nil { From af4295f5013b55c45b05f1e7850f7fa9c4dbfdb4 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Mon, 4 Apr 2022 16:49:36 -0700 Subject: [PATCH 109/111] Merge pull request #109114 from tkashem/client-go-retry-thread-safe client-go: make retry in Request thread safe Kubernetes-commit: 0424c7c74d926b4fe3193059e003e9056b429d28 From 686b396dc0681d7f140bd2ee6b3c3bdea56cab4d Mon Sep 17 00:00:00 2001 From: James Laverack Date: Tue, 12 Apr 2022 16:00:35 +0100 Subject: [PATCH 110/111] Revert "Introduce APIs to support multiple ClusterCIDRs (#108290)" This reverts commit b9792a9daef4d978c5c30b6d10cbcdfa77a9b6ac. Kubernetes-commit: 7d57d5c70d04f652b431d2b86b8af40e119cd66a --- applyconfigurations/internal/internal.go | 51 ---- applyconfigurations/meta/v1/listmeta.go | 66 ----- .../networking/v1alpha1/cidrconfig.go | 48 ---- .../networking/v1alpha1/clustercidrconfig.go | 256 ------------------ .../v1alpha1/clustercidrconfigspec.go | 70 ----- .../v1alpha1/clustercidrconfigstatus.go | 48 ---- applyconfigurations/utils.go | 8 - go.mod | 8 +- go.sum | 8 +- informers/generic.go | 5 - informers/networking/interface.go | 8 - .../networking/v1alpha1/clustercidrconfig.go | 89 ------ informers/networking/v1alpha1/interface.go | 45 --- kubernetes/clientset.go | 13 - kubernetes/fake/clientset_generated.go | 7 - kubernetes/fake/register.go | 2 - kubernetes/scheme/register.go | 2 - .../networking/v1alpha1/clustercidrconfig.go | 243 ----------------- kubernetes/typed/networking/v1alpha1/doc.go | 20 -- .../typed/networking/v1alpha1/fake/doc.go | 20 -- .../v1alpha1/fake/fake_clustercidrconfig.go | 179 ------------ .../v1alpha1/fake/fake_networking_client.go | 40 --- .../v1alpha1/generated_expansion.go | 21 -- .../networking/v1alpha1/networking_client.go | 107 -------- .../networking/v1alpha1/clustercidrconfig.go | 68 ----- .../v1alpha1/expansion_generated.go | 23 -- 26 files changed, 8 insertions(+), 1447 deletions(-) delete mode 100644 applyconfigurations/meta/v1/listmeta.go delete mode 100644 applyconfigurations/networking/v1alpha1/cidrconfig.go delete mode 100644 applyconfigurations/networking/v1alpha1/clustercidrconfig.go delete mode 100644 applyconfigurations/networking/v1alpha1/clustercidrconfigspec.go delete mode 100644 applyconfigurations/networking/v1alpha1/clustercidrconfigstatus.go delete mode 100644 informers/networking/v1alpha1/clustercidrconfig.go delete mode 100644 informers/networking/v1alpha1/interface.go delete mode 100644 kubernetes/typed/networking/v1alpha1/clustercidrconfig.go delete mode 100644 kubernetes/typed/networking/v1alpha1/doc.go delete mode 100644 kubernetes/typed/networking/v1alpha1/fake/doc.go delete mode 100644 kubernetes/typed/networking/v1alpha1/fake/fake_clustercidrconfig.go delete mode 100644 kubernetes/typed/networking/v1alpha1/fake/fake_networking_client.go delete mode 100644 kubernetes/typed/networking/v1alpha1/generated_expansion.go delete mode 100644 kubernetes/typed/networking/v1alpha1/networking_client.go delete mode 100644 listers/networking/v1alpha1/clustercidrconfig.go delete mode 100644 listers/networking/v1alpha1/expansion_generated.go diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index 2a1e9af84..f8e9eec8f 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -9519,57 +9519,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: number type: scalar: numeric -- name: io.k8s.api.networking.v1alpha1.ClusterCIDRConfig - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.networking.v1alpha1.ClusterCIDRConfigSpec - default: {} - - name: status - type: - namedType: io.k8s.api.networking.v1alpha1.ClusterCIDRConfigStatus - default: {} -- name: io.k8s.api.networking.v1alpha1.ClusterCIDRConfigSpec - map: - fields: - - name: ipv4CIDR - type: - scalar: string - default: "" - - name: ipv6CIDR - type: - scalar: string - default: "" - - name: nodeSelector - type: - namedType: io.k8s.api.core.v1.NodeSelector - - name: perNodeHostBits - type: - scalar: numeric - default: 0 -- name: io.k8s.api.networking.v1alpha1.ClusterCIDRConfigStatus - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable - name: io.k8s.api.networking.v1beta1.HTTPIngressPath map: fields: diff --git a/applyconfigurations/meta/v1/listmeta.go b/applyconfigurations/meta/v1/listmeta.go deleted file mode 100644 index 5cadee335..000000000 --- a/applyconfigurations/meta/v1/listmeta.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -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 applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ListMetaApplyConfiguration represents an declarative configuration of the ListMeta type for use -// with apply. -type ListMetaApplyConfiguration struct { - SelfLink *string `json:"selfLink,omitempty"` - ResourceVersion *string `json:"resourceVersion,omitempty"` - Continue *string `json:"continue,omitempty"` - RemainingItemCount *int64 `json:"remainingItemCount,omitempty"` -} - -// ListMetaApplyConfiguration constructs an declarative configuration of the ListMeta type for use with -// apply. -func ListMeta() *ListMetaApplyConfiguration { - return &ListMetaApplyConfiguration{} -} - -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ListMetaApplyConfiguration) WithSelfLink(value string) *ListMetaApplyConfiguration { - b.SelfLink = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ListMetaApplyConfiguration) WithResourceVersion(value string) *ListMetaApplyConfiguration { - b.ResourceVersion = &value - return b -} - -// WithContinue sets the Continue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Continue field is set to the value of the last call. -func (b *ListMetaApplyConfiguration) WithContinue(value string) *ListMetaApplyConfiguration { - b.Continue = &value - return b -} - -// WithRemainingItemCount sets the RemainingItemCount field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RemainingItemCount field is set to the value of the last call. -func (b *ListMetaApplyConfiguration) WithRemainingItemCount(value int64) *ListMetaApplyConfiguration { - b.RemainingItemCount = &value - return b -} diff --git a/applyconfigurations/networking/v1alpha1/cidrconfig.go b/applyconfigurations/networking/v1alpha1/cidrconfig.go deleted file mode 100644 index 2f792bb44..000000000 --- a/applyconfigurations/networking/v1alpha1/cidrconfig.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// CIDRConfigApplyConfiguration represents an declarative configuration of the CIDRConfig type for use -// with apply. -type CIDRConfigApplyConfiguration struct { - CIDR *string `json:"cidr,omitempty"` - PerNodeMaskSize *int32 `json:"perNodeMaskSize,omitempty"` -} - -// CIDRConfigApplyConfiguration constructs an declarative configuration of the CIDRConfig type for use with -// apply. -func CIDRConfig() *CIDRConfigApplyConfiguration { - return &CIDRConfigApplyConfiguration{} -} - -// WithCIDR sets the CIDR field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CIDR field is set to the value of the last call. -func (b *CIDRConfigApplyConfiguration) WithCIDR(value string) *CIDRConfigApplyConfiguration { - b.CIDR = &value - return b -} - -// WithPerNodeMaskSize sets the PerNodeMaskSize field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PerNodeMaskSize field is set to the value of the last call. -func (b *CIDRConfigApplyConfiguration) WithPerNodeMaskSize(value int32) *CIDRConfigApplyConfiguration { - b.PerNodeMaskSize = &value - return b -} diff --git a/applyconfigurations/networking/v1alpha1/clustercidrconfig.go b/applyconfigurations/networking/v1alpha1/clustercidrconfig.go deleted file mode 100644 index ce7e4a720..000000000 --- a/applyconfigurations/networking/v1alpha1/clustercidrconfig.go +++ /dev/null @@ -1,256 +0,0 @@ -/* -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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ClusterCIDRConfigApplyConfiguration represents an declarative configuration of the ClusterCIDRConfig type for use -// with apply. -type ClusterCIDRConfigApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ClusterCIDRConfigSpecApplyConfiguration `json:"spec,omitempty"` - Status *networkingv1alpha1.ClusterCIDRConfigStatus `json:"status,omitempty"` -} - -// ClusterCIDRConfig constructs an declarative configuration of the ClusterCIDRConfig type for use with -// apply. -func ClusterCIDRConfig(name string) *ClusterCIDRConfigApplyConfiguration { - b := &ClusterCIDRConfigApplyConfiguration{} - b.WithName(name) - b.WithKind("ClusterCIDRConfig") - b.WithAPIVersion("networking.k8s.io/v1alpha1") - return b -} - -// ExtractClusterCIDRConfig extracts the applied configuration owned by fieldManager from -// clusterCIDRConfig. If no managedFields are found in clusterCIDRConfig for fieldManager, a -// ClusterCIDRConfigApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// clusterCIDRConfig must be a unmodified ClusterCIDRConfig API object that was retrieved from the Kubernetes API. -// ExtractClusterCIDRConfig provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -// Experimental! -func ExtractClusterCIDRConfig(clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfig, fieldManager string) (*ClusterCIDRConfigApplyConfiguration, error) { - return extractClusterCIDRConfig(clusterCIDRConfig, fieldManager, "") -} - -// ExtractClusterCIDRConfigStatus is the same as ExtractClusterCIDRConfig except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractClusterCIDRConfigStatus(clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfig, fieldManager string) (*ClusterCIDRConfigApplyConfiguration, error) { - return extractClusterCIDRConfig(clusterCIDRConfig, fieldManager, "status") -} - -func extractClusterCIDRConfig(clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfig, fieldManager string, subresource string) (*ClusterCIDRConfigApplyConfiguration, error) { - b := &ClusterCIDRConfigApplyConfiguration{} - err := managedfields.ExtractInto(clusterCIDRConfig, internal.Parser().Type("io.k8s.api.networking.v1alpha1.ClusterCIDRConfig"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(clusterCIDRConfig.Name) - - b.WithKind("ClusterCIDRConfig") - b.WithAPIVersion("networking.k8s.io/v1alpha1") - return b, nil -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ClusterCIDRConfigApplyConfiguration) WithKind(value string) *ClusterCIDRConfigApplyConfiguration { - b.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ClusterCIDRConfigApplyConfiguration) WithAPIVersion(value string) *ClusterCIDRConfigApplyConfiguration { - b.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ClusterCIDRConfigApplyConfiguration) WithName(value string) *ClusterCIDRConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ClusterCIDRConfigApplyConfiguration) WithGenerateName(value string) *ClusterCIDRConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ClusterCIDRConfigApplyConfiguration) WithNamespace(value string) *ClusterCIDRConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ClusterCIDRConfigApplyConfiguration) WithUID(value types.UID) *ClusterCIDRConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ClusterCIDRConfigApplyConfiguration) WithResourceVersion(value string) *ClusterCIDRConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ClusterCIDRConfigApplyConfiguration) WithGeneration(value int64) *ClusterCIDRConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterCIDRConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterCIDRConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterCIDRConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterCIDRConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ClusterCIDRConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterCIDRConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ClusterCIDRConfigApplyConfiguration) WithLabels(entries map[string]string) *ClusterCIDRConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ClusterCIDRConfigApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterCIDRConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterCIDRConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterCIDRConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ClusterCIDRConfigApplyConfiguration) WithFinalizers(values ...string) *ClusterCIDRConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) - } - return b -} - -func (b *ClusterCIDRConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ClusterCIDRConfigApplyConfiguration) WithSpec(value *ClusterCIDRConfigSpecApplyConfiguration) *ClusterCIDRConfigApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ClusterCIDRConfigApplyConfiguration) WithStatus(value networkingv1alpha1.ClusterCIDRConfigStatus) *ClusterCIDRConfigApplyConfiguration { - b.Status = &value - return b -} diff --git a/applyconfigurations/networking/v1alpha1/clustercidrconfigspec.go b/applyconfigurations/networking/v1alpha1/clustercidrconfigspec.go deleted file mode 100644 index 8553a9180..000000000 --- a/applyconfigurations/networking/v1alpha1/clustercidrconfigspec.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/client-go/applyconfigurations/core/v1" -) - -// ClusterCIDRConfigSpecApplyConfiguration represents an declarative configuration of the ClusterCIDRConfigSpec type for use -// with apply. -type ClusterCIDRConfigSpecApplyConfiguration struct { - NodeSelector *v1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"` - PerNodeHostBits *int32 `json:"perNodeHostBits,omitempty"` - IPv4CIDR *string `json:"ipv4CIDR,omitempty"` - IPv6CIDR *string `json:"ipv6CIDR,omitempty"` -} - -// ClusterCIDRConfigSpecApplyConfiguration constructs an declarative configuration of the ClusterCIDRConfigSpec type for use with -// apply. -func ClusterCIDRConfigSpec() *ClusterCIDRConfigSpecApplyConfiguration { - return &ClusterCIDRConfigSpecApplyConfiguration{} -} - -// WithNodeSelector sets the NodeSelector field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeSelector field is set to the value of the last call. -func (b *ClusterCIDRConfigSpecApplyConfiguration) WithNodeSelector(value *v1.NodeSelectorApplyConfiguration) *ClusterCIDRConfigSpecApplyConfiguration { - b.NodeSelector = value - return b -} - -// WithPerNodeHostBits sets the PerNodeHostBits field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PerNodeHostBits field is set to the value of the last call. -func (b *ClusterCIDRConfigSpecApplyConfiguration) WithPerNodeHostBits(value int32) *ClusterCIDRConfigSpecApplyConfiguration { - b.PerNodeHostBits = &value - return b -} - -// WithIPv4CIDR sets the IPv4CIDR field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IPv4CIDR field is set to the value of the last call. -func (b *ClusterCIDRConfigSpecApplyConfiguration) WithIPv4CIDR(value string) *ClusterCIDRConfigSpecApplyConfiguration { - b.IPv4CIDR = &value - return b -} - -// WithIPv6CIDR sets the IPv6CIDR field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IPv6CIDR field is set to the value of the last call. -func (b *ClusterCIDRConfigSpecApplyConfiguration) WithIPv6CIDR(value string) *ClusterCIDRConfigSpecApplyConfiguration { - b.IPv6CIDR = &value - return b -} diff --git a/applyconfigurations/networking/v1alpha1/clustercidrconfigstatus.go b/applyconfigurations/networking/v1alpha1/clustercidrconfigstatus.go deleted file mode 100644 index 4b0cda224..000000000 --- a/applyconfigurations/networking/v1alpha1/clustercidrconfigstatus.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ClusterCIDRConfigStatusApplyConfiguration represents an declarative configuration of the ClusterCIDRConfigStatus type for use -// with apply. -type ClusterCIDRConfigStatusApplyConfiguration struct { - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// ClusterCIDRConfigStatusApplyConfiguration constructs an declarative configuration of the ClusterCIDRConfigStatus type for use with -// apply. -func ClusterCIDRConfigStatus() *ClusterCIDRConfigStatusApplyConfiguration { - return &ClusterCIDRConfigStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ClusterCIDRConfigStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *ClusterCIDRConfigStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/applyconfigurations/utils.go b/applyconfigurations/utils.go index ae18dac02..58eda3694 100644 --- a/applyconfigurations/utils.go +++ b/applyconfigurations/utils.go @@ -46,7 +46,6 @@ import ( flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" imagepolicyv1alpha1 "k8s.io/api/imagepolicy/v1alpha1" networkingv1 "k8s.io/api/networking/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" nodev1 "k8s.io/api/node/v1" nodev1alpha1 "k8s.io/api/node/v1alpha1" @@ -92,7 +91,6 @@ import ( applyconfigurationsimagepolicyv1alpha1 "k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1" applyconfigurationsmetav1 "k8s.io/client-go/applyconfigurations/meta/v1" applyconfigurationsnetworkingv1 "k8s.io/client-go/applyconfigurations/networking/v1" - applyconfigurationsnetworkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" applyconfigurationsnetworkingv1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" applyconfigurationsnodev1 "k8s.io/client-go/applyconfigurations/node/v1" applyconfigurationsnodev1alpha1 "k8s.io/client-go/applyconfigurations/node/v1alpha1" @@ -1200,12 +1198,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { case networkingv1.SchemeGroupVersion.WithKind("ServiceBackendPort"): return &applyconfigurationsnetworkingv1.ServiceBackendPortApplyConfiguration{} - // Group=networking.k8s.io, Version=v1alpha1 - case networkingv1alpha1.SchemeGroupVersion.WithKind("ClusterCIDRConfig"): - return &applyconfigurationsnetworkingv1alpha1.ClusterCIDRConfigApplyConfiguration{} - case networkingv1alpha1.SchemeGroupVersion.WithKind("ClusterCIDRConfigSpec"): - return &applyconfigurationsnetworkingv1alpha1.ClusterCIDRConfigSpecApplyConfiguration{} - // Group=networking.k8s.io, Version=v1beta1 case networkingv1beta1.SchemeGroupVersion.WithKind("HTTPIngressPath"): return &applyconfigurationsnetworkingv1beta1.HTTPIngressPathApplyConfiguration{} diff --git a/go.mod b/go.mod index 9e71892c7..897b6e568 100644 --- a/go.mod +++ b/go.mod @@ -34,8 +34,8 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220402025220-2de699698342 - k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444 + k8s.io/api v0.0.0-20220420164651-0bf1867dde52 + k8s.io/apimachinery v0.0.0-20220331225401-97e5df2d0258 k8s.io/klog/v2 v2.60.1 k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -44,6 +44,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220402025220-2de699698342 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444 + k8s.io/api => k8s.io/api v0.0.0-20220420164651-0bf1867dde52 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220331225401-97e5df2d0258 ) diff --git a/go.sum b/go.sum index a1ac9bf50..4ec295262 100644 --- a/go.sum +++ b/go.sum @@ -628,10 +628,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220402025220-2de699698342 h1:xFpsdy7RmF2niTyB76yUyPubqMa5m9/L9sswkdyhONo= -k8s.io/api v0.0.0-20220402025220-2de699698342/go.mod h1:69QWTzqWVlGn0rU+x3dmk3WAsUQHmeQwIBWMbK1ZEyE= -k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444 h1:whQmS3GtF822OUer+LPJnMFKn6kPfuJOCM/3xUuATIY= -k8s.io/apimachinery v0.0.0-20220330050810-6550efdb7444/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/api v0.0.0-20220420164651-0bf1867dde52 h1:HPNRLBMB+2PbcBn8pXc7Hyb4iN8P1FwDNTHDpLYVdf4= +k8s.io/api v0.0.0-20220420164651-0bf1867dde52/go.mod h1:qOGElvkvG4iusrwS28JSJgPofbMSCv5PWe0AD3boQGQ= +k8s.io/apimachinery v0.0.0-20220331225401-97e5df2d0258 h1:9TgQL4ndOPmFSnQoTVN/ur/sU3RXMxaSmhMUBbflUTU= +k8s.io/apimachinery v0.0.0-20220331225401-97e5df2d0258/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= diff --git a/informers/generic.go b/informers/generic.go index 3785f1760..4c2e53c25 100644 --- a/informers/generic.go +++ b/informers/generic.go @@ -47,7 +47,6 @@ import ( flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" networkingv1 "k8s.io/api/networking/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" nodev1 "k8s.io/api/node/v1" nodev1alpha1 "k8s.io/api/node/v1alpha1" @@ -273,10 +272,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case networkingv1.SchemeGroupVersion.WithResource("networkpolicies"): return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1().NetworkPolicies().Informer()}, nil - // Group=networking.k8s.io, Version=v1alpha1 - case networkingv1alpha1.SchemeGroupVersion.WithResource("clustercidrconfigs"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha1().ClusterCIDRConfigs().Informer()}, nil - // Group=networking.k8s.io, Version=v1beta1 case networkingv1beta1.SchemeGroupVersion.WithResource("ingresses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().Ingresses().Informer()}, nil diff --git a/informers/networking/interface.go b/informers/networking/interface.go index 1c775c465..4a028d5d1 100644 --- a/informers/networking/interface.go +++ b/informers/networking/interface.go @@ -21,7 +21,6 @@ package networking import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" v1 "k8s.io/client-go/informers/networking/v1" - v1alpha1 "k8s.io/client-go/informers/networking/v1alpha1" v1beta1 "k8s.io/client-go/informers/networking/v1beta1" ) @@ -29,8 +28,6 @@ import ( type Interface interface { // V1 provides access to shared informers for resources in V1. V1() v1.Interface - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface } @@ -51,11 +48,6 @@ func (g *group) V1() v1.Interface { return v1.New(g.factory, g.namespace, g.tweakListOptions) } -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} - // V1beta1 returns a new v1beta1.Interface. func (g *group) V1beta1() v1beta1.Interface { return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) diff --git a/informers/networking/v1alpha1/clustercidrconfig.go b/informers/networking/v1alpha1/clustercidrconfig.go deleted file mode 100644 index 9e3e774c1..000000000 --- a/informers/networking/v1alpha1/clustercidrconfig.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -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 v1alpha1 - -import ( - "context" - time "time" - - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" - 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" - v1alpha1 "k8s.io/client-go/listers/networking/v1alpha1" - cache "k8s.io/client-go/tools/cache" -) - -// ClusterCIDRConfigInformer provides access to a shared informer and lister for -// ClusterCIDRConfigs. -type ClusterCIDRConfigInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.ClusterCIDRConfigLister -} - -type clusterCIDRConfigInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewClusterCIDRConfigInformer constructs a new informer for ClusterCIDRConfig 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 NewClusterCIDRConfigInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredClusterCIDRConfigInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredClusterCIDRConfigInformer constructs a new informer for ClusterCIDRConfig 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 NewFilteredClusterCIDRConfigInformer(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.NetworkingV1alpha1().ClusterCIDRConfigs().List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.NetworkingV1alpha1().ClusterCIDRConfigs().Watch(context.TODO(), options) - }, - }, - &networkingv1alpha1.ClusterCIDRConfig{}, - resyncPeriod, - indexers, - ) -} - -func (f *clusterCIDRConfigInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredClusterCIDRConfigInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *clusterCIDRConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&networkingv1alpha1.ClusterCIDRConfig{}, f.defaultInformer) -} - -func (f *clusterCIDRConfigInformer) Lister() v1alpha1.ClusterCIDRConfigLister { - return v1alpha1.NewClusterCIDRConfigLister(f.Informer().GetIndexer()) -} diff --git a/informers/networking/v1alpha1/interface.go b/informers/networking/v1alpha1/interface.go deleted file mode 100644 index da6eae1d9..000000000 --- a/informers/networking/v1alpha1/interface.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -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 v1alpha1 - -import ( - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // ClusterCIDRConfigs returns a ClusterCIDRConfigInformer. - ClusterCIDRConfigs() ClusterCIDRConfigInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// ClusterCIDRConfigs returns a ClusterCIDRConfigInformer. -func (v *version) ClusterCIDRConfigs() ClusterCIDRConfigInformer { - return &clusterCIDRConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} diff --git a/kubernetes/clientset.go b/kubernetes/clientset.go index 0ea0c3c4c..e46c0537f 100644 --- a/kubernetes/clientset.go +++ b/kubernetes/clientset.go @@ -53,7 +53,6 @@ import ( flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" flowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1" - networkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" nodev1 "k8s.io/client-go/kubernetes/typed/node/v1" nodev1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1" @@ -105,7 +104,6 @@ type Interface interface { FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface NetworkingV1() networkingv1.NetworkingV1Interface - NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface NodeV1() nodev1.NodeV1Interface NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface @@ -157,7 +155,6 @@ type Clientset struct { flowcontrolV1beta1 *flowcontrolv1beta1.FlowcontrolV1beta1Client flowcontrolV1beta2 *flowcontrolv1beta2.FlowcontrolV1beta2Client networkingV1 *networkingv1.NetworkingV1Client - networkingV1alpha1 *networkingv1alpha1.NetworkingV1alpha1Client networkingV1beta1 *networkingv1beta1.NetworkingV1beta1Client nodeV1 *nodev1.NodeV1Client nodeV1alpha1 *nodev1alpha1.NodeV1alpha1Client @@ -325,11 +322,6 @@ func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface { return c.networkingV1 } -// NetworkingV1alpha1 retrieves the NetworkingV1alpha1Client -func (c *Clientset) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { - return c.networkingV1alpha1 -} - // NetworkingV1beta1 retrieves the NetworkingV1beta1Client func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { return c.networkingV1beta1 @@ -569,10 +561,6 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - cs.networkingV1alpha1, err = networkingv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } cs.networkingV1beta1, err = networkingv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -684,7 +672,6 @@ func New(c rest.Interface) *Clientset { cs.flowcontrolV1beta1 = flowcontrolv1beta1.New(c) cs.flowcontrolV1beta2 = flowcontrolv1beta2.New(c) cs.networkingV1 = networkingv1.New(c) - cs.networkingV1alpha1 = networkingv1alpha1.New(c) cs.networkingV1beta1 = networkingv1beta1.New(c) cs.nodeV1 = nodev1.New(c) cs.nodeV1alpha1 = nodev1alpha1.New(c) diff --git a/kubernetes/fake/clientset_generated.go b/kubernetes/fake/clientset_generated.go index 3e468bf90..9ab84ff5d 100644 --- a/kubernetes/fake/clientset_generated.go +++ b/kubernetes/fake/clientset_generated.go @@ -84,8 +84,6 @@ import ( fakeflowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake" networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1" fakenetworkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1/fake" - networkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - fakenetworkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1/fake" networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" fakenetworkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake" nodev1 "k8s.io/client-go/kubernetes/typed/node/v1" @@ -319,11 +317,6 @@ func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface { return &fakenetworkingv1.FakeNetworkingV1{Fake: &c.Fake} } -// NetworkingV1alpha1 retrieves the NetworkingV1alpha1Client -func (c *Clientset) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { - return &fakenetworkingv1alpha1.FakeNetworkingV1alpha1{Fake: &c.Fake} -} - // NetworkingV1beta1 retrieves the NetworkingV1beta1Client func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { return &fakenetworkingv1beta1.FakeNetworkingV1beta1{Fake: &c.Fake} diff --git a/kubernetes/fake/register.go b/kubernetes/fake/register.go index 95c6b74d8..c3f0a3d52 100644 --- a/kubernetes/fake/register.go +++ b/kubernetes/fake/register.go @@ -49,7 +49,6 @@ import ( flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" networkingv1 "k8s.io/api/networking/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" nodev1 "k8s.io/api/node/v1" nodev1alpha1 "k8s.io/api/node/v1alpha1" @@ -106,7 +105,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{ flowcontrolv1beta1.AddToScheme, flowcontrolv1beta2.AddToScheme, networkingv1.AddToScheme, - networkingv1alpha1.AddToScheme, networkingv1beta1.AddToScheme, nodev1.AddToScheme, nodev1alpha1.AddToScheme, diff --git a/kubernetes/scheme/register.go b/kubernetes/scheme/register.go index b4eaeccd0..b41466151 100644 --- a/kubernetes/scheme/register.go +++ b/kubernetes/scheme/register.go @@ -49,7 +49,6 @@ import ( flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" networkingv1 "k8s.io/api/networking/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" nodev1 "k8s.io/api/node/v1" nodev1alpha1 "k8s.io/api/node/v1alpha1" @@ -106,7 +105,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{ flowcontrolv1beta1.AddToScheme, flowcontrolv1beta2.AddToScheme, networkingv1.AddToScheme, - networkingv1alpha1.AddToScheme, networkingv1beta1.AddToScheme, nodev1.AddToScheme, nodev1alpha1.AddToScheme, diff --git a/kubernetes/typed/networking/v1alpha1/clustercidrconfig.go b/kubernetes/typed/networking/v1alpha1/clustercidrconfig.go deleted file mode 100644 index 5dea6c42c..000000000 --- a/kubernetes/typed/networking/v1alpha1/clustercidrconfig.go +++ /dev/null @@ -1,243 +0,0 @@ -/* -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 client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - json "encoding/json" - "fmt" - "time" - - v1alpha1 "k8s.io/api/networking/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - networkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" - scheme "k8s.io/client-go/kubernetes/scheme" - rest "k8s.io/client-go/rest" -) - -// ClusterCIDRConfigsGetter has a method to return a ClusterCIDRConfigInterface. -// A group's client should implement this interface. -type ClusterCIDRConfigsGetter interface { - ClusterCIDRConfigs() ClusterCIDRConfigInterface -} - -// ClusterCIDRConfigInterface has methods to work with ClusterCIDRConfig resources. -type ClusterCIDRConfigInterface interface { - Create(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.CreateOptions) (*v1alpha1.ClusterCIDRConfig, error) - Update(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (*v1alpha1.ClusterCIDRConfig, error) - UpdateStatus(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (*v1alpha1.ClusterCIDRConfig, 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.ClusterCIDRConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ClusterCIDRConfigList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterCIDRConfig, err error) - Apply(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) - ApplyStatus(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) - ClusterCIDRConfigExpansion -} - -// clusterCIDRConfigs implements ClusterCIDRConfigInterface -type clusterCIDRConfigs struct { - client rest.Interface -} - -// newClusterCIDRConfigs returns a ClusterCIDRConfigs -func newClusterCIDRConfigs(c *NetworkingV1alpha1Client) *clusterCIDRConfigs { - return &clusterCIDRConfigs{ - client: c.RESTClient(), - } -} - -// Get takes name of the clusterCIDRConfig, and returns the corresponding clusterCIDRConfig object, and an error if there is any. -func (c *clusterCIDRConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { - result = &v1alpha1.ClusterCIDRConfig{} - err = c.client.Get(). - Resource("clustercidrconfigs"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ClusterCIDRConfigs that match those selectors. -func (c *clusterCIDRConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterCIDRConfigList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.ClusterCIDRConfigList{} - err = c.client.Get(). - Resource("clustercidrconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested clusterCIDRConfigs. -func (c *clusterCIDRConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("clustercidrconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a clusterCIDRConfig and creates it. Returns the server's representation of the clusterCIDRConfig, and an error, if there is any. -func (c *clusterCIDRConfigs) Create(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.CreateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { - result = &v1alpha1.ClusterCIDRConfig{} - err = c.client.Post(). - Resource("clustercidrconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(clusterCIDRConfig). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a clusterCIDRConfig and updates it. Returns the server's representation of the clusterCIDRConfig, and an error, if there is any. -func (c *clusterCIDRConfigs) Update(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { - result = &v1alpha1.ClusterCIDRConfig{} - err = c.client.Put(). - Resource("clustercidrconfigs"). - Name(clusterCIDRConfig.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(clusterCIDRConfig). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *clusterCIDRConfigs) UpdateStatus(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { - result = &v1alpha1.ClusterCIDRConfig{} - err = c.client.Put(). - Resource("clustercidrconfigs"). - Name(clusterCIDRConfig.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(clusterCIDRConfig). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the clusterCIDRConfig and deletes it. Returns an error if one occurs. -func (c *clusterCIDRConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("clustercidrconfigs"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *clusterCIDRConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("clustercidrconfigs"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched clusterCIDRConfig. -func (c *clusterCIDRConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterCIDRConfig, err error) { - result = &v1alpha1.ClusterCIDRConfig{} - err = c.client.Patch(pt). - Resource("clustercidrconfigs"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied clusterCIDRConfig. -func (c *clusterCIDRConfigs) Apply(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { - if clusterCIDRConfig == nil { - return nil, fmt.Errorf("clusterCIDRConfig provided to Apply must not be nil") - } - patchOpts := opts.ToPatchOptions() - data, err := json.Marshal(clusterCIDRConfig) - if err != nil { - return nil, err - } - name := clusterCIDRConfig.Name - if name == nil { - return nil, fmt.Errorf("clusterCIDRConfig.Name must be provided to Apply") - } - result = &v1alpha1.ClusterCIDRConfig{} - err = c.client.Patch(types.ApplyPatchType). - Resource("clustercidrconfigs"). - Name(*name). - VersionedParams(&patchOpts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *clusterCIDRConfigs) ApplyStatus(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { - if clusterCIDRConfig == nil { - return nil, fmt.Errorf("clusterCIDRConfig provided to Apply must not be nil") - } - patchOpts := opts.ToPatchOptions() - data, err := json.Marshal(clusterCIDRConfig) - if err != nil { - return nil, err - } - - name := clusterCIDRConfig.Name - if name == nil { - return nil, fmt.Errorf("clusterCIDRConfig.Name must be provided to Apply") - } - - result = &v1alpha1.ClusterCIDRConfig{} - err = c.client.Patch(types.ApplyPatchType). - Resource("clustercidrconfigs"). - Name(*name). - SubResource("status"). - VersionedParams(&patchOpts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/kubernetes/typed/networking/v1alpha1/doc.go b/kubernetes/typed/networking/v1alpha1/doc.go deleted file mode 100644 index df51baa4d..000000000 --- a/kubernetes/typed/networking/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -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 client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/kubernetes/typed/networking/v1alpha1/fake/doc.go b/kubernetes/typed/networking/v1alpha1/fake/doc.go deleted file mode 100644 index 16f443990..000000000 --- a/kubernetes/typed/networking/v1alpha1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -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 client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/kubernetes/typed/networking/v1alpha1/fake/fake_clustercidrconfig.go b/kubernetes/typed/networking/v1alpha1/fake/fake_clustercidrconfig.go deleted file mode 100644 index 5efeec7c8..000000000 --- a/kubernetes/typed/networking/v1alpha1/fake/fake_clustercidrconfig.go +++ /dev/null @@ -1,179 +0,0 @@ -/* -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 client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - json "encoding/json" - "fmt" - - v1alpha1 "k8s.io/api/networking/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - networkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" - testing "k8s.io/client-go/testing" -) - -// FakeClusterCIDRConfigs implements ClusterCIDRConfigInterface -type FakeClusterCIDRConfigs struct { - Fake *FakeNetworkingV1alpha1 -} - -var clustercidrconfigsResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1alpha1", Resource: "clustercidrconfigs"} - -var clustercidrconfigsKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1alpha1", Kind: "ClusterCIDRConfig"} - -// Get takes name of the clusterCIDRConfig, and returns the corresponding clusterCIDRConfig object, and an error if there is any. -func (c *FakeClusterCIDRConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(clustercidrconfigsResource, name), &v1alpha1.ClusterCIDRConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ClusterCIDRConfig), err -} - -// List takes label and field selectors, and returns the list of ClusterCIDRConfigs that match those selectors. -func (c *FakeClusterCIDRConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterCIDRConfigList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(clustercidrconfigsResource, clustercidrconfigsKind, opts), &v1alpha1.ClusterCIDRConfigList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.ClusterCIDRConfigList{ListMeta: obj.(*v1alpha1.ClusterCIDRConfigList).ListMeta} - for _, item := range obj.(*v1alpha1.ClusterCIDRConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested clusterCIDRConfigs. -func (c *FakeClusterCIDRConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(clustercidrconfigsResource, opts)) -} - -// Create takes the representation of a clusterCIDRConfig and creates it. Returns the server's representation of the clusterCIDRConfig, and an error, if there is any. -func (c *FakeClusterCIDRConfigs) Create(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.CreateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(clustercidrconfigsResource, clusterCIDRConfig), &v1alpha1.ClusterCIDRConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ClusterCIDRConfig), err -} - -// Update takes the representation of a clusterCIDRConfig and updates it. Returns the server's representation of the clusterCIDRConfig, and an error, if there is any. -func (c *FakeClusterCIDRConfigs) Update(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(clustercidrconfigsResource, clusterCIDRConfig), &v1alpha1.ClusterCIDRConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ClusterCIDRConfig), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeClusterCIDRConfigs) UpdateStatus(ctx context.Context, clusterCIDRConfig *v1alpha1.ClusterCIDRConfig, opts v1.UpdateOptions) (*v1alpha1.ClusterCIDRConfig, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(clustercidrconfigsResource, "status", clusterCIDRConfig), &v1alpha1.ClusterCIDRConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ClusterCIDRConfig), err -} - -// Delete takes name of the clusterCIDRConfig and deletes it. Returns an error if one occurs. -func (c *FakeClusterCIDRConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(clustercidrconfigsResource, name, opts), &v1alpha1.ClusterCIDRConfig{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeClusterCIDRConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(clustercidrconfigsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.ClusterCIDRConfigList{}) - return err -} - -// Patch applies the patch and returns the patched clusterCIDRConfig. -func (c *FakeClusterCIDRConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterCIDRConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clustercidrconfigsResource, name, pt, data, subresources...), &v1alpha1.ClusterCIDRConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ClusterCIDRConfig), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied clusterCIDRConfig. -func (c *FakeClusterCIDRConfigs) Apply(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { - if clusterCIDRConfig == nil { - return nil, fmt.Errorf("clusterCIDRConfig provided to Apply must not be nil") - } - data, err := json.Marshal(clusterCIDRConfig) - if err != nil { - return nil, err - } - name := clusterCIDRConfig.Name - if name == nil { - return nil, fmt.Errorf("clusterCIDRConfig.Name must be provided to Apply") - } - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clustercidrconfigsResource, *name, types.ApplyPatchType, data), &v1alpha1.ClusterCIDRConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ClusterCIDRConfig), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeClusterCIDRConfigs) ApplyStatus(ctx context.Context, clusterCIDRConfig *networkingv1alpha1.ClusterCIDRConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDRConfig, err error) { - if clusterCIDRConfig == nil { - return nil, fmt.Errorf("clusterCIDRConfig provided to Apply must not be nil") - } - data, err := json.Marshal(clusterCIDRConfig) - if err != nil { - return nil, err - } - name := clusterCIDRConfig.Name - if name == nil { - return nil, fmt.Errorf("clusterCIDRConfig.Name must be provided to Apply") - } - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clustercidrconfigsResource, *name, types.ApplyPatchType, data, "status"), &v1alpha1.ClusterCIDRConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ClusterCIDRConfig), err -} diff --git a/kubernetes/typed/networking/v1alpha1/fake/fake_networking_client.go b/kubernetes/typed/networking/v1alpha1/fake/fake_networking_client.go deleted file mode 100644 index af0f79a0a..000000000 --- a/kubernetes/typed/networking/v1alpha1/fake/fake_networking_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -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 client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeNetworkingV1alpha1 struct { - *testing.Fake -} - -func (c *FakeNetworkingV1alpha1) ClusterCIDRConfigs() v1alpha1.ClusterCIDRConfigInterface { - return &FakeClusterCIDRConfigs{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeNetworkingV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/kubernetes/typed/networking/v1alpha1/generated_expansion.go b/kubernetes/typed/networking/v1alpha1/generated_expansion.go deleted file mode 100644 index a5941b79a..000000000 --- a/kubernetes/typed/networking/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -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 client-gen. DO NOT EDIT. - -package v1alpha1 - -type ClusterCIDRConfigExpansion interface{} diff --git a/kubernetes/typed/networking/v1alpha1/networking_client.go b/kubernetes/typed/networking/v1alpha1/networking_client.go deleted file mode 100644 index d76ca2283..000000000 --- a/kubernetes/typed/networking/v1alpha1/networking_client.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -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 client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "net/http" - - v1alpha1 "k8s.io/api/networking/v1alpha1" - "k8s.io/client-go/kubernetes/scheme" - rest "k8s.io/client-go/rest" -) - -type NetworkingV1alpha1Interface interface { - RESTClient() rest.Interface - ClusterCIDRConfigsGetter -} - -// NetworkingV1alpha1Client is used to interact with features provided by the networking.k8s.io group. -type NetworkingV1alpha1Client struct { - restClient rest.Interface -} - -func (c *NetworkingV1alpha1Client) ClusterCIDRConfigs() ClusterCIDRConfigInterface { - return newClusterCIDRConfigs(c) -} - -// NewForConfig creates a new NetworkingV1alpha1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*NetworkingV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new NetworkingV1alpha1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*NetworkingV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &NetworkingV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new NetworkingV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *NetworkingV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new NetworkingV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *NetworkingV1alpha1Client { - return &NetworkingV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *NetworkingV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/listers/networking/v1alpha1/clustercidrconfig.go b/listers/networking/v1alpha1/clustercidrconfig.go deleted file mode 100644 index c1811f799..000000000 --- a/listers/networking/v1alpha1/clustercidrconfig.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -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 lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "k8s.io/api/networking/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// ClusterCIDRConfigLister helps list ClusterCIDRConfigs. -// All objects returned here must be treated as read-only. -type ClusterCIDRConfigLister interface { - // List lists all ClusterCIDRConfigs in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.ClusterCIDRConfig, err error) - // Get retrieves the ClusterCIDRConfig from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.ClusterCIDRConfig, error) - ClusterCIDRConfigListerExpansion -} - -// clusterCIDRConfigLister implements the ClusterCIDRConfigLister interface. -type clusterCIDRConfigLister struct { - indexer cache.Indexer -} - -// NewClusterCIDRConfigLister returns a new ClusterCIDRConfigLister. -func NewClusterCIDRConfigLister(indexer cache.Indexer) ClusterCIDRConfigLister { - return &clusterCIDRConfigLister{indexer: indexer} -} - -// List lists all ClusterCIDRConfigs in the indexer. -func (s *clusterCIDRConfigLister) List(selector labels.Selector) (ret []*v1alpha1.ClusterCIDRConfig, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.ClusterCIDRConfig)) - }) - return ret, err -} - -// Get retrieves the ClusterCIDRConfig from the index for a given name. -func (s *clusterCIDRConfigLister) Get(name string) (*v1alpha1.ClusterCIDRConfig, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("clustercidrconfig"), name) - } - return obj.(*v1alpha1.ClusterCIDRConfig), nil -} diff --git a/listers/networking/v1alpha1/expansion_generated.go b/listers/networking/v1alpha1/expansion_generated.go deleted file mode 100644 index 713990188..000000000 --- a/listers/networking/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -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 lister-gen. DO NOT EDIT. - -package v1alpha1 - -// ClusterCIDRConfigListerExpansion allows custom methods to be added to -// ClusterCIDRConfigLister. -type ClusterCIDRConfigListerExpansion interface{} From cab7ba1d4a523956b6395dcbe38620159ac43fef Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Tue, 3 May 2022 22:41:04 +0000 Subject: [PATCH 111/111] Update dependencies to v0.24.0 tag --- go.mod | 8 ++++---- go.sum | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 897b6e568..5c93f3de6 100644 --- a/go.mod +++ b/go.mod @@ -34,8 +34,8 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.27.1 - k8s.io/api v0.0.0-20220420164651-0bf1867dde52 - k8s.io/apimachinery v0.0.0-20220331225401-97e5df2d0258 + k8s.io/api v0.24.0 + k8s.io/apimachinery v0.24.0 k8s.io/klog/v2 v2.60.1 k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 @@ -44,6 +44,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220420164651-0bf1867dde52 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220331225401-97e5df2d0258 + k8s.io/api => k8s.io/api v0.24.0 + k8s.io/apimachinery => k8s.io/apimachinery v0.24.0 ) diff --git a/go.sum b/go.sum index 4ec295262..cdcb5219e 100644 --- a/go.sum +++ b/go.sum @@ -628,10 +628,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220420164651-0bf1867dde52 h1:HPNRLBMB+2PbcBn8pXc7Hyb4iN8P1FwDNTHDpLYVdf4= -k8s.io/api v0.0.0-20220420164651-0bf1867dde52/go.mod h1:qOGElvkvG4iusrwS28JSJgPofbMSCv5PWe0AD3boQGQ= -k8s.io/apimachinery v0.0.0-20220331225401-97e5df2d0258 h1:9TgQL4ndOPmFSnQoTVN/ur/sU3RXMxaSmhMUBbflUTU= -k8s.io/apimachinery v0.0.0-20220331225401-97e5df2d0258/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/api v0.24.0 h1:J0hann2hfxWr1hinZIDefw7Q96wmCBx6SSB8IY0MdDg= +k8s.io/api v0.24.0/go.mod h1:5Jl90IUrJHUJYEMANRURMiVvJ0g7Ax7r3R1bqO8zx8I= +k8s.io/apimachinery v0.24.0 h1:ydFCyC/DjCvFCHK5OPMKBlxayQytB8pxy8YQInd5UyQ= +k8s.io/apimachinery v0.24.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=