From 41ee6a3e44d70e0b0be1ec973960c3137831b5ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Thu, 13 Jan 2022 10:51:52 +0100 Subject: [PATCH 01/16] Remove selflink integration tests --- .../test/integration/basic_test.go | 52 --------------- .../test/integration/subresources_test.go | 9 --- .../integration/apiserver/apply/apply_test.go | 9 +-- test/integration/client/client_test.go | 64 ------------------- 4 files changed, 1 insertion(+), 133 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/test/integration/basic_test.go b/staging/src/k8s.io/apiextensions-apiserver/test/integration/basic_test.go index 66fca6a47a88..382a8e5dbb6e 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/test/integration/basic_test.go +++ b/staging/src/k8s.io/apiextensions-apiserver/test/integration/basic_test.go @@ -35,10 +35,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" - "k8s.io/apiserver/pkg/features" - utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/dynamic" - featuregatetesting "k8s.io/component-base/featuregate/testing" ) func TestServerUp(t *testing.T) { @@ -626,55 +623,6 @@ func TestSameNameDiffNamespace(t *testing.T) { } -func TestSelfLink(t *testing.T) { - defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.RemoveSelfLink, false)() - - tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) - if err != nil { - t.Fatal(err) - } - defer tearDown() - - // namespace scoped - noxuDefinition := fixtures.NewNoxuV1CustomResourceDefinition(apiextensionsv1.NamespaceScoped) - noxuDefinition, err = fixtures.CreateNewV1CustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) - if err != nil { - t.Fatal(err) - } - - ns := "not-the-default" - noxuNamespacedResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) - - noxuInstanceToCreate := fixtures.NewNoxuInstance(ns, "foo") - createdNoxuInstance, err := noxuNamespacedResourceClient.Create(context.TODO(), noxuInstanceToCreate, metav1.CreateOptions{}) - if err != nil { - t.Fatal(err) - } - - if e, a := "/apis/mygroup.example.com/v1beta1/namespaces/not-the-default/noxus/foo", createdNoxuInstance.GetSelfLink(); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - // cluster scoped - curletDefinition := fixtures.NewCurletV1CustomResourceDefinition(apiextensionsv1.ClusterScoped) - curletDefinition, err = fixtures.CreateNewV1CustomResourceDefinition(curletDefinition, apiExtensionClient, dynamicClient) - if err != nil { - t.Fatal(err) - } - - curletResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, curletDefinition) - - curletInstanceToCreate := fixtures.NewCurletInstance(ns, "foo") - createdCurletInstance, err := curletResourceClient.Create(context.TODO(), curletInstanceToCreate, metav1.CreateOptions{}) - if err != nil { - t.Fatal(err) - } - - if e, a := "/apis/mygroup.example.com/v1beta1/curlets/foo", createdCurletInstance.GetSelfLink(); e != a { - t.Errorf("expected %v, got %v", e, a) - } -} - func TestPreserveInt(t *testing.T) { tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { diff --git a/staging/src/k8s.io/apiextensions-apiserver/test/integration/subresources_test.go b/staging/src/k8s.io/apiextensions-apiserver/test/integration/subresources_test.go index b773100038f5..c67f6985187f 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/test/integration/subresources_test.go +++ b/staging/src/k8s.io/apiextensions-apiserver/test/integration/subresources_test.go @@ -32,7 +32,6 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" - "k8s.io/apiserver/pkg/features" genericfeatures "k8s.io/apiserver/pkg/features" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/dynamic" @@ -330,14 +329,6 @@ func TestScaleSubresource(t *testing.T) { t.Fatalf("Scale.Status.Selector: expected: %v, got: %v", "bar", gottenScale.Status.Selector) } - if !utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) { - // check self link - expectedSelfLink := fmt.Sprintf("/apis/mygroup.example.com/%s/namespaces/not-the-default/noxus/foo/scale", v.Name) - if gottenScale.GetSelfLink() != expectedSelfLink { - t.Fatalf("Scale.Metadata.SelfLink: expected: %v, got: %v", expectedSelfLink, gottenScale.GetSelfLink()) - } - } - // update the scale object // check that spec is updated, but status is not gottenScale.Spec.Replicas = 5 diff --git a/test/integration/apiserver/apply/apply_test.go b/test/integration/apiserver/apply/apply_test.go index aec9e9ea1386..aa1c431ceee2 100644 --- a/test/integration/apiserver/apply/apply_test.go +++ b/test/integration/apiserver/apply/apply_test.go @@ -682,16 +682,10 @@ func TestApplyManagedFields(t *testing.T) { t.Fatalf("Failed to marshal object: %v", err) } - selfLink := "" - if !utilfeature.DefaultFeatureGate.Enabled(genericfeatures.RemoveSelfLink) { - selfLink = ` - "selfLink": "` + accessor.GetSelfLink() + `",` - } - expected := []byte(`{ "metadata": { "name": "test-cm", - "namespace": "default",` + selfLink + ` + "namespace": "default", "uid": "` + string(accessor.GetUID()) + `", "resourceVersion": "` + accessor.GetResourceVersion() + `", "creationTimestamp": "` + accessor.GetCreationTimestamp().UTC().Format(time.RFC3339) + `", @@ -2565,7 +2559,6 @@ func benchAll(b *testing.B, client kubernetes.Interface, pod v1.Pod) { pod.ObjectMeta.CreationTimestamp = metav1.Time{} pod.ObjectMeta.ResourceVersion = "" pod.ObjectMeta.UID = "" - pod.ObjectMeta.SelfLink = "" // Create pod for repeated-updates pod.Name = "repeated-pod" diff --git a/test/integration/client/client_test.go b/test/integration/client/client_test.go index 537447d6a475..821622e8a3df 100644 --- a/test/integration/client/client_test.go +++ b/test/integration/client/client_test.go @@ -42,13 +42,10 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" - "k8s.io/apiserver/pkg/features" - utilfeature "k8s.io/apiserver/pkg/util/feature" appsv1ac "k8s.io/client-go/applyconfigurations/apps/v1" corev1ac "k8s.io/client-go/applyconfigurations/core/v1" metav1ac "k8s.io/client-go/applyconfigurations/meta/v1" clientset "k8s.io/client-go/kubernetes" - featuregatetesting "k8s.io/component-base/featuregate/testing" "k8s.io/component-base/version" kubeapiservertesting "k8s.io/kubernetes/cmd/kube-apiserver/app/testing" @@ -969,67 +966,6 @@ func TestMultiWatch(t *testing.T) { t.Errorf("durations: %v", dur) } -func runSelfLinkTestOnNamespace(t *testing.T, c clientset.Interface, namespace string) { - podBody := v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "selflinktest", - Namespace: namespace, - Labels: map[string]string{ - "name": "selflinktest", - }, - }, - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Name: "name", Image: "image"}, - }, - }, - } - pod, err := c.CoreV1().Pods(namespace).Create(context.TODO(), &podBody, metav1.CreateOptions{}) - if err != nil { - t.Fatalf("Failed creating selflinktest pod: %v", err) - } - if err = c.CoreV1().RESTClient().Get().RequestURI(pod.SelfLink).Do(context.TODO()).Into(pod); err != nil { - t.Errorf("Failed listing pod with supplied self link '%v': %v", pod.SelfLink, err) - } - - podList, err := c.CoreV1().Pods(namespace).List(context.TODO(), metav1.ListOptions{}) - if err != nil { - t.Errorf("Failed listing pods: %v", err) - } - - if err = c.CoreV1().RESTClient().Get().RequestURI(podList.SelfLink).Do(context.TODO()).Into(podList); err != nil { - t.Errorf("Failed listing pods with supplied self link '%v': %v", podList.SelfLink, err) - } - - found := false - for i := range podList.Items { - item := &podList.Items[i] - if item.Name != "selflinktest" { - continue - } - found = true - err = c.CoreV1().RESTClient().Get().RequestURI(item.SelfLink).Do(context.TODO()).Into(pod) - if err != nil { - t.Errorf("Failed listing pod with supplied self link '%v': %v", item.SelfLink, err) - } - break - } - if !found { - t.Errorf("never found selflinktest pod in namespace %s", namespace) - } -} - -func TestSelfLinkOnNamespace(t *testing.T) { - defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.RemoveSelfLink, false)() - - result := kubeapiservertesting.StartTestServerOrDie(t, nil, []string{"--disable-admission-plugins", "ServiceAccount"}, framework.SharedEtcd()) - defer result.TearDownFn() - - c := clientset.NewForConfigOrDie(result.ClientConfig) - - runSelfLinkTestOnNamespace(t, c, "default") -} - func TestApplyWithApplyConfiguration(t *testing.T) { deployment := appsv1ac.Deployment("nginx-deployment-3", "default"). WithSpec(appsv1ac.DeploymentSpec(). From 8b758fb3b999e675d487158706b97f730fe1d054 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 02/16] Remove selflink references in api tests --- pkg/api/testing/deep_copy_test.go | 1 - pkg/api/testing/meta_test.go | 10 ---------- pkg/api/testing/node_example.json | 1 - pkg/api/testing/replication_controller_example.json | 1 - 4 files changed, 13 deletions(-) diff --git a/pkg/api/testing/deep_copy_test.go b/pkg/api/testing/deep_copy_test.go index 06dfb3bf94b4..b3bb453e24a3 100644 --- a/pkg/api/testing/deep_copy_test.go +++ b/pkg/api/testing/deep_copy_test.go @@ -46,7 +46,6 @@ var benchmarkPod = api.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: "etcd-server-e2e-test-wojtekt-master", Namespace: "default", - SelfLink: "/api/v1/namespaces/default/pods/etcd-server-e2e-test-wojtekt-master", UID: types.UID("a671734a-e8e5-11e4-8fde-42010af09327"), ResourceVersion: "22", CreationTimestamp: parseTimeOrDie("2015-04-22T11:49:36Z"), diff --git a/pkg/api/testing/meta_test.go b/pkg/api/testing/meta_test.go index 384ad2906f27..d59c06c983ea 100644 --- a/pkg/api/testing/meta_test.go +++ b/pkg/api/testing/meta_test.go @@ -56,11 +56,6 @@ func TestAccessorImplementations(t *testing.T) { t.Errorf("%v (%v) did not preserve resource version", gv.WithKind(kind), knownType) continue } - m.SetSelfLink("102030") - if m.GetSelfLink() != "102030" { - t.Errorf("%v (%v) did not preserve self link", gv.WithKind(kind), knownType) - continue - } case isOM: m := om.GetObjectMeta() if m == nil { @@ -72,11 +67,6 @@ func TestAccessorImplementations(t *testing.T) { t.Errorf("%v (%v) did not preserve resource version", gv.WithKind(kind), knownType) continue } - m.SetSelfLink("102030") - if m.GetSelfLink() != "102030" { - t.Errorf("%v (%v) did not preserve self link", gv.WithKind(kind), knownType) - continue - } labels := map[string]string{"a": "b"} m.SetLabels(labels) if !reflect.DeepEqual(m.GetLabels(), labels) { diff --git a/pkg/api/testing/node_example.json b/pkg/api/testing/node_example.json index ea249cb78541..6e32f3d6d501 100644 --- a/pkg/api/testing/node_example.json +++ b/pkg/api/testing/node_example.json @@ -3,7 +3,6 @@ "apiVersion": "v1", "metadata": { "name": "e2e-test-wojtekt-node-etd6", - "selfLink": "/api/v1/nodes/e2e-test-wojtekt-node-etd6", "uid": "a7e89222-e8e5-11e4-8fde-42010af09327", "resourceVersion": "379", "creationTimestamp": "2015-04-22T11:49:39Z" diff --git a/pkg/api/testing/replication_controller_example.json b/pkg/api/testing/replication_controller_example.json index 8f858c023f2b..18bc181a59be 100644 --- a/pkg/api/testing/replication_controller_example.json +++ b/pkg/api/testing/replication_controller_example.json @@ -4,7 +4,6 @@ "metadata": { "name": "elasticsearch-logging-controller", "namespace": "default", - "selfLink": "/api/v1/namespaces/default/replicationcontrollers/elasticsearch-logging-controller", "uid": "aa76f162-e8e5-11e4-8fde-42010af09327", "resourceVersion": "98", "creationTimestamp": "2015-04-22T11:49:43Z", From 0a674d3ed92ce6384e2e8018ca63cf2925474146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Thu, 13 Jan 2022 15:29:21 +0100 Subject: [PATCH 03/16] Remove selflink setting from apiserver --- .../apimachinery/pkg/runtime/interfaces.go | 1 - .../apiserver/pkg/endpoints/apiserver_test.go | 68 ------- .../apiserver/pkg/endpoints/handlers/namer.go | 63 ------ .../pkg/endpoints/handlers/namer_test.go | 179 ------------------ .../pkg/endpoints/handlers/response_test.go | 5 - .../apiserver/pkg/endpoints/handlers/rest.go | 30 +-- .../pkg/endpoints/handlers/rest_test.go | 16 -- 7 files changed, 5 insertions(+), 357 deletions(-) delete mode 100644 staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer_test.go diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go b/staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go index 96edb5fa4f53..9f4014b4aa95 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go @@ -286,7 +286,6 @@ type ResourceVersioner interface { // SelfLinker provides methods for setting and retrieving the SelfLink field of an API object. type SelfLinker interface { - SetSelfLink(obj Object, selfLink string) error SelfLink(obj Object) (string, error) // Knowing Name is sometimes necessary to use a SelfLinker. diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go index 3f0ee9c5c74b..f4e64b5e2439 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go @@ -1444,65 +1444,6 @@ func TestSelfLinkSkipsEmptyName(t *testing.T) { } } -func TestRootSelfLink(t *testing.T) { - defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.RemoveSelfLink, false)() - - storage := map[string]rest.Storage{} - simpleStorage := GetWithOptionsRootRESTStorage{ - SimpleTypedStorage: &SimpleTypedStorage{ - baseType: &genericapitesting.SimpleRoot{}, // a root scoped type - item: &genericapitesting.SimpleRoot{ - ObjectMeta: metav1.ObjectMeta{Name: "foo"}, - Other: "foo", - }, - }, - takesPath: "atAPath", - } - storage["simple"] = &simpleStorage - storage["simple/sub"] = &simpleStorage - handler := handle(storage) - server := httptest.NewServer(handler) - defer server.Close() - - testCases := []struct { - url string - selfLink string - }{ - { - url: server.URL + "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple/foo", - selfLink: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple/foo", - }, - { - url: server.URL + "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple/foo/sub", - selfLink: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple/foo/sub", - }, - } - - for _, test := range testCases { - resp, err := http.Get(test.url) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - if resp.StatusCode != http.StatusOK { - t.Errorf("Unexpected status: %d, Expected: %d, %#v", resp.StatusCode, http.StatusOK, resp) - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - t.Logf("Data: %s", string(body)) - } - var out genericapitesting.SimpleRoot - if _, err := extractBody(resp, &out); err != nil { - t.Fatalf("unexpected error: %v", err) - } - - if out.SelfLink != test.selfLink { - t.Errorf("unexpected self link: %#v", out.SelfLink) - } - } -} - func TestMetadata(t *testing.T) { simpleStorage := &MetadataRESTStorage{&SimpleRESTStorage{}, []string{"text/plain"}} h := handle(map[string]rest.Storage{"simple": simpleStorage}) @@ -3885,15 +3826,6 @@ type setTestSelfLinker struct { func (s *setTestSelfLinker) Namespace(runtime.Object) (string, error) { return s.namespace, s.err } func (s *setTestSelfLinker) Name(runtime.Object) (string, error) { return s.name, s.err } func (s *setTestSelfLinker) SelfLink(runtime.Object) (string, error) { return "", s.err } -func (s *setTestSelfLinker) SetSelfLink(obj runtime.Object, selfLink string) error { - if e, a := s.expectedSet, selfLink; e != a { - if !s.alternativeSet.Has(a) { - s.t.Errorf("expected '%v', got '%v'", e, a) - } - } - s.called = true - return s.err -} func TestCreate(t *testing.T) { storage := SimpleRESTStorage{ diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer.go index 2eb0c174dc97..7439caa40597 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer.go @@ -19,8 +19,6 @@ package handlers import ( "fmt" "net/http" - "net/url" - "strings" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" @@ -38,14 +36,6 @@ type ScopeNamer interface { // ObjectName returns the namespace and name from an object if they exist, or an error if the object // does not support names. ObjectName(obj runtime.Object) (namespace, name string, err error) - // SetSelfLink sets the provided URL onto the object. The method should return nil if the object - // does not support selfLinks. - SetSelfLink(obj runtime.Object, url string) error - // GenerateLink creates an encoded URI for a given runtime object that represents the canonical path - // and query. - GenerateLink(requestInfo *request.RequestInfo, obj runtime.Object) (uri string, err error) - // GenerateListLink creates an encoded URI for a list that represents the canonical path and query. - GenerateListLink(req *http.Request) (uri string, err error) } type ContextBasedNaming struct { @@ -59,10 +49,6 @@ type ContextBasedNaming struct { // ContextBasedNaming implements ScopeNamer var _ ScopeNamer = ContextBasedNaming{} -func (n ContextBasedNaming) SetSelfLink(obj runtime.Object, url string) error { - return n.SelfLinker.SetSelfLink(obj, url) -} - func (n ContextBasedNaming) Namespace(req *http.Request) (namespace string, err error) { requestInfo, ok := request.RequestInfoFrom(req.Context()) if !ok { @@ -83,55 +69,6 @@ func (n ContextBasedNaming) Name(req *http.Request) (namespace, name string, err return requestInfo.Namespace, requestInfo.Name, nil } -// fastURLPathEncode encodes the provided path as a URL path -func fastURLPathEncode(path string) string { - for _, r := range []byte(path) { - switch { - case r >= '-' && r <= '9', r >= 'A' && r <= 'Z', r >= 'a' && r <= 'z': - // characters within this range do not require escaping - default: - var u url.URL - u.Path = path - return u.EscapedPath() - } - } - return path -} - -func (n ContextBasedNaming) GenerateLink(requestInfo *request.RequestInfo, obj runtime.Object) (uri string, err error) { - namespace, name, err := n.ObjectName(obj) - if err == errEmptyName && len(requestInfo.Name) > 0 { - name = requestInfo.Name - } else if err != nil { - return "", err - } - if len(namespace) == 0 && len(requestInfo.Namespace) > 0 { - namespace = requestInfo.Namespace - } - - if n.ClusterScoped { - return n.SelfLinkPathPrefix + url.QueryEscape(name) + n.SelfLinkPathSuffix, nil - } - - builder := strings.Builder{} - builder.Grow(len(n.SelfLinkPathPrefix) + len(namespace) + len(requestInfo.Resource) + len(name) + len(n.SelfLinkPathSuffix) + 8) - builder.WriteString(n.SelfLinkPathPrefix) - builder.WriteString(namespace) - builder.WriteByte('/') - builder.WriteString(requestInfo.Resource) - builder.WriteByte('/') - builder.WriteString(name) - builder.WriteString(n.SelfLinkPathSuffix) - return fastURLPathEncode(builder.String()), nil -} - -func (n ContextBasedNaming) GenerateListLink(req *http.Request) (uri string, err error) { - if len(req.URL.RawPath) > 0 { - return req.URL.RawPath, nil - } - return fastURLPathEncode(req.URL.Path), nil -} - func (n ContextBasedNaming) ObjectName(obj runtime.Object) (namespace, name string, err error) { name, err = n.SelfLinker.Name(obj) if err != nil { diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer_test.go deleted file mode 100644 index 861296278507..000000000000 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer_test.go +++ /dev/null @@ -1,179 +0,0 @@ -/* -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 handlers - -import ( - "math/rand" - "net/url" - "testing" - - fuzz "github.com/google/gofuzz" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apiserver/pkg/endpoints/request" -) - -func TestGenerateLink(t *testing.T) { - testCases := []struct { - name string - requestInfo *request.RequestInfo - obj runtime.Object - expect string - expectErr bool - clusterScoped bool - }{ - { - name: "obj has more priority than requestInfo", - requestInfo: &request.RequestInfo{ - Name: "should-not-use", - Namespace: "should-not-use", - Resource: "pod", - }, - obj: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "should-use", Namespace: "should-use"}}, - expect: "/api/v1/should-use/pod/should-use", - expectErr: false, - clusterScoped: false, - }, - { - name: "hit errEmptyName", - requestInfo: &request.RequestInfo{ - Name: "should-use", - Namespace: "should-use", - Resource: "pod", - }, - obj: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "should-not-use"}}, - expect: "/api/v1/should-use/pod/should-use", - expectErr: false, - clusterScoped: false, - }, - { - name: "use namespace of requestInfo if obj namespace is empty", - requestInfo: &request.RequestInfo{ - Name: "should-not-use", - Namespace: "should-use", - Resource: "pod", - }, - obj: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "should-use"}}, - expect: "/api/v1/should-use/pod/should-use", - expectErr: false, - clusterScoped: false, - }, - { - name: "hit error", - requestInfo: &request.RequestInfo{ - Name: "", - Namespace: "", - Resource: "pod", - }, - obj: &v1.Pod{ObjectMeta: metav1.ObjectMeta{}}, - expect: "name must be provided", - expectErr: true, - clusterScoped: false, - }, - { - name: "cluster scoped", - requestInfo: &request.RequestInfo{ - Name: "only-name", - Namespace: "should-not-use", - Resource: "pod", - }, - obj: &v1.Pod{ObjectMeta: metav1.ObjectMeta{}}, - expect: "/api/v1/only-name", - expectErr: false, - clusterScoped: true, - }, - } - - for _, test := range testCases { - n := ContextBasedNaming{ - SelfLinker: meta.NewAccessor(), - SelfLinkPathPrefix: "/api/v1/", - ClusterScoped: test.clusterScoped, - } - uri, err := n.GenerateLink(test.requestInfo, test.obj) - - if uri != test.expect && err.Error() != test.expect { - if test.expectErr { - t.Fatalf("%s: unexpected non-error: %v", test.name, err) - } else { - t.Fatalf("%s: expected: %v, but got: %v", test.name, test.expect, uri) - } - } - } -} - -func Test_fastURLPathEncode_fuzz(t *testing.T) { - specialCases := []string{"/", "//", ".", "*", "/abc%"} - for _, test := range specialCases { - got := fastURLPathEncode(test) - u := url.URL{Path: test} - expected := u.EscapedPath() - if got != expected { - t.Errorf("%q did not match %q", got, expected) - } - } - f := fuzz.New().Funcs( - func(s *string, c fuzz.Continue) { - *s = randString(c.Rand) - }, - ) - for i := 0; i < 2000; i++ { - var test string - f.Fuzz(&test) - - got := fastURLPathEncode(test) - u := url.URL{Path: test} - expected := u.EscapedPath() - if got != expected { - t.Errorf("%q did not match %q", got, expected) - } - } -} - -// Unicode range fuzzer from github.com/google/gofuzz/fuzz.go - -type charRange struct { - first, last rune -} - -var unicodeRanges = []charRange{ - {0x00, 0x255}, - {' ', '~'}, // ASCII characters - {'\u00a0', '\u02af'}, // Multi-byte encoded characters - {'\u4e00', '\u9fff'}, // Common CJK (even longer encodings) -} - -// randString makes a random string up to 20 characters long. The returned string -// may include a variety of (valid) UTF-8 encodings. -func randString(r *rand.Rand) string { - n := r.Intn(20) - runes := make([]rune, n) - for i := range runes { - runes[i] = unicodeRanges[r.Intn(len(unicodeRanges))].choose(r) - } - return string(runes) -} - -// choose returns a random unicode character from the given range, using the -// given randomness source. -func (r *charRange) choose(rand *rand.Rand) rune { - count := int64(r.last - r.first) - return r.first + rune(rand.Int63n(count)) -} diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response_test.go index 4cd37aa7c34e..9455a06135e0 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response_test.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response_test.go @@ -77,11 +77,6 @@ type mockNamer struct{} func (*mockNamer) Namespace(_ *http.Request) (string, error) { return "", nil } func (*mockNamer) Name(_ *http.Request) (string, string, error) { return "", "", nil } func (*mockNamer) ObjectName(_ runtime.Object) (string, string, error) { return "", "", nil } -func (*mockNamer) SetSelfLink(_ runtime.Object, _ string) error { return nil } -func (*mockNamer) GenerateLink(_ *request.RequestInfo, _ runtime.Object) (string, error) { - return "", nil -} -func (*mockNamer) GenerateListLink(_ *http.Request) (string, error) { return "", nil } func TestCacheableObject(t *testing.T) { pomGVK := metav1.SchemeGroupVersion.WithKind("PartialObjectMetadata") diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go index c5fd95e89491..aba9a3f882a5 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go @@ -49,7 +49,6 @@ import ( "k8s.io/apiserver/pkg/registry/rest" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/apiserver/pkg/warning" - "k8s.io/klog/v2" ) const ( @@ -260,18 +259,6 @@ func transformDecodeError(typer runtime.ObjectTyper, baseErr error, into runtime return errors.NewBadRequest(fmt.Sprintf("the object provided is unrecognized (must be of type %s): %v (%s)", objGVK.Kind, baseErr, summary)) } -// setSelfLink sets the self link of an object (or the child items in a list) to the base URL of the request -// plus the path and query generated by the provided linkFunc -func setSelfLink(obj runtime.Object, requestInfo *request.RequestInfo, namer ScopeNamer) error { - // TODO: SelfLink generation should return a full URL? - uri, err := namer.GenerateLink(requestInfo, obj) - if err != nil { - return nil - } - - return namer.SetSelfLink(obj, uri) -} - func hasUID(obj runtime.Object) (bool, error) { if obj == nil { return false, nil @@ -387,29 +374,22 @@ func setObjectSelfLink(ctx context.Context, obj runtime.Object, req *http.Reques // check via reflection, but as we move away from reflection we require that you not only carry Items but // ListMeta into order to be identified as a list. if !meta.IsListType(obj) { - requestInfo, ok := request.RequestInfoFrom(ctx) + _, ok := request.RequestInfoFrom(ctx) if !ok { return fmt.Errorf("missing requestInfo") } - return setSelfLink(obj, requestInfo, namer) + return nil } - uri, err := namer.GenerateListLink(req) - if err != nil { - return err - } - if err := namer.SetSelfLink(obj, uri); err != nil { - klog.V(4).InfoS("Unable to set self link on object", "error", err) - } - requestInfo, ok := request.RequestInfoFrom(ctx) + _, ok := request.RequestInfoFrom(ctx) if !ok { return fmt.Errorf("missing requestInfo") } count := 0 - err = meta.EachListItem(obj, func(obj runtime.Object) error { + err := meta.EachListItem(obj, func(obj runtime.Object) error { count++ - return setSelfLink(obj, requestInfo, namer) + return nil }) if count == 0 { diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest_test.go index 0bbabdc247dd..52d169a86e4a 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest_test.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest_test.go @@ -300,22 +300,6 @@ func (p *testNamer) ObjectName(obj runtime.Object) (namespace, name string, err return p.namespace, p.name, nil } -// SetSelfLink sets the provided URL onto the object. The method should return nil if the object -// does not support selfLinks. -func (p *testNamer) SetSelfLink(obj runtime.Object, url string) error { - return errors.New("not implemented") -} - -// GenerateLink creates a path and query for a given runtime object that represents the canonical path. -func (p *testNamer) GenerateLink(requestInfo *request.RequestInfo, obj runtime.Object) (uri string, err error) { - return "", errors.New("not implemented") -} - -// GenerateListLink creates a path and query for a list that represents the canonical path. -func (p *testNamer) GenerateListLink(req *http.Request) (uri string, err error) { - return "", errors.New("not implemented") -} - type patchTestCase struct { name string From 0aaef27e59839bf60e06aa1421ecbb877207652c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Thu, 13 Jan 2022 16:01:35 +0100 Subject: [PATCH 04/16] Fix apiserver selflink tests --- .../apiserver/pkg/endpoints/apiserver_test.go | 391 ++---------------- .../apiserver/pkg/endpoints/audit_test.go | 26 +- .../pkg/endpoints/patchhandler_test.go | 21 +- 3 files changed, 39 insertions(+), 399 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go index f4e64b5e2439..c6105ba050da 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go @@ -216,15 +216,10 @@ type defaultAPIServer struct { // uses the default settings func handle(storage map[string]rest.Storage) http.Handler { - return handleInternal(storage, admissionControl, selfLinker, nil) + return handleInternal(storage, admissionControl, nil) } -// tests using a custom self linker -func handleLinker(storage map[string]rest.Storage, selfLinker runtime.SelfLinker) http.Handler { - return handleInternal(storage, admissionControl, selfLinker, nil) -} - -func handleInternal(storage map[string]rest.Storage, admissionControl admission.Interface, selfLinker runtime.SelfLinker, auditSink audit.Sink) http.Handler { +func handleInternal(storage map[string]rest.Storage, admissionControl admission.Interface, auditSink audit.Sink) http.Handler { container := restful.NewContainer() container.Router(restful.CurlyRouter{}) mux := container.ServeMux @@ -237,6 +232,7 @@ func handleInternal(storage map[string]rest.Storage, admissionControl admission. UnsafeConvertor: runtime.UnsafeObjectConvertor(scheme), Defaulter: scheme, Typer: scheme, + // TODO(wojtek-t): Switch to Namer. Linker: selfLinker, RootScopedKinds: sets.NewString("SimpleRoot"), @@ -376,7 +372,6 @@ func (storage *SimpleRESTStorage) List(ctx context.Context, options *metainterna result := &genericapitesting.SimpleList{ ListMeta: metav1.ListMeta{ ResourceVersion: "10", - SelfLink: "/test/link", }, Items: storage.list, } @@ -942,7 +937,6 @@ func TestList(t *testing.T) { testCases := []struct { url string namespace string - selfLink string legacy bool label string field string @@ -953,19 +947,16 @@ func TestList(t *testing.T) { { url: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/simple?namespace=", namespace: "", - selfLink: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/simple", legacy: true, }, { url: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/simple?namespace=other", namespace: "", - selfLink: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/simple", legacy: true, }, { url: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/simple?namespace=other&labelSelector=a%3Db&fieldSelector=c%3Dd", namespace: "", - selfLink: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/simple", legacy: true, label: "a=b", field: "c=d", @@ -974,19 +965,16 @@ func TestList(t *testing.T) { { url: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/simple", namespace: "", - selfLink: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/simple", legacy: true, }, { url: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/other/simple", namespace: "other", - selfLink: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/other/simple", legacy: true, }, { url: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/other/simple?labelSelector=a%3Db&fieldSelector=c%3Dd", namespace: "other", - selfLink: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/other/simple", legacy: true, label: "a=b", field: "c=d", @@ -995,24 +983,20 @@ func TestList(t *testing.T) { { url: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/simple", namespace: "", - selfLink: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/simple", legacy: true, }, // list items in a namespace in the path { url: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/default/simple", namespace: "default", - selfLink: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/default/simple", }, { url: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/other/simple", namespace: "other", - selfLink: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/other/simple", }, { url: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/other/simple?labelSelector=a%3Db&fieldSelector=c%3Dd", namespace: "other", - selfLink: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/other/simple", label: "a=b", field: "c=d", }, @@ -1020,7 +1004,6 @@ func TestList(t *testing.T) { { url: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/simple", namespace: "", - selfLink: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/simple", }, // Group API @@ -1029,19 +1012,16 @@ func TestList(t *testing.T) { { url: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple?namespace=", namespace: "", - selfLink: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple", legacy: true, }, { url: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple?namespace=other", namespace: "", - selfLink: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple", legacy: true, }, { url: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple?namespace=other&labelSelector=a%3Db&fieldSelector=c%3Dd", namespace: "", - selfLink: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple", legacy: true, label: "a=b", field: "c=d", @@ -1050,19 +1030,16 @@ func TestList(t *testing.T) { { url: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple", namespace: "", - selfLink: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple", legacy: true, }, { url: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/other/simple", namespace: "other", - selfLink: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/other/simple", legacy: true, }, { url: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/other/simple?labelSelector=a%3Db&fieldSelector=c%3Dd", namespace: "other", - selfLink: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/other/simple", legacy: true, label: "a=b", field: "c=d", @@ -1071,24 +1048,20 @@ func TestList(t *testing.T) { { url: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple", namespace: "", - selfLink: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple", legacy: true, }, // list items in a namespace in the path { url: "/" + prefix + "/" + newGroupVersion.Group + "/" + newGroupVersion.Version + "/namespaces/default/simple", namespace: "default", - selfLink: "/" + prefix + "/" + newGroupVersion.Group + "/" + newGroupVersion.Version + "/namespaces/default/simple", }, { url: "/" + prefix + "/" + newGroupVersion.Group + "/" + newGroupVersion.Version + "/namespaces/other/simple", namespace: "other", - selfLink: "/" + prefix + "/" + newGroupVersion.Group + "/" + newGroupVersion.Version + "/namespaces/other/simple", }, { url: "/" + prefix + "/" + newGroupVersion.Group + "/" + newGroupVersion.Version + "/namespaces/other/simple?labelSelector=a%3Db&fieldSelector=c%3Dd", namespace: "other", - selfLink: "/" + prefix + "/" + newGroupVersion.Group + "/" + newGroupVersion.Version + "/namespaces/other/simple", label: "a=b", field: "c=d", }, @@ -1096,19 +1069,13 @@ func TestList(t *testing.T) { { url: "/" + prefix + "/" + newGroupVersion.Group + "/" + newGroupVersion.Version + "/simple", namespace: "", - selfLink: "/" + prefix + "/" + newGroupVersion.Group + "/" + newGroupVersion.Version + "/simple", }, } for i, testCase := range testCases { storage := map[string]rest.Storage{} simpleStorage := SimpleRESTStorage{expectedResourceNamespace: testCase.namespace} storage["simple"] = &simpleStorage - selfLinker := &setTestSelfLinker{ - t: t, - namespace: testCase.namespace, - expectedSet: testCase.selfLink, - } - var handler = handleInternal(storage, admissionControl, selfLinker, nil) + var handler = handleInternal(storage, admissionControl, nil) server := httptest.NewServer(handler) defer server.Close() @@ -1128,9 +1095,6 @@ func TestList(t *testing.T) { t.Logf("%d: body: %s", i, string(body)) continue } - if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called { - t.Errorf("%d: unexpected selfLinker.called: %v", i, selfLinker.called) - } if !simpleStorage.namespacePresent { t.Errorf("%d: namespace not set", i) } else if simpleStorage.actualNamespace != testCase.namespace { @@ -1151,7 +1115,7 @@ func TestRequestsWithInvalidQuery(t *testing.T) { storage["simple"] = &SimpleRESTStorage{expectedResourceNamespace: "default"} storage["withoptions"] = GetWithOptionsRESTStorage{} - var handler = handleInternal(storage, admissionControl, selfLinker, nil) + var handler = handleInternal(storage, admissionControl, nil) server := httptest.NewServer(handler) defer server.Close() @@ -1195,7 +1159,6 @@ func TestListCompression(t *testing.T) { testCases := []struct { url string namespace string - selfLink string legacy bool label string field string @@ -1205,13 +1168,11 @@ func TestListCompression(t *testing.T) { { url: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/default/simple", namespace: "default", - selfLink: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/default/simple", acceptEncoding: "", }, { url: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/default/simple", namespace: "default", - selfLink: "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/default/simple", acceptEncoding: "gzip", }, } @@ -1224,12 +1185,7 @@ func TestListCompression(t *testing.T) { }, } storage["simple"] = &simpleStorage - selfLinker := &setTestSelfLinker{ - t: t, - namespace: testCase.namespace, - expectedSet: testCase.selfLink, - } - var handler = handleInternal(storage, admissionControl, selfLinker, nil) + var handler = handleInternal(storage, admissionControl, nil) handler = genericapifilters.WithRequestInfo(handler, newTestRequestInfoResolver()) @@ -1262,9 +1218,6 @@ func TestListCompression(t *testing.T) { t.Logf("%d: body: %s", i, string(body)) continue } - if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called { - t.Errorf("%d: unexpected selfLinker.called: %v", i, selfLinker.called) - } if !simpleStorage.namespacePresent { t.Errorf("%d: namespace not set", i) } else if simpleStorage.actualNamespace != testCase.namespace { @@ -1381,67 +1334,6 @@ func TestNonEmptyList(t *testing.T) { if listOut.Items[0].Other != simpleStorage.list[0].Other { t.Errorf("Unexpected data: %#v, %s", listOut.Items[0], string(body)) } - if !utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) { - if listOut.SelfLink != "/"+prefix+"/"+testGroupVersion.Group+"/"+testGroupVersion.Version+"/simple" { - t.Errorf("unexpected list self link: %#v", listOut) - } - expectedSelfLink := "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/other/simple/something" - if listOut.Items[0].ObjectMeta.SelfLink != expectedSelfLink { - t.Errorf("Unexpected data: %#v, %s", listOut.Items[0].ObjectMeta.SelfLink, expectedSelfLink) - } - } -} - -func TestSelfLinkSkipsEmptyName(t *testing.T) { - storage := map[string]rest.Storage{} - simpleStorage := SimpleRESTStorage{ - list: []genericapitesting.Simple{ - { - ObjectMeta: metav1.ObjectMeta{Namespace: "other"}, - Other: "foo", - }, - }, - } - storage["simple"] = &simpleStorage - handler := handle(storage) - server := httptest.NewServer(handler) - defer server.Close() - - resp, err := http.Get(server.URL + "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simple") - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - if resp.StatusCode != http.StatusOK { - t.Errorf("Unexpected status: %d, Expected: %d, %#v", resp.StatusCode, http.StatusOK, resp) - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - t.Logf("Data: %s", string(body)) - } - var listOut genericapitesting.SimpleList - body, err := extractBody(resp, &listOut) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - if len(listOut.Items) != 1 { - t.Errorf("Unexpected response: %#v", listOut) - return - } - if listOut.Items[0].Other != simpleStorage.list[0].Other { - t.Errorf("Unexpected data: %#v, %s", listOut.Items[0], string(body)) - } - if !utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) { - if listOut.SelfLink != "/"+prefix+"/"+testGroupVersion.Group+"/"+testGroupVersion.Version+"/simple" { - t.Errorf("unexpected list self link: %#v", listOut) - } - expectedSelfLink := "" - if listOut.Items[0].ObjectMeta.SelfLink != expectedSelfLink { - t.Errorf("Unexpected data: %#v, %s", listOut.Items[0].ObjectMeta.SelfLink, expectedSelfLink) - } - } } func TestMetadata(t *testing.T) { @@ -1488,14 +1380,8 @@ func TestGet(t *testing.T) { Other: "foo", }, } - selfLinker := &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple/id", - name: "id", - namespace: "default", - } storage["simple"] = &simpleStorage - handler := handleLinker(storage, selfLinker) + handler := handle(storage) server := httptest.NewServer(handler) defer server.Close() @@ -1515,9 +1401,6 @@ func TestGet(t *testing.T) { if itemOut.Name != simpleStorage.item.Name { t.Errorf("Unexpected data: %#v, expected %#v (%s)", itemOut, simpleStorage.item, string(body)) } - if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called { - t.Errorf("unexpected selfLinker.called: %v", selfLinker.called) - } } func BenchmarkGet(b *testing.B) { @@ -1527,13 +1410,8 @@ func BenchmarkGet(b *testing.B) { Other: "foo", }, } - selfLinker := &setTestSelfLinker{ - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple/id", - name: "id", - namespace: "default", - } storage["simple"] = &simpleStorage - handler := handleLinker(storage, selfLinker) + handler := handle(storage) server := httptest.NewServer(handler) defer server.Close() @@ -1562,13 +1440,8 @@ func BenchmarkGetNoCompression(b *testing.B) { Other: "foo", }, } - selfLinker := &setTestSelfLinker{ - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple/id", - name: "id", - namespace: "default", - } storage["simple"] = &simpleStorage - handler := handleLinker(storage, selfLinker) + handler := handle(storage) server := httptest.NewServer(handler) defer server.Close() @@ -1603,15 +1476,9 @@ func TestGetCompression(t *testing.T) { Other: strings.Repeat("0123456789abcdef", (128*1024/16)+1), }, } - selfLinker := &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple/id", - name: "id", - namespace: "default", - } storage["simple"] = &simpleStorage - handler := handleLinker(storage, selfLinker) + handler := handle(storage) handler = genericapifilters.WithRequestInfo(handler, newTestRequestInfoResolver()) server := httptest.NewServer(handler) defer server.Close() @@ -1662,9 +1529,6 @@ func TestGetCompression(t *testing.T) { if itemOut.Name != simpleStorage.item.Name { t.Errorf("Unexpected data: %#v, expected %#v (%s)", itemOut, simpleStorage.item, string(body)) } - if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called { - t.Errorf("unexpected selfLinker.called: %v", selfLinker.called) - } } } @@ -1675,14 +1539,8 @@ func TestGetPretty(t *testing.T) { Other: "foo", }, } - selfLinker := &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple/id", - name: "id", - namespace: "default", - } storage["simple"] = &simpleStorage - handler := handleLinker(storage, selfLinker) + handler := handle(storage) server := httptest.NewServer(handler) defer server.Close() @@ -1754,7 +1612,7 @@ func TestGetPretty(t *testing.T) { func TestGetTable(t *testing.T) { now := metav1.Now() obj := genericapitesting.Simple{ - ObjectMeta: metav1.ObjectMeta{Name: "foo1", Namespace: "ns1", ResourceVersion: "10", SelfLink: "/blah", CreationTimestamp: now, UID: types.UID("abcdef0123")}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1", Namespace: "ns1", ResourceVersion: "10", CreationTimestamp: now, UID: types.UID("abcdef0123")}, Other: "foo", } @@ -1813,7 +1671,7 @@ func TestGetTable(t *testing.T) { accept: "application/json;as=Table;v=v1;g=meta.k8s.io", expected: &metav1.Table{ TypeMeta: metav1.TypeMeta{Kind: "Table", APIVersion: "meta.k8s.io/v1"}, - ListMeta: metav1.ListMeta{ResourceVersion: "10", SelfLink: "/blah"}, + ListMeta: metav1.ListMeta{ResourceVersion: "10"}, ColumnDefinitions: []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metaDoc["name"]}, {Name: "Created At", Type: "date", Description: metaDoc["creationTimestamp"]}, @@ -1828,7 +1686,7 @@ func TestGetTable(t *testing.T) { accept: "application/json;as=Table;v=v1beta1;g=meta.k8s.io", expected: &metav1.Table{ TypeMeta: metav1.TypeMeta{Kind: "Table", APIVersion: "meta.k8s.io/v1beta1"}, - ListMeta: metav1.ListMeta{ResourceVersion: "10", SelfLink: "/blah"}, + ListMeta: metav1.ListMeta{ResourceVersion: "10"}, ColumnDefinitions: []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metaDoc["name"]}, {Name: "Created At", Type: "date", Description: metaDoc["creationTimestamp"]}, @@ -1846,7 +1704,7 @@ func TestGetTable(t *testing.T) { }, ","), expected: &metav1.Table{ TypeMeta: metav1.TypeMeta{Kind: "Table", APIVersion: "meta.k8s.io/v1beta1"}, - ListMeta: metav1.ListMeta{ResourceVersion: "10", SelfLink: "/blah"}, + ListMeta: metav1.ListMeta{ResourceVersion: "10"}, ColumnDefinitions: []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metaDoc["name"]}, {Name: "Created At", Type: "date", Description: metaDoc["creationTimestamp"]}, @@ -1862,7 +1720,7 @@ func TestGetTable(t *testing.T) { params: url.Values{"includeObject": []string{"Metadata"}}, expected: &metav1.Table{ TypeMeta: metav1.TypeMeta{Kind: "Table", APIVersion: "meta.k8s.io/v1beta1"}, - ListMeta: metav1.ListMeta{ResourceVersion: "10", SelfLink: "/blah"}, + ListMeta: metav1.ListMeta{ResourceVersion: "10"}, ColumnDefinitions: []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metaDoc["name"]}, {Name: "Created At", Type: "date", Description: metaDoc["creationTimestamp"]}, @@ -1877,7 +1735,7 @@ func TestGetTable(t *testing.T) { params: url.Values{"includeObject": []string{"Metadata"}}, expected: &metav1.Table{ TypeMeta: metav1.TypeMeta{Kind: "Table", APIVersion: "meta.k8s.io/v1beta1"}, - ListMeta: metav1.ListMeta{ResourceVersion: "10", SelfLink: "/test/link"}, + ListMeta: metav1.ListMeta{ResourceVersion: "10"}, ColumnDefinitions: []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metaDoc["name"]}, {Name: "Created At", Type: "date", Description: metaDoc["creationTimestamp"]}, @@ -1895,17 +1753,8 @@ func TestGetTable(t *testing.T) { item: obj, list: []genericapitesting.Simple{obj}, } - selfLinker := &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple", - namespace: "default", - } - if test.item { - selfLinker.expectedSet += "/id" - selfLinker.name = "id" - } storage["simple"] = &simpleStorage - handler := handleLinker(storage, selfLinker) + handler := handle(storage) server := httptest.NewServer(handler) defer server.Close() @@ -1957,7 +1806,7 @@ func TestGetTable(t *testing.T) { func TestWatchTable(t *testing.T) { obj := genericapitesting.Simple{ - ObjectMeta: metav1.ObjectMeta{Name: "foo1", Namespace: "ns1", ResourceVersion: "10", SelfLink: "/blah", CreationTimestamp: metav1.NewTime(time.Unix(1, 0)), UID: types.UID("abcdef0123")}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1", Namespace: "ns1", ResourceVersion: "10", CreationTimestamp: metav1.NewTime(time.Unix(1, 0)), UID: types.UID("abcdef0123")}, Other: "foo", } @@ -2010,7 +1859,7 @@ func TestWatchTable(t *testing.T) { Object: runtime.RawExtension{ Raw: []byte(strings.TrimSpace(runtime.EncodeOrDie(s, &metav1.Table{ TypeMeta: metav1.TypeMeta{Kind: "Table", APIVersion: "meta.k8s.io/v1beta1"}, - ListMeta: metav1.ListMeta{ResourceVersion: "10", SelfLink: "/blah"}, + ListMeta: metav1.ListMeta{ResourceVersion: "10"}, ColumnDefinitions: []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metaDoc["name"]}, {Name: "Created At", Type: "date", Description: metaDoc["creationTimestamp"]}, @@ -2035,7 +1884,7 @@ func TestWatchTable(t *testing.T) { Object: runtime.RawExtension{ Raw: []byte(strings.TrimSpace(runtime.EncodeOrDie(s, &metav1.Table{ TypeMeta: metav1.TypeMeta{Kind: "Table", APIVersion: "meta.k8s.io/v1beta1"}, - ListMeta: metav1.ListMeta{ResourceVersion: "10", SelfLink: "/blah"}, + ListMeta: metav1.ListMeta{ResourceVersion: "10"}, ColumnDefinitions: []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metaDoc["name"]}, {Name: "Created At", Type: "date", Description: metaDoc["creationTimestamp"]}, @@ -2051,7 +1900,7 @@ func TestWatchTable(t *testing.T) { Object: runtime.RawExtension{ Raw: []byte(strings.TrimSpace(runtime.EncodeOrDie(s, &metav1.Table{ TypeMeta: metav1.TypeMeta{Kind: "Table", APIVersion: "meta.k8s.io/v1beta1"}, - ListMeta: metav1.ListMeta{ResourceVersion: "10", SelfLink: "/blah"}, + ListMeta: metav1.ListMeta{ResourceVersion: "10"}, Rows: []metav1.TableRow{ {Cells: []interface{}{"foo1", time.Unix(1, 0).UTC().Format(time.RFC3339)}, Object: runtime.RawExtension{Raw: encodedBody}}, }, @@ -2072,7 +1921,7 @@ func TestWatchTable(t *testing.T) { Object: runtime.RawExtension{ Raw: []byte(strings.TrimSpace(runtime.EncodeOrDie(s, &metav1.Table{ TypeMeta: metav1.TypeMeta{Kind: "Table", APIVersion: "meta.k8s.io/v1"}, - ListMeta: metav1.ListMeta{ResourceVersion: "10", SelfLink: "/blah"}, + ListMeta: metav1.ListMeta{ResourceVersion: "10"}, ColumnDefinitions: []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metaDoc["name"]}, {Name: "Created At", Type: "date", Description: metaDoc["creationTimestamp"]}, @@ -2088,7 +1937,7 @@ func TestWatchTable(t *testing.T) { Object: runtime.RawExtension{ Raw: []byte(strings.TrimSpace(runtime.EncodeOrDie(s, &metav1.Table{ TypeMeta: metav1.TypeMeta{Kind: "Table", APIVersion: "meta.k8s.io/v1"}, - ListMeta: metav1.ListMeta{ResourceVersion: "10", SelfLink: "/blah"}, + ListMeta: metav1.ListMeta{ResourceVersion: "10"}, Rows: []metav1.TableRow{ {Cells: []interface{}{"foo1", time.Unix(1, 0).UTC().Format(time.RFC3339)}, Object: runtime.RawExtension{Raw: encodedBodyV1}}, }, @@ -2106,17 +1955,8 @@ func TestWatchTable(t *testing.T) { list: []genericapitesting.Simple{obj}, } - selfLinker := &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple", - namespace: "default", - } - if test.item { - selfLinker.expectedSet += "/id" - selfLinker.name = "id" - } storage["simple"] = &simpleStorage - handler := handleLinker(storage, selfLinker) + handler := handle(storage) server := httptest.NewServer(handler) defer server.Close() @@ -2229,15 +2069,8 @@ func TestGetPartialObjectMetadata(t *testing.T) { }, }, } - selfLinker := &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple/id", - alternativeSet: sets.NewString("/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple"), - name: "id", - namespace: "default", - } storage["simple"] = &simpleStorage - handler := handleLinker(storage, selfLinker) + handler := handle(storage) server := httptest.NewServer(handler) defer server.Close() @@ -2320,7 +2153,6 @@ func TestGetPartialObjectMetadata(t *testing.T) { expected: &metav1beta1.PartialObjectMetadataList{ ListMeta: metav1.ListMeta{ ResourceVersion: "10", - SelfLink: "/test/link", }, Items: []metav1beta1.PartialObjectMetadata{ { @@ -2610,82 +2442,6 @@ func TestGetWithOptions(t *testing.T) { } } -func TestGetAlternateSelfLink(t *testing.T) { - storage := map[string]rest.Storage{} - simpleStorage := SimpleRESTStorage{ - item: genericapitesting.Simple{ - Other: "foo", - }, - } - selfLinker := &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/test/simple/id", - name: "id", - namespace: "test", - } - storage["simple"] = &simpleStorage - handler := handleLinker(storage, selfLinker) - server := httptest.NewServer(handler) - defer server.Close() - - resp, err := http.Get(server.URL + "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/test/simple/id") - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if resp.StatusCode != http.StatusOK { - t.Fatalf("unexpected response: %#v", resp) - } - var itemOut genericapitesting.Simple - body, err := extractBody(resp, &itemOut) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if itemOut.Name != simpleStorage.item.Name { - t.Errorf("Unexpected data: %#v, expected %#v (%s)", itemOut, simpleStorage.item, string(body)) - } - if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called { - t.Errorf("unexpected selfLinker.called: %v", selfLinker.called) - } -} - -func TestGetNamespaceSelfLink(t *testing.T) { - storage := map[string]rest.Storage{} - simpleStorage := SimpleRESTStorage{ - item: genericapitesting.Simple{ - Other: "foo", - }, - } - selfLinker := &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + newGroupVersion.Group + "/" + newGroupVersion.Version + "/namespaces/foo/simple/id", - name: "id", - namespace: "foo", - } - storage["simple"] = &simpleStorage - handler := handleInternal(storage, admissionControl, selfLinker, nil) - server := httptest.NewServer(handler) - defer server.Close() - - resp, err := http.Get(server.URL + "/" + prefix + "/" + newGroupVersion.Group + "/" + newGroupVersion.Version + "/namespaces/foo/simple/id") - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if resp.StatusCode != http.StatusOK { - t.Fatalf("unexpected response: %#v", resp) - } - var itemOut genericapitesting.Simple - body, err := extractBody(resp, &itemOut) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if itemOut.Name != simpleStorage.item.Name { - t.Errorf("Unexpected data: %#v, expected %#v (%s)", itemOut, simpleStorage.item, string(body)) - } - if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called { - t.Errorf("unexpected selfLinker.called: %v", selfLinker.called) - } -} - func TestGetMissing(t *testing.T) { storage := map[string]rest.Storage{} simpleStorage := SimpleRESTStorage{ @@ -3135,7 +2891,7 @@ func TestDeleteInvokesAdmissionControl(t *testing.T) { simpleStorage := SimpleRESTStorage{} ID := "id" storage["simple"] = &simpleStorage - handler := handleInternal(storage, admit, selfLinker, nil) + handler := handleInternal(storage, admit, nil) server := httptest.NewServer(handler) defer server.Close() @@ -3185,13 +2941,7 @@ func TestUpdate(t *testing.T) { simpleStorage := SimpleRESTStorage{} ID := "id" storage["simple"] = &simpleStorage - selfLinker := &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple/" + ID, - name: ID, - namespace: metav1.NamespaceDefault, - } - handler := handleLinker(storage, selfLinker) + handler := handle(storage) server := httptest.NewServer(handler) defer server.Close() @@ -3223,9 +2973,6 @@ func TestUpdate(t *testing.T) { if simpleStorage.updated == nil || simpleStorage.updated.Name != item.Name { t.Errorf("Unexpected update value %#v, expected %#v.", simpleStorage.updated, item) } - if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called { - t.Errorf("unexpected selfLinker.called: %v", selfLinker.called) - } } func TestUpdateInvokesAdmissionControl(t *testing.T) { @@ -3236,7 +2983,7 @@ func TestUpdateInvokesAdmissionControl(t *testing.T) { simpleStorage := SimpleRESTStorage{} ID := "id" storage["simple"] = &simpleStorage - handler := handleInternal(storage, admit, selfLinker, nil) + handler := handleInternal(storage, admit, nil) server := httptest.NewServer(handler) defer server.Close() @@ -3349,11 +3096,7 @@ func TestUpdateDisallowsMismatchedNamespaceOnError(t *testing.T) { simpleStorage := SimpleRESTStorage{} ID := "id" storage["simple"] = &simpleStorage - selfLinker := &setTestSelfLinker{ - t: t, - err: fmt.Errorf("test error"), - } - handler := handleLinker(storage, selfLinker) + handler := handle(storage) server := httptest.NewServer(handler) defer server.Close() @@ -3385,9 +3128,6 @@ func TestUpdateDisallowsMismatchedNamespaceOnError(t *testing.T) { if simpleStorage.updated != nil { t.Errorf("Unexpected update value %#v.", simpleStorage.updated) } - if selfLinker.called { - t.Errorf("self link ignored") - } } func TestUpdatePreventsMismatchedNamespace(t *testing.T) { @@ -3652,13 +3392,7 @@ func TestNamedCreaterWithoutName(t *testing.T) { }, } - selfLinker := &setTestSelfLinker{ - t: t, - name: "bar", - namespace: "default", - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/foo", - } - handler := handleLinker(map[string]rest.Storage{"foo": storage}, selfLinker) + handler := handle(map[string]rest.Storage{"foo": storage}) server := httptest.NewServer(handler) defer server.Close() client := http.Client{} @@ -3727,18 +3461,12 @@ func TestNamedCreaterWithGenerateName(t *testing.T) { }, } - selfLinker := &setTestSelfLinker{ - t: t, - namespace: "default", - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/foo", - } - ac := &namePopulatorAdmissionControl{ t: t, populateName: populateName, } - handler := handleInternal(map[string]rest.Storage{"foo": storage}, ac, selfLinker, nil) + handler := handleInternal(map[string]rest.Storage{"foo": storage}, ac, nil) server := httptest.NewServer(handler) defer server.Close() client := http.Client{} @@ -3813,20 +3541,6 @@ func TestUpdateChecksDecode(t *testing.T) { } } -type setTestSelfLinker struct { - t *testing.T - expectedSet string - alternativeSet sets.String - name string - namespace string - called bool - err error -} - -func (s *setTestSelfLinker) Namespace(runtime.Object) (string, error) { return s.namespace, s.err } -func (s *setTestSelfLinker) Name(runtime.Object) (string, error) { return s.name, s.err } -func (s *setTestSelfLinker) SelfLink(runtime.Object) (string, error) { return "", s.err } - func TestCreate(t *testing.T) { storage := SimpleRESTStorage{ injectedFunction: func(obj runtime.Object) (runtime.Object, error) { @@ -3834,13 +3548,7 @@ func TestCreate(t *testing.T) { return obj, nil }, } - selfLinker := &setTestSelfLinker{ - t: t, - name: "bar", - namespace: "default", - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/foo/bar", - } - handler := handleLinker(map[string]rest.Storage{"foo": &storage}, selfLinker) + handler := handle(map[string]rest.Storage{"foo": &storage}) server := httptest.NewServer(handler) defer server.Close() client := http.Client{} @@ -3882,9 +3590,6 @@ func TestCreate(t *testing.T) { if response.StatusCode != http.StatusCreated { t.Errorf("Unexpected status: %d, Expected: %d, %#v", response.StatusCode, http.StatusOK, response) } - if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called { - t.Errorf("unexpected selfLinker.called: %v", selfLinker.called) - } } func TestCreateYAML(t *testing.T) { @@ -3894,13 +3599,7 @@ func TestCreateYAML(t *testing.T) { return obj, nil }, } - selfLinker := &setTestSelfLinker{ - t: t, - name: "bar", - namespace: "default", - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/foo/bar", - } - handler := handleLinker(map[string]rest.Storage{"foo": &storage}, selfLinker) + handler := handle(map[string]rest.Storage{"foo": &storage}) server := httptest.NewServer(handler) defer server.Close() client := http.Client{} @@ -3952,9 +3651,6 @@ func TestCreateYAML(t *testing.T) { if response.StatusCode != http.StatusCreated { t.Errorf("Unexpected status: %d, Expected: %d, %#v", response.StatusCode, http.StatusOK, response) } - if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called { - t.Errorf("unexpected selfLinker.called: %v", selfLinker.called) - } } func TestCreateInNamespace(t *testing.T) { @@ -3964,13 +3660,7 @@ func TestCreateInNamespace(t *testing.T) { return obj, nil }, } - selfLinker := &setTestSelfLinker{ - t: t, - name: "bar", - namespace: "other", - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/other/foo/bar", - } - handler := handleLinker(map[string]rest.Storage{"foo": &storage}, selfLinker) + handler := handle(map[string]rest.Storage{"foo": &storage}) server := httptest.NewServer(handler) defer server.Close() client := http.Client{} @@ -4012,9 +3702,6 @@ func TestCreateInNamespace(t *testing.T) { if response.StatusCode != http.StatusCreated { t.Errorf("Unexpected status: %d, Expected: %d, %#v", response.StatusCode, http.StatusOK, response) } - if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called { - t.Errorf("unexpected selfLinker.called: %v", selfLinker.called) - } } func TestCreateInvokeAdmissionControl(t *testing.T) { @@ -4027,13 +3714,7 @@ func TestCreateInvokeAdmissionControl(t *testing.T) { return obj, nil }, } - selfLinker := &setTestSelfLinker{ - t: t, - name: "bar", - namespace: "other", - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/other/foo/bar", - } - handler := handleInternal(map[string]rest.Storage{"foo": &storage}, admit, selfLinker, nil) + handler := handleInternal(map[string]rest.Storage{"foo": &storage}, admit, nil) server := httptest.NewServer(handler) defer server.Close() client := http.Client{} diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/audit_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/audit_test.go index 0ebff74e538f..c12143aa529e 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/audit_test.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/audit_test.go @@ -149,7 +149,6 @@ func TestAudit(t *testing.T) { for _, test := range []struct { desc string req func(server string) (*http.Request, error) - linker runtime.SelfLinker code int events int checks []eventCheck @@ -159,7 +158,6 @@ func TestAudit(t *testing.T) { func(server string) (*http.Request, error) { return http.NewRequest("GET", server+"/"+prefix+"/"+testGroupVersion.Group+"/"+testGroupVersion.Version+"/namespaces/other/simple/c", bytes.NewBuffer(simpleFooJSON)) }, - selfLinker, 200, 2, []eventCheck{ @@ -173,11 +171,6 @@ func TestAudit(t *testing.T) { func(server string) (*http.Request, error) { return http.NewRequest("GET", server+"/"+prefix+"/"+testGroupVersion.Group+"/"+testGroupVersion.Version+"/namespaces/other/simple?labelSelector=a%3Dfoobar", nil) }, - &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/other/simple", - namespace: "other", - }, 200, 2, []eventCheck{ @@ -191,7 +184,6 @@ func TestAudit(t *testing.T) { func(server string) (*http.Request, error) { return http.NewRequest("POST", server+"/"+prefix+"/"+testGroupVersion.Group+"/"+testGroupVersion.Version+"/namespaces/default/simple", bytes.NewBuffer(simpleFooJSON)) }, - selfLinker, 201, 2, []eventCheck{ @@ -205,7 +197,6 @@ func TestAudit(t *testing.T) { func(server string) (*http.Request, error) { return http.NewRequest("POST", server+"/"+prefix+"/"+testGroupVersion.Group+"/"+testGroupVersion.Version+"/namespaces/default/simple/named", bytes.NewBuffer(simpleFooJSON)) }, - selfLinker, 405, 2, []eventCheck{ @@ -219,7 +210,6 @@ func TestAudit(t *testing.T) { func(server string) (*http.Request, error) { return http.NewRequest("DELETE", server+"/"+prefix+"/"+testGroupVersion.Group+"/"+testGroupVersion.Version+"/namespaces/default/simple/a", nil) }, - selfLinker, 200, 2, []eventCheck{ @@ -233,7 +223,6 @@ func TestAudit(t *testing.T) { func(server string) (*http.Request, error) { return http.NewRequest("DELETE", server+"/"+prefix+"/"+testGroupVersion.Group+"/"+testGroupVersion.Version+"/namespaces/default/simple/a", bytes.NewBuffer([]byte(`{"kind":"DeleteOptions"}`))) }, - selfLinker, 200, 2, []eventCheck{ @@ -247,7 +236,6 @@ func TestAudit(t *testing.T) { func(server string) (*http.Request, error) { return http.NewRequest("PUT", server+"/"+prefix+"/"+testGroupVersion.Group+"/"+testGroupVersion.Version+"/namespaces/other/simple/c", bytes.NewBuffer(simpleCPrimeJSON)) }, - selfLinker, 200, 2, []eventCheck{ @@ -261,7 +249,6 @@ func TestAudit(t *testing.T) { func(server string) (*http.Request, error) { return http.NewRequest("PUT", server+"/"+prefix+"/"+testGroupVersion.Group+"/"+testGroupVersion.Version+"/namespaces/default/simple/c", bytes.NewBuffer(simpleCPrimeJSON)) }, - selfLinker, 400, 2, []eventCheck{ @@ -277,12 +264,6 @@ func TestAudit(t *testing.T) { req.Header.Set("Content-Type", "application/merge-patch+json; charset=UTF-8") return req, nil }, - &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/other/simple/c", - name: "c", - namespace: "other", - }, 200, 2, []eventCheck{ @@ -296,11 +277,6 @@ func TestAudit(t *testing.T) { func(server string) (*http.Request, error) { return http.NewRequest("GET", server+"/"+prefix+"/"+testGroupVersion.Group+"/"+testGroupVersion.Version+"/namespaces/other/simple?watch=true", nil) }, - &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/other/simple", - namespace: "other", - }, 200, 3, []eventCheck{ @@ -328,7 +304,7 @@ func TestAudit(t *testing.T) { Other: "foo", }, }, - }, admissionControl, selfLinker, sink) + }, admissionControl, sink) server := httptest.NewServer(handler) defer server.Close() diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/patchhandler_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/patchhandler_test.go index 43c7c8bc26b9..5405fc89f233 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/patchhandler_test.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/patchhandler_test.go @@ -25,9 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" genericapitesting "k8s.io/apiserver/pkg/endpoints/testing" - "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/registry/rest" - utilfeature "k8s.io/apiserver/pkg/util/feature" ) func TestPatch(t *testing.T) { @@ -43,13 +41,7 @@ func TestPatch(t *testing.T) { } simpleStorage := SimpleRESTStorage{item: *item} storage["simple"] = &simpleStorage - selfLinker := &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple/" + ID, - name: ID, - namespace: metav1.NamespaceDefault, - } - handler := handleLinker(storage, selfLinker) + handler := handle(storage) server := httptest.NewServer(handler) defer server.Close() @@ -69,9 +61,6 @@ func TestPatch(t *testing.T) { if simpleStorage.updated == nil || simpleStorage.updated.Labels["foo"] != "bar" { t.Errorf("Unexpected update value %#v, expected %#v.", simpleStorage.updated, item) } - if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called { - t.Errorf("unexpected selfLinker.called: %v", selfLinker.called) - } } func TestForbiddenForceOnNonApply(t *testing.T) { @@ -87,13 +76,7 @@ func TestForbiddenForceOnNonApply(t *testing.T) { } simpleStorage := SimpleRESTStorage{item: *item} storage["simple"] = &simpleStorage - selfLinker := &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple/" + ID, - name: ID, - namespace: metav1.NamespaceDefault, - } - handler := handleLinker(storage, selfLinker) + handler := handle(storage) server := httptest.NewServer(handler) defer server.Close() From c8ee055b7372c7d6f3643c46af8ec53e241bdf08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Thu, 13 Jan 2022 15:04:52 +0100 Subject: [PATCH 05/16] Introduce Namer interface --- .../k8s.io/apimachinery/pkg/runtime/interfaces.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go b/staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go index 9f4014b4aa95..9cb3c986ea6c 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go @@ -284,14 +284,20 @@ type ResourceVersioner interface { ResourceVersion(obj Object) (string, error) } +// Namer provides methods for retrieving name and namespace of an API object. +type Namer interface { + // Name returns the name of a given object. + Name(obj Object) (string, error) + // Namespace returns the name of a given object. + Namespace(obj Object) (string, error) +} + // SelfLinker provides methods for setting and retrieving the SelfLink field of an API object. type SelfLinker interface { SelfLink(obj Object) (string, error) - // Knowing Name is sometimes necessary to use a SelfLinker. - Name(obj Object) (string, error) - // Knowing Namespace is sometimes necessary to use a SelfLinker - Namespace(obj Object) (string, error) + // Knowing Name or Namespace is sometimes necessary to use a SelfLinker. + Namer } // Object interface must be supported by all API types registered with Scheme. Since objects in a scheme are From 0ad588b27b6845d9ece955bfdde0e2863b8e1394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Thu, 13 Jan 2022 16:34:56 +0100 Subject: [PATCH 06/16] Relax to using namer instead of selflinker in API groupversion --- .../pkg/apiserver/customresource_handler.go | 6 +-- .../apimachinery/pkg/runtime/interfaces.go | 8 ---- .../pkg/test/api_meta_meta_test.go | 45 ------------------- .../apiserver/pkg/endpoints/apiserver_test.go | 11 +++-- .../apiserver/pkg/endpoints/groupversion.go | 2 +- .../apiserver/pkg/endpoints/handlers/namer.go | 6 +-- .../apiserver/pkg/endpoints/installer.go | 4 +- .../apiserver/pkg/server/genericapiserver.go | 2 +- 8 files changed, 15 insertions(+), 69 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index 69ffeb2e327c..d5e47461885d 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -843,7 +843,7 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd requestScopes[v.Name] = &handlers.RequestScope{ Namer: handlers.ContextBasedNaming{ - SelfLinker: meta.NewAccessor(), + Namer: meta.NewAccessor(), ClusterScoped: clusterScoped, SelfLinkPathPrefix: selfLinkPrefix, }, @@ -896,7 +896,7 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd scaleScope.Serializer = serializer.NewCodecFactory(scaleConverter.Scheme()) scaleScope.Kind = autoscalingv1.SchemeGroupVersion.WithKind("Scale") scaleScope.Namer = handlers.ContextBasedNaming{ - SelfLinker: meta.NewAccessor(), + Namer: meta.NewAccessor(), ClusterScoped: clusterScoped, SelfLinkPathPrefix: selfLinkPrefix, SelfLinkPathSuffix: "/scale", @@ -921,7 +921,7 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd statusScope := *requestScopes[v.Name] statusScope.Subresource = "status" statusScope.Namer = handlers.ContextBasedNaming{ - SelfLinker: meta.NewAccessor(), + Namer: meta.NewAccessor(), ClusterScoped: clusterScoped, SelfLinkPathPrefix: selfLinkPrefix, SelfLinkPathSuffix: "/status", diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go b/staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go index 9cb3c986ea6c..3ed5bf7bce68 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/interfaces.go @@ -292,14 +292,6 @@ type Namer interface { Namespace(obj Object) (string, error) } -// SelfLinker provides methods for setting and retrieving the SelfLink field of an API object. -type SelfLinker interface { - SelfLink(obj Object) (string, error) - - // Knowing Name or Namespace is sometimes necessary to use a SelfLinker. - Namer -} - // Object interface must be supported by all API types registered with Scheme. Since objects in a scheme are // expected to be serialized to the wire, the interface an Object must provide to the Scheme allows // serializers to set the kind, version, and group the object is represented as. An Object may choose diff --git a/staging/src/k8s.io/apimachinery/pkg/test/api_meta_meta_test.go b/staging/src/k8s.io/apimachinery/pkg/test/api_meta_meta_test.go index 49fcf8702c29..ccd80544581f 100644 --- a/staging/src/k8s.io/apimachinery/pkg/test/api_meta_meta_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/test/api_meta_meta_test.go @@ -298,51 +298,6 @@ func TestResourceVersionerOfAPI(t *testing.T) { } } -func TestTypeMetaSelfLinker(t *testing.T) { - table := map[string]struct { - obj runtime.Object - expect string - try string - succeed bool - }{ - "normal": { - obj: &MyAPIObject{TypeMeta: InternalTypeMeta{SelfLink: "foobar"}}, - expect: "foobar", - try: "newbar", - succeed: true, - }, - "fail": { - obj: &MyIncorrectlyMarkedAsAPIObject{}, - succeed: false, - }, - } - - linker := runtime.SelfLinker(meta.NewAccessor()) - for name, item := range table { - got, err := linker.SelfLink(item.obj) - if e, a := item.succeed, err == nil; e != a { - t.Errorf("%v: expected %v, got %v", name, e, a) - } - if e, a := item.expect, got; item.succeed && e != a { - t.Errorf("%v: expected %v, got %v", name, e, a) - } - - err = linker.SetSelfLink(item.obj, item.try) - if e, a := item.succeed, err == nil; e != a { - t.Errorf("%v: expected %v, got %v", name, e, a) - } - if item.succeed { - got, err := linker.SelfLink(item.obj) - if err != nil { - t.Errorf("%v: expected no err, got %v", name, err) - } - if e, a := item.try, got; e != a { - t.Errorf("%v: expected %v, got %v", name, e, a) - } - } - } -} - type MyAPIObject2 struct { metav1.TypeMeta metav1.ObjectMeta diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go index c6105ba050da..db9ca568bd07 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go @@ -126,7 +126,7 @@ var newCodec = codecs.LegacyCodec(newGroupVersion) var parameterCodec = runtime.NewParameterCodec(scheme) var accessor = meta.NewAccessor() -var selfLinker runtime.SelfLinker = accessor +var namer runtime.Namer = accessor var admissionControl admission.Interface func init() { @@ -232,8 +232,7 @@ func handleInternal(storage map[string]rest.Storage, admissionControl admission. UnsafeConvertor: runtime.UnsafeObjectConvertor(scheme), Defaulter: scheme, Typer: scheme, - // TODO(wojtek-t): Switch to Namer. - Linker: selfLinker, + Namer: namer, RootScopedKinds: sets.NewString("SimpleRoot"), EquivalentResourceRegistry: runtime.NewEquivalentResourceRegistry(), @@ -3280,7 +3279,7 @@ func TestParentResourceIsRequired(t *testing.T) { UnsafeConvertor: runtime.UnsafeObjectConvertor(scheme), Defaulter: scheme, Typer: scheme, - Linker: selfLinker, + Namer: namer, RootScopedKinds: sets.NewString("SimpleRoot"), EquivalentResourceRegistry: runtime.NewEquivalentResourceRegistry(), @@ -3313,7 +3312,7 @@ func TestParentResourceIsRequired(t *testing.T) { UnsafeConvertor: runtime.UnsafeObjectConvertor(scheme), Defaulter: scheme, Typer: scheme, - Linker: selfLinker, + Namer: namer, EquivalentResourceRegistry: runtime.NewEquivalentResourceRegistry(), @@ -4100,7 +4099,7 @@ func TestXGSubresource(t *testing.T) { UnsafeConvertor: runtime.UnsafeObjectConvertor(scheme), Defaulter: scheme, Typer: scheme, - Linker: selfLinker, + Namer: namer, EquivalentResourceRegistry: runtime.NewEquivalentResourceRegistry(), diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/groupversion.go b/staging/src/k8s.io/apiserver/pkg/endpoints/groupversion.go index a6f17e84acb7..94b1788ef220 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/groupversion.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/groupversion.go @@ -79,7 +79,7 @@ type APIGroupVersion struct { Convertor runtime.ObjectConvertor ConvertabilityChecker ConvertabilityChecker Defaulter runtime.ObjectDefaulter - Linker runtime.SelfLinker + Namer runtime.Namer UnsafeConvertor runtime.ObjectConvertor TypeConverter fieldmanager.TypeConverter diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer.go index 7439caa40597..19141706049d 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer.go @@ -39,7 +39,7 @@ type ScopeNamer interface { } type ContextBasedNaming struct { - SelfLinker runtime.SelfLinker + Namer runtime.Namer ClusterScoped bool SelfLinkPathPrefix string @@ -70,14 +70,14 @@ func (n ContextBasedNaming) Name(req *http.Request) (namespace, name string, err } func (n ContextBasedNaming) ObjectName(obj runtime.Object) (namespace, name string, err error) { - name, err = n.SelfLinker.Name(obj) + name, err = n.Namer.Name(obj) if err != nil { return "", "", err } if len(name) == 0 { return "", "", errEmptyName } - namespace, err = n.SelfLinker.Namespace(obj) + namespace, err = n.Namer.Namespace(obj) if err != nil { return "", "", err } diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go b/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go index 13d703afb287..af8418e5309b 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go @@ -428,7 +428,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag apiResource.Namespaced = false apiResource.Kind = resourceKind namer := handlers.ContextBasedNaming{ - SelfLinker: a.group.Linker, + Namer: a.group.Namer, ClusterScoped: true, SelfLinkPathPrefix: gpath.Join(a.prefix, resource) + "/", SelfLinkPathSuffix: suffix, @@ -477,7 +477,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag apiResource.Namespaced = true apiResource.Kind = resourceKind namer := handlers.ContextBasedNaming{ - SelfLinker: a.group.Linker, + Namer: a.group.Namer, ClusterScoped: false, SelfLinkPathPrefix: gpath.Join(a.prefix, namespaceParamName) + "/", SelfLinkPathSuffix: itemPathSuffix, diff --git a/staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go b/staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go index 0f856e9131b9..c530bb59906a 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go +++ b/staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go @@ -676,7 +676,7 @@ func (s *GenericAPIServer) newAPIGroupVersion(apiGroupInfo *APIGroupInfo, groupV UnsafeConvertor: runtime.UnsafeObjectConvertor(apiGroupInfo.Scheme), Defaulter: apiGroupInfo.Scheme, Typer: apiGroupInfo.Scheme, - Linker: runtime.SelfLinker(meta.NewAccessor()), + Namer: runtime.Namer(meta.NewAccessor()), EquivalentResourceRegistry: s.EquivalentResourceRegistry, From 1e0b9c6e20a07f706e7ace39f417ea746fa05a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Fri, 14 Jan 2022 10:00:04 +0100 Subject: [PATCH 07/16] Remove unused selflink parameters from ContextBasedNaming --- .../pkg/apiserver/customresource_handler.go | 26 +++++-------------- .../apiserver/pkg/endpoints/handlers/namer.go | 3 --- .../apiserver/pkg/endpoints/installer.go | 13 +++------- 3 files changed, 10 insertions(+), 32 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index d5e47461885d..4ba485db7784 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -19,7 +19,6 @@ package apiserver import ( "fmt" "net/http" - "path" "sort" "strings" "sync" @@ -814,14 +813,6 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd replicasPathInCustomResource, ) - selfLinkPrefix := "" - switch crd.Spec.Scope { - case apiextensionsv1.ClusterScoped: - selfLinkPrefix = "/" + path.Join("apis", crd.Spec.Group, v.Name) + "/" + crd.Status.AcceptedNames.Plural + "/" - case apiextensionsv1.NamespaceScoped: - selfLinkPrefix = "/" + path.Join("apis", crd.Spec.Group, v.Name, "namespaces") + "/" - } - clusterScoped := crd.Spec.Scope == apiextensionsv1.ClusterScoped // CRDs explicitly do not support protobuf, but some objects returned by the API server do @@ -843,9 +834,8 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd requestScopes[v.Name] = &handlers.RequestScope{ Namer: handlers.ContextBasedNaming{ - Namer: meta.NewAccessor(), - ClusterScoped: clusterScoped, - SelfLinkPathPrefix: selfLinkPrefix, + Namer: meta.NewAccessor(), + ClusterScoped: clusterScoped, }, Serializer: negotiatedSerializer, ParameterCodec: parameterCodec, @@ -896,10 +886,8 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd scaleScope.Serializer = serializer.NewCodecFactory(scaleConverter.Scheme()) scaleScope.Kind = autoscalingv1.SchemeGroupVersion.WithKind("Scale") scaleScope.Namer = handlers.ContextBasedNaming{ - Namer: meta.NewAccessor(), - ClusterScoped: clusterScoped, - SelfLinkPathPrefix: selfLinkPrefix, - SelfLinkPathSuffix: "/scale", + Namer: meta.NewAccessor(), + ClusterScoped: clusterScoped, } if utilfeature.DefaultFeatureGate.Enabled(features.ServerSideApply) && subresources != nil && subresources.Scale != nil { @@ -921,10 +909,8 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd statusScope := *requestScopes[v.Name] statusScope.Subresource = "status" statusScope.Namer = handlers.ContextBasedNaming{ - Namer: meta.NewAccessor(), - ClusterScoped: clusterScoped, - SelfLinkPathPrefix: selfLinkPrefix, - SelfLinkPathSuffix: "/status", + Namer: meta.NewAccessor(), + ClusterScoped: clusterScoped, } if utilfeature.DefaultFeatureGate.Enabled(features.ServerSideApply) && subresources != nil && subresources.Status != nil { diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer.go index 19141706049d..a9fe8fe2189e 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer.go @@ -41,9 +41,6 @@ type ScopeNamer interface { type ContextBasedNaming struct { Namer runtime.Namer ClusterScoped bool - - SelfLinkPathPrefix string - SelfLinkPathSuffix string } // ContextBasedNaming implements ScopeNamer diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go b/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go index af8418e5309b..e4b2221fcdd8 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go @@ -19,7 +19,6 @@ package endpoints import ( "fmt" "net/http" - gpath "path" "reflect" "sort" "strings" @@ -428,10 +427,8 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag apiResource.Namespaced = false apiResource.Kind = resourceKind namer := handlers.ContextBasedNaming{ - Namer: a.group.Namer, - ClusterScoped: true, - SelfLinkPathPrefix: gpath.Join(a.prefix, resource) + "/", - SelfLinkPathSuffix: suffix, + Namer: a.group.Namer, + ClusterScoped: true, } // Handler for standard REST verbs (GET, PUT, POST and DELETE). @@ -477,10 +474,8 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag apiResource.Namespaced = true apiResource.Kind = resourceKind namer := handlers.ContextBasedNaming{ - Namer: a.group.Namer, - ClusterScoped: false, - SelfLinkPathPrefix: gpath.Join(a.prefix, namespaceParamName) + "/", - SelfLinkPathSuffix: itemPathSuffix, + Namer: a.group.Namer, + ClusterScoped: false, } actions = appendIf(actions, action{"LIST", resourcePath, resourceParams, namer, false}, isLister) From 8c1e8355f8efb322ad6e53229f0cbb14999a8fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Fri, 14 Jan 2022 10:14:17 +0100 Subject: [PATCH 08/16] Ensure non-nil items in lists --- .../apiserver/pkg/endpoints/handlers/patch.go | 6 --- .../pkg/endpoints/handlers/response.go | 2 +- .../apiserver/pkg/endpoints/handlers/rest.go | 43 ++----------------- 3 files changed, 5 insertions(+), 46 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go index d407dcd5039c..17919e4aa170 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go @@ -236,12 +236,6 @@ func PatchResource(r rest.Patcher, scope *RequestScope, admit admission.Interfac } trace.Step("Object stored in database") - if err := setObjectSelfLink(ctx, result, req, scope.Namer); err != nil { - scope.err(err, w, req) - return - } - trace.Step("Self-link added") - status := http.StatusOK if wasCreated { status = http.StatusCreated diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go index e19cafdda119..52f083f672fa 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go @@ -59,7 +59,7 @@ func doTransformObject(ctx context.Context, obj runtime.Object, opts interface{} if _, ok := obj.(*metav1.Status); ok { return obj, nil } - if err := setObjectSelfLink(ctx, obj, req, scope.Namer); err != nil { + if err := ensureNonNilItems(obj); err != nil { return nil, err } diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go index aba9a3f882a5..b40423dac34d 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go @@ -356,49 +356,14 @@ func dedupOwnerReferencesAndAddWarning(obj runtime.Object, requestContext contex } } -// setObjectSelfLink sets the self link of an object as needed. -// TODO: remove the need for the namer LinkSetters by requiring objects implement either Object or List -// interfaces -func setObjectSelfLink(ctx context.Context, obj runtime.Object, req *http.Request, namer ScopeNamer) error { - if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) { - // Ensure that for empty lists we don't return items. - if meta.IsListType(obj) && meta.LenList(obj) == 0 { - if err := meta.SetList(obj, []runtime.Object{}); err != nil { - return err - } - } - return nil - } - - // We only generate list links on objects that implement ListInterface - historically we duck typed this - // check via reflection, but as we move away from reflection we require that you not only carry Items but - // ListMeta into order to be identified as a list. - if !meta.IsListType(obj) { - _, ok := request.RequestInfoFrom(ctx) - if !ok { - return fmt.Errorf("missing requestInfo") - } - return nil - } - - _, ok := request.RequestInfoFrom(ctx) - if !ok { - return fmt.Errorf("missing requestInfo") - } - - count := 0 - err := meta.EachListItem(obj, func(obj runtime.Object) error { - count++ - return nil - }) - - if count == 0 { +// ensureNonNilItems ensures that for empty lists we don't return items. +func ensureNonNilItems(obj runtime.Object) error { + if meta.IsListType(obj) && meta.LenList(obj) == 0 { if err := meta.SetList(obj, []runtime.Object{}); err != nil { return err } } - - return err + return nil } func summarizeData(data []byte, maxLength int) string { From 2169997dfea0a2f7ccf6911a745fc295793f70b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Wed, 19 Jan 2022 13:54:18 +0100 Subject: [PATCH 09/16] Remove Selflink from convertors --- pkg/printers/tablegenerator.go | 2 -- .../registry/customresource/tableconvertor/tableconvertor.go | 2 -- .../src/k8s.io/apiserver/pkg/endpoints/handlers/response.go | 2 -- .../k8s.io/apiserver/pkg/endpoints/handlers/response_test.go | 1 - .../k8s.io/apiserver/pkg/registry/rest/resttest/resttest.go | 3 +-- staging/src/k8s.io/apiserver/pkg/registry/rest/table.go | 2 -- .../kube-aggregator/pkg/registry/apiservice/etcd/etcd.go | 2 -- 7 files changed, 1 insertion(+), 13 deletions(-) diff --git a/pkg/printers/tablegenerator.go b/pkg/printers/tablegenerator.go index b947a3af53ab..654deaa4b8b5 100644 --- a/pkg/printers/tablegenerator.go +++ b/pkg/printers/tablegenerator.go @@ -110,13 +110,11 @@ func (h *HumanReadableGenerator) GenerateTable(obj runtime.Object, options Gener } if m, err := meta.ListAccessor(obj); err == nil { table.ResourceVersion = m.GetResourceVersion() - table.SelfLink = m.GetSelfLink() table.Continue = m.GetContinue() table.RemainingItemCount = m.GetRemainingItemCount() } else { if m, err := meta.CommonAccessor(obj); err == nil { table.ResourceVersion = m.GetResourceVersion() - table.SelfLink = m.GetSelfLink() } } return table, nil diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor.go index 0a26f114e738..b36e17f5f89d 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor.go @@ -90,13 +90,11 @@ func (c *convertor) ConvertToTable(ctx context.Context, obj runtime.Object, tabl if m, err := meta.ListAccessor(obj); err == nil { table.ResourceVersion = m.GetResourceVersion() - table.SelfLink = m.GetSelfLink() table.Continue = m.GetContinue() table.RemainingItemCount = m.GetRemainingItemCount() } else { if m, err := meta.CommonAccessor(obj); err == nil { table.ResourceVersion = m.GetResourceVersion() - table.SelfLink = m.GetSelfLink() } } diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go index 52f083f672fa..640378d9a741 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go @@ -244,7 +244,6 @@ func asPartialObjectMetadataList(result runtime.Object, groupVersion schema.Grou if err != nil { return nil, err } - list.SelfLink = li.GetSelfLink() list.ResourceVersion = li.GetResourceVersion() list.Continue = li.GetContinue() list.RemainingItemCount = li.GetRemainingItemCount() @@ -265,7 +264,6 @@ func asPartialObjectMetadataList(result runtime.Object, groupVersion schema.Grou if err != nil { return nil, err } - list.SelfLink = li.GetSelfLink() list.ResourceVersion = li.GetResourceVersion() list.Continue = li.GetContinue() list.RemainingItemCount = li.GetRemainingItemCount() diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response_test.go index 9455a06135e0..70ce483682e1 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response_test.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response_test.go @@ -171,7 +171,6 @@ func TestAsPartialObjectMetadataList(t *testing.T) { var remainingItemCount int64 = 10 pods := &examplev1.PodList{ ListMeta: metav1.ListMeta{ - SelfLink: "/test/link", ResourceVersion: "10", Continue: "continuetoken", RemainingItemCount: &remainingItemCount, diff --git a/staging/src/k8s.io/apiserver/pkg/registry/rest/resttest/resttest.go b/staging/src/k8s.io/apiserver/pkg/registry/rest/resttest/resttest.go index d5070a419421..962a20de0776 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/rest/resttest/resttest.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/rest/resttest/resttest.go @@ -1453,13 +1453,12 @@ func (t *Tester) testListTableConversion(obj runtime.Object, assignFn AssignFunc } m.SetContinue("continuetoken") m.SetResourceVersion("11") - m.SetSelfLink("/list/link") table, err := t.storage.(rest.TableConvertor).ConvertToTable(ctx, listObj, nil) if err != nil { t.Errorf("unexpected error: %v", err) } - if table.ResourceVersion != "11" || table.SelfLink != "/list/link" || table.Continue != "continuetoken" { + if table.ResourceVersion != "11" || table.Continue != "continuetoken" { t.Errorf("printer lost list meta: %#v", table.ListMeta) } if len(table.Rows) != len(items) { diff --git a/staging/src/k8s.io/apiserver/pkg/registry/rest/table.go b/staging/src/k8s.io/apiserver/pkg/registry/rest/table.go index d90ae70762b7..58d280300660 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/rest/table.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/rest/table.go @@ -70,13 +70,11 @@ func (c defaultTableConvertor) ConvertToTable(ctx context.Context, object runtim } if m, err := meta.ListAccessor(object); err == nil { table.ResourceVersion = m.GetResourceVersion() - table.SelfLink = m.GetSelfLink() table.Continue = m.GetContinue() table.RemainingItemCount = m.GetRemainingItemCount() } else { if m, err := meta.CommonAccessor(object); err == nil { table.ResourceVersion = m.GetResourceVersion() - table.SelfLink = m.GetSelfLink() } } if opt, ok := tableOptions.(*metav1.TableOptions); !ok || !opt.NoHeaders { diff --git a/staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go b/staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go index 0fdd1e971426..662f1f058f30 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go @@ -83,13 +83,11 @@ func (c *REST) ConvertToTable(ctx context.Context, obj runtime.Object, tableOpti } if m, err := meta.ListAccessor(obj); err == nil { table.ResourceVersion = m.GetResourceVersion() - table.SelfLink = m.GetSelfLink() table.Continue = m.GetContinue() table.RemainingItemCount = m.GetRemainingItemCount() } else { if m, err := meta.CommonAccessor(obj); err == nil { table.ResourceVersion = m.GetResourceVersion() - table.SelfLink = m.GetSelfLink() } } From b3267092fad6358e61fec65371f0130f86bba2b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Wed, 19 Jan 2022 17:17:38 +0100 Subject: [PATCH 10/16] Remove SelfLink from autogenerating applyconfigurations --- pkg/api/testing/applyconfiguration_test.go | 1 + .../applyconfiguration-gen/generators/applyconfiguration.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/pkg/api/testing/applyconfiguration_test.go b/pkg/api/testing/applyconfiguration_test.go index 7081ac524f48..5975456738c4 100644 --- a/pkg/api/testing/applyconfiguration_test.go +++ b/pkg/api/testing/applyconfiguration_test.go @@ -179,6 +179,7 @@ func fuzzObject(t *testing.T, gvk schema.GroupVersionKind) runtime.Object { func(s *v1.ObjectMeta, c fuzz.Continue) { c.FuzzNoCustom(s) s.ManagedFields = nil + s.SelfLink = "" }, ).Fuzz(internalObj) diff --git a/staging/src/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go b/staging/src/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go index b91a4619bd91..ddd7c1fb48f6 100644 --- a/staging/src/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go +++ b/staging/src/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go @@ -128,6 +128,9 @@ func blocklisted(t *types.Type, member types.Member) bool { if objectMeta.Name == t.Name && member.Name == "ManagedFields" { return true } + if objectMeta.Name == t.Name && member.Name == "SelfLink" { + return true + } return false } From d63b79ec47171a1b83fea162e26f7ba521e3c20e 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 11/16] Autogenerated --- .../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 --------- .../client-go/applyconfigurations/apps/v1/daemonset.go | 9 --------- .../client-go/applyconfigurations/apps/v1/deployment.go | 9 --------- .../client-go/applyconfigurations/apps/v1/replicaset.go | 9 --------- .../client-go/applyconfigurations/apps/v1/statefulset.go | 9 --------- .../apps/v1beta1/controllerrevision.go | 9 --------- .../applyconfigurations/apps/v1beta1/deployment.go | 9 --------- .../applyconfigurations/apps/v1beta1/statefulset.go | 9 --------- .../apps/v1beta2/controllerrevision.go | 9 --------- .../applyconfigurations/apps/v1beta2/daemonset.go | 9 --------- .../applyconfigurations/apps/v1beta2/deployment.go | 9 --------- .../applyconfigurations/apps/v1beta2/replicaset.go | 9 --------- .../client-go/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 --------- .../client-go/applyconfigurations/batch/v1/cronjob.go | 9 --------- .../k8s.io/client-go/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 --------- .../client-go/applyconfigurations/core/v1/configmap.go | 9 --------- .../client-go/applyconfigurations/core/v1/endpoints.go | 9 --------- .../client-go/applyconfigurations/core/v1/event.go | 9 --------- .../client-go/applyconfigurations/core/v1/limitrange.go | 9 --------- .../client-go/applyconfigurations/core/v1/namespace.go | 9 --------- .../k8s.io/client-go/applyconfigurations/core/v1/node.go | 9 --------- .../applyconfigurations/core/v1/persistentvolume.go | 9 --------- .../applyconfigurations/core/v1/persistentvolumeclaim.go | 9 --------- .../core/v1/persistentvolumeclaimtemplate.go | 9 --------- .../k8s.io/client-go/applyconfigurations/core/v1/pod.go | 9 --------- .../client-go/applyconfigurations/core/v1/podtemplate.go | 9 --------- .../applyconfigurations/core/v1/podtemplatespec.go | 9 --------- .../applyconfigurations/core/v1/replicationcontroller.go | 9 --------- .../applyconfigurations/core/v1/resourcequota.go | 9 --------- .../client-go/applyconfigurations/core/v1/secret.go | 9 --------- .../client-go/applyconfigurations/core/v1/service.go | 9 --------- .../applyconfigurations/core/v1/serviceaccount.go | 9 --------- .../applyconfigurations/discovery/v1/endpointslice.go | 9 --------- .../discovery/v1beta1/endpointslice.go | 9 --------- .../client-go/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 --------- .../extensions/v1beta1/networkpolicy.go | 9 --------- .../extensions/v1beta1/podsecuritypolicy.go | 9 --------- .../applyconfigurations/extensions/v1beta1/replicaset.go | 9 --------- .../applyconfigurations/extensions/v1beta1/scale.go | 9 --------- .../flowcontrol/v1alpha1/flowschema.go | 9 --------- .../flowcontrol/v1alpha1/prioritylevelconfiguration.go | 9 --------- .../flowcontrol/v1beta1/flowschema.go | 9 --------- .../flowcontrol/v1beta1/prioritylevelconfiguration.go | 9 --------- .../flowcontrol/v1beta2/flowschema.go | 9 --------- .../flowcontrol/v1beta2/prioritylevelconfiguration.go | 9 --------- .../imagepolicy/v1alpha1/imagereview.go | 9 --------- .../client-go/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 --------- .../networking/v1beta1/ingressclass.go | 9 --------- .../applyconfigurations/node/v1/runtimeclass.go | 9 --------- .../applyconfigurations/node/v1alpha1/runtimeclass.go | 9 --------- .../applyconfigurations/node/v1beta1/runtimeclass.go | 9 --------- .../client-go/applyconfigurations/policy/v1/eviction.go | 9 --------- .../applyconfigurations/policy/v1/poddisruptionbudget.go | 9 --------- .../applyconfigurations/policy/v1beta1/eviction.go | 9 --------- .../policy/v1beta1/poddisruptionbudget.go | 9 --------- .../policy/v1beta1/podsecuritypolicy.go | 9 --------- .../client-go/applyconfigurations/rbac/v1/clusterrole.go | 9 --------- .../applyconfigurations/rbac/v1/clusterrolebinding.go | 9 --------- .../k8s.io/client-go/applyconfigurations/rbac/v1/role.go | 9 --------- .../client-go/applyconfigurations/rbac/v1/rolebinding.go | 9 --------- .../applyconfigurations/rbac/v1alpha1/clusterrole.go | 9 --------- .../rbac/v1alpha1/clusterrolebinding.go | 9 --------- .../client-go/applyconfigurations/rbac/v1alpha1/role.go | 9 --------- .../applyconfigurations/rbac/v1alpha1/rolebinding.go | 9 --------- .../applyconfigurations/rbac/v1beta1/clusterrole.go | 9 --------- .../rbac/v1beta1/clusterrolebinding.go | 9 --------- .../client-go/applyconfigurations/rbac/v1beta1/role.go | 9 --------- .../applyconfigurations/rbac/v1beta1/rolebinding.go | 9 --------- .../applyconfigurations/scheduling/v1/priorityclass.go | 9 --------- .../scheduling/v1alpha1/priorityclass.go | 9 --------- .../scheduling/v1beta1/priorityclass.go | 9 --------- .../applyconfigurations/storage/v1/csidriver.go | 9 --------- .../client-go/applyconfigurations/storage/v1/csinode.go | 9 --------- .../applyconfigurations/storage/v1/storageclass.go | 9 --------- .../applyconfigurations/storage/v1/volumeattachment.go | 9 --------- .../storage/v1alpha1/csistoragecapacity.go | 9 --------- .../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 --------- .../storage/v1beta1/volumeattachment.go | 9 --------- 109 files changed, 981 deletions(-) diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go index 7ae061e3ca20..df10171e84ca 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go index ae19ed81edcb..3bbdbacc2319 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index 178745c23424..af0b1ac0c036 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go index e60d997f8a4d..2de7bb2b32fc 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go b/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go index 180b7762597a..a0732d0627ab 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/controllerrevision.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/controllerrevision.go index 28a0c582b83a..c818fd9fd6c5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonset.go index 6dd8c6e889ee..c8886190063f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/daemonset.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deployment.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deployment.go index d33321c52b79..4364ca65cc9f 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/deployment.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicaset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicaset.go index 0affbf82f29d..f8e87da98c3b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/replicaset.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulset.go index 7cb5ec12c19b..ad8fef28bfd7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1/statefulset.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/controllerrevision.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/controllerrevision.go index bcdfa44b2d32..4d5c851da2d8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deployment.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deployment.go index eddab1789888..c04dd56ef47a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulset.go index a4f64cd85bb4..b6b8100bed27 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulset.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/controllerrevision.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/controllerrevision.go index f5d906162a12..147f52c7beba 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/controllerrevision.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonset.go index 92708f0a8b10..7786c27832d9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonset.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deployment.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deployment.go index ad0c509db5fc..197dd51148fb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/deployment.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicaset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicaset.go index e2998f2c33a6..458b2513ccd0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicaset.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/scale.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/scale.go index 9b98fbb856dc..547bb6fb18c3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/scale.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulset.go b/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulset.go index 0a242310cca3..bda280d9d067 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulset.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go index bf04b01313f1..9ea70befa92a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scale.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scale.go index 27862e9c9ed9..9fea50d57f90 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v1/scale.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go index af805488ecc7..8008f6d1e2fc 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go index e2c24646be46..18be79829b25 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go index 381925b23bc6..e1e88118345a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjob.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjob.go index 749163cc30cd..95cd8bd469da 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/cronjob.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/job.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/job.go index bb84a58b02d0..fe82f0a9cf78 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/job.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobtemplatespec.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobtemplatespec.go index 46df3722f106..613036164c79 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1/jobtemplatespec.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjob.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjob.go index 8b16bc55c204..7477eccf4350 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjob.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/jobtemplatespec.go b/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/jobtemplatespec.go index bad60e1fbf87..1a6670297721 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/batch/v1beta1/jobtemplatespec.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequest.go index 9d46541b7488..152c16249fd9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go index 907b81983e8d..d64b31a95dd5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1/lease.go b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1/lease.go index fcaddb663b49..a219569776ad 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1/lease.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/lease.go b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/lease.go index f63ddc29eece..4bff597a0b9d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1beta1/lease.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go index 6983a689b2f4..86c6f3885de3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmap.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmap.go index 0664c18498b2..59011a259ccd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/configmap.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go index b3b302fe2612..12844ad7694c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/event.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/event.go index 3a0c53694586..65bd7c00b6dd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/event.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go index 03207b8ec1b5..ab30ab6658e3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespace.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespace.go index ec29bcfd99ea..636b948e7f0e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/namespace.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/node.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/node.go index b26e9f499c3f..43c824d1e515 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/node.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go index dcef6020f828..a684d3b504b1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go index 8ed20fa29c7e..759d06af2520 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go index ac1b6bf0155c..954184df67f3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/pod.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/pod.go index c3649829a785..db078fd0ba45 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/pod.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go index 1460977c0c91..9fb3958d5092 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go index ff06ea4b33a4..ec0ca55563aa 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go index 6dd6ae267592..98f84163e84b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go index 5cfb1988b12b..206606441d95 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secret.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secret.go index 00d789f4163e..d7597ce75eef 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/secret.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/service.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/service.go index 31b47311fff9..bfd223038637 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/service.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go index 459d025ebbf6..a65899c73509 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointslice.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointslice.go index 6feaab25dc6c..efcbf98f5573 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointslice.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointslice.go b/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointslice.go index bacc1134db3f..865f062739e5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointslice.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/events/v1/event.go b/staging/src/k8s.io/client-go/applyconfigurations/events/v1/event.go index 19cc9e0adc5e..a5d567327878 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/events/v1/event.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/events/v1beta1/event.go b/staging/src/k8s.io/client-go/applyconfigurations/events/v1beta1/event.go index f02bdd2b988b..ea5fd10d95a2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/events/v1beta1/event.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonset.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonset.go index 1455873258e3..1be0ab48e929 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonset.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deployment.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deployment.go index e64e4ca38098..c518d1622d31 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingress.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingress.go index df4fbc2cd18a..cc280664375b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicy.go index 965292516041..4603c699e976 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go index cceec69f995a..f5ec80b43320 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicaset.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicaset.go index b57cefc9da68..86a122fb57d6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicaset.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/scale.go b/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/scale.go index 1f774e63f208..5147e9655819 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/extensions/v1beta1/scale.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/flowschema.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/flowschema.go index 2a76cf32eb6a..07534f9dccf8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/flowschema.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go index 4f36afe53cac..4c683ac677aa 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschema.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschema.go index 794ff25a7b2c..37155f632888 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschema.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go index 57d1cd397de0..1b5624c75345 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschema.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschema.go index 323d7241d31b..df1f6ce777c9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschema.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go index 4ac11bba65be..21c046ebe179 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereview.go b/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereview.go index a6eb538020fe..ec55eae52ed7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1/imagereview.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go index 0aeaeba27411..9aa840e8d344 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingress.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingress.go index 74c0bb273d09..448f80ad9049 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingress.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclass.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclass.go index 5b36992e45b0..7145e2b965a1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/ingressclass.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicy.go index 7091d7cfd503..e3376ac64d7c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingress.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingress.go index 6b87d1ff3c67..24b3663aa237 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclass.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclass.go index 3a13cd083422..9394003af02e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclass.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/node/v1/runtimeclass.go b/staging/src/k8s.io/client-go/applyconfigurations/node/v1/runtimeclass.go index 1521f2cef56f..9a2967d0f3eb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/node/v1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclass.go b/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclass.go index 295e763d76b1..79cd3e4d9eb3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/runtimeclass.go b/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/runtimeclass.go index 2424e205e3d3..e9e083c186d9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/node/v1beta1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/eviction.go b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/eviction.go index 07bda7467ef6..2bdf685ab77b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/eviction.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudget.go index 888c20f60638..4f4fa9543827 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/eviction.go b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/eviction.go index e1f0f137ee40..8f177627b451 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/eviction.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudget.go index fc28026f5d1e..f159d727a5e1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/podsecuritypolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/podsecuritypolicy.go index 0500824c9b3b..5b52c1eecc3d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/policy/v1beta1/podsecuritypolicy.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrole.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrole.go index 1b4b515963d1..678a0633ad6c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrole.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrolebinding.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrolebinding.go index d17fc6e55a38..560566bee5d6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/role.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/role.go index 854441bbd99d..796063d533a3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/role.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/rolebinding.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/rolebinding.go index 88075a70d0b8..f2f3f58187f9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1/rolebinding.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrole.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrole.go index ae9cfc474903..d7a3fac1d8e5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrole.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go index f5a2c03bb6ab..79cedc83ab1a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/role.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/role.go index ec5bebceccaf..6d9b141e0fa6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/role.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/rolebinding.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/rolebinding.go index 930f9489ff26..0aa5dfd13e0b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/rolebinding.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrole.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrole.go index 1574f8f6606e..31665983424e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrole.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrolebinding.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrolebinding.go index 152a23b4927f..7619a36d4783 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/role.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/role.go index dc6ff2a40f57..97f1ce5e0e73 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/role.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/rolebinding.go b/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/rolebinding.go index aeef6ec8fab1..8d7e3221eca3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/rbac/v1beta1/rolebinding.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/scheduling/v1/priorityclass.go b/staging/src/k8s.io/client-go/applyconfigurations/scheduling/v1/priorityclass.go index 5d528ea7cf82..8b9c3575e2cf 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/scheduling/v1/priorityclass.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/scheduling/v1alpha1/priorityclass.go b/staging/src/k8s.io/client-go/applyconfigurations/scheduling/v1alpha1/priorityclass.go index 2b2aac316567..a0a190bf90e7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/scheduling/v1alpha1/priorityclass.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/scheduling/v1beta1/priorityclass.go b/staging/src/k8s.io/client-go/applyconfigurations/scheduling/v1beta1/priorityclass.go index 14b1feea62dc..a3d97dbcc4c8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/scheduling/v1beta1/priorityclass.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/storage/v1/csidriver.go b/staging/src/k8s.io/client-go/applyconfigurations/storage/v1/csidriver.go index cf9073a0fd31..bc6c85fbe1ec 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/storage/v1/csidriver.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/storage/v1/csinode.go b/staging/src/k8s.io/client-go/applyconfigurations/storage/v1/csinode.go index e65582d8908c..acc3a2922584 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/storage/v1/csinode.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/storage/v1/storageclass.go b/staging/src/k8s.io/client-go/applyconfigurations/storage/v1/storageclass.go index 2df999c24a9a..6994a71aad19 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/storage/v1/storageclass.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachment.go b/staging/src/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachment.go index 5fd3d4d8e6fb..3e87a98fa92b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/storage/v1alpha1/csistoragecapacity.go b/staging/src/k8s.io/client-go/applyconfigurations/storage/v1alpha1/csistoragecapacity.go index a7ad0717bf89..09645fe388ab 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/storage/v1alpha1/csistoragecapacity.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachment.go b/staging/src/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachment.go index 7a30919649ca..33031eb35fd1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/csidriver.go b/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/csidriver.go index 4ff0fcdf199d..fdd839f57863 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/csidriver.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/csinode.go b/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/csinode.go index fce97b456dea..fd2f5fad99f7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/csinode.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/csistoragecapacity.go b/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/csistoragecapacity.go index afd2e2a9ef7d..92482411eca3 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/csistoragecapacity.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/storageclass.go b/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/storageclass.go index a4b924ee8cab..41eb350c76b2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/storageclass.go +++ b/staging/src/k8s.io/client-go/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/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/volumeattachment.go b/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/volumeattachment.go index 553bfee98cbc..b6f8c8e75ddd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/storage/v1beta1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/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 9b2908ea3b98edbb1a8bcaf4e3e429283b2debfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Wed, 19 Jan 2022 21:13:25 +0100 Subject: [PATCH 12/16] Cleanup apiserver storage selflink references where possible --- .../pkg/storage/cacher/caching_object.go | 3 +- .../pkg/storage/cacher/caching_object_test.go | 29 ++++++++++--------- .../pkg/storage/etcd3/api_object_versioner.go | 2 +- .../apiserver/pkg/storage/etcd3/store_test.go | 10 +++---- 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/caching_object.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/caching_object.go index 752a28714c30..1ce675a1ed51 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/caching_object.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/caching_object.go @@ -60,8 +60,7 @@ type serializationsCache map[runtime.Identifier]*serializationResult // so that each of those is computed exactly once. // // cachingObject implements the metav1.Object interface (accessors for -// all metadata fields). However, setters for all fields except from -// SelfLink (which is set lately in the path) are ignored. +// all metadata fields). type cachingObject struct { lock sync.RWMutex diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/caching_object_test.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/caching_object_test.go index 14adcda65c2f..f992573bab31 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/caching_object_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/caching_object_test.go @@ -83,36 +83,39 @@ func TestCachingObject(t *testing.T) { } } -func TestSelfLink(t *testing.T) { +func TestCachingObjectFieldAccessors(t *testing.T) { object, err := newCachingObject(&v1.Pod{}) if err != nil { t.Fatalf("couldn't create cachingObject: %v", err) } - selfLink := "selfLink" - object.SetSelfLink(selfLink) - encodeSelfLink := func(obj runtime.Object, w io.Writer) error { + // Given accessors for all fields implement the same logic, + // we are choosing an arbitrary one to test. + clusterName := "clusterName" + object.SetClusterName(clusterName) + + encodeClusterName := func(obj runtime.Object, w io.Writer) error { accessor, err := meta.Accessor(obj) if err != nil { t.Fatalf("failed to get accessor for %#v: %v", obj, err) } - _, err = w.Write([]byte(accessor.GetSelfLink())) + _, err = w.Write([]byte(accessor.GetClusterName())) return err } buffer := bytes.NewBuffer(nil) - if err := object.CacheEncode("", encodeSelfLink, buffer); err != nil { + if err := object.CacheEncode("", encodeClusterName, buffer); err != nil { t.Errorf("unexpected error: %v", err) } - if a, e := buffer.String(), selfLink; a != e { + if a, e := buffer.String(), clusterName; a != e { t.Errorf("unexpected serialization: %s, expected: %s", a, e) } - // GetObject should also set selfLink. + // GetObject should also set clusterName. buffer.Reset() - if err := encodeSelfLink(object.GetObject(), buffer); err != nil { + if err := encodeClusterName(object.GetObject(), buffer); err != nil { t.Errorf("unexpected error: %v", err) } - if a, e := buffer.String(), selfLink; a != e { + if a, e := buffer.String(), clusterName; a != e { t.Errorf("unexpected serialization: %s, expected: %s", a, e) } } @@ -136,7 +139,7 @@ func TestCachingObjectRaces(t *testing.T) { for i := 0; i < numWorkers; i++ { go func() { defer wg.Done() - object.SetSelfLink("selfLink") + object.SetClusterName("clusterName") buffer := bytes.NewBuffer(nil) for _, encoder := range encoders { buffer.Reset() @@ -152,8 +155,8 @@ func TestCachingObjectRaces(t *testing.T) { t.Errorf("failed to get accessor: %v", err) return } - if selfLink := accessor.GetSelfLink(); selfLink != "selfLink" { - t.Errorf("unexpected selfLink: %s", selfLink) + if clusterName := accessor.GetClusterName(); clusterName != "clusterName" { + t.Errorf("unexpected clusterName: %s", clusterName) } }() } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/api_object_versioner.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/api_object_versioner.go index c42fc6e08eae..a5e88fd01c5f 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/api_object_versioner.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/api_object_versioner.go @@ -60,7 +60,7 @@ func (a APIObjectVersioner) UpdateList(obj runtime.Object, resourceVersion uint6 return nil } -// PrepareObjectForStorage clears resource version and self link prior to writing to etcd. +// PrepareObjectForStorage clears resourceVersion and selfLink prior to writing to etcd. func (a APIObjectVersioner) PrepareObjectForStorage(obj runtime.Object) error { accessor, err := meta.Accessor(obj) if err != nil { diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go index 2a5de51255f5..e22228534dce 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go @@ -135,7 +135,7 @@ func TestCreate(t *testing.T) { t.Errorf("output should have non-empty resource version") } if out.SelfLink != "" { - t.Errorf("output should have empty self link") + t.Errorf("output should have empty selfLink") } checkStorageInvariants(ctx, t, etcdClient, store, key) @@ -158,7 +158,7 @@ func checkStorageInvariants(ctx context.Context, t *testing.T, etcdClient *clien t.Errorf("stored object should have empty resource version") } if obj.SelfLink != "" { - t.Errorf("stored output should have empty self link") + t.Errorf("stored output should have empty selfLink") } } @@ -686,7 +686,7 @@ func TestGuaranteedUpdate(t *testing.T) { expectNotFoundErr: false, expectInvalidObjErr: false, expectNoUpdate: true, - }, { // GuaranteedUpdate with same data AND a self link + }, { // GuaranteedUpdate with same data AND a selfLink key: key, ignoreNotFound: false, precondition: nil, @@ -768,7 +768,7 @@ func TestGuaranteedUpdate(t *testing.T) { t.Errorf("#%d: pod name want=%s, get=%s", i, name, out.ObjectMeta.Name) } if out.SelfLink != "" { - t.Errorf("#%d: selflink should not be set", i) + t.Errorf("#%d: selfLink should not be set", i) } // verify that kv pair is not empty after set and that the underlying data matches expectations @@ -2359,7 +2359,7 @@ func TestLeaseMaxObjectCount(t *testing.T) { }) ctx := context.Background() - obj := &example.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", SelfLink: "testlink"}} + obj := &example.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} out := &example.Pod{} testCases := []struct { From b62774f2f7907e0d519026e8fc3cfaf50eaa5d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Wed, 19 Jan 2022 21:19:25 +0100 Subject: [PATCH 13/16] Couple remaining SelfLink references cleanup --- staging/src/k8s.io/sample-controller/controller.go | 2 +- test/fixtures/pkg/kubectl/cmd/apply/deploy-serverside.yaml | 1 - test/integration/etcd/etcd_cross_group_test.go | 5 +++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/staging/src/k8s.io/sample-controller/controller.go b/staging/src/k8s.io/sample-controller/controller.go index 439fafa5152d..3d2dbaf15940 100644 --- a/staging/src/k8s.io/sample-controller/controller.go +++ b/staging/src/k8s.io/sample-controller/controller.go @@ -376,7 +376,7 @@ func (c *Controller) handleObject(obj interface{}) { foo, err := c.foosLister.Foos(object.GetNamespace()).Get(ownerRef.Name) if err != nil { - klog.V(4).Infof("ignoring orphaned object '%s' of foo '%s'", object.GetSelfLink(), ownerRef.Name) + klog.V(4).Infof("ignoring orphaned object '%s/%s' of foo '%s'", object.GetNamespace(), object.GetName(), ownerRef.Name) return } diff --git a/test/fixtures/pkg/kubectl/cmd/apply/deploy-serverside.yaml b/test/fixtures/pkg/kubectl/cmd/apply/deploy-serverside.yaml index 664b87fd7702..4ecd3ff12416 100644 --- a/test/fixtures/pkg/kubectl/cmd/apply/deploy-serverside.yaml +++ b/test/fixtures/pkg/kubectl/cmd/apply/deploy-serverside.yaml @@ -11,7 +11,6 @@ metadata: name: nginx-deployment namespace: test resourceVersion: "355959" - selfLink: /apis/extensions/v1beta1/namespaces/test/deployments/nginx-deployment uid: 51ac266e-9a37-11e6-8738-0800270c4edc spec: replicas: 1 diff --git a/test/integration/etcd/etcd_cross_group_test.go b/test/integration/etcd/etcd_cross_group_test.go index 860cfca30e52..4f5651cad342 100644 --- a/test/integration/etcd/etcd_cross_group_test.go +++ b/test/integration/etcd/etcd_cross_group_test.go @@ -29,6 +29,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/watch" + "k8s.io/apiserver/pkg/storage/etcd3" "k8s.io/client-go/dynamic" "k8s.io/kubernetes/cmd/kube-apiserver/app/options" ) @@ -118,11 +119,11 @@ func TestCrossGroupStorage(t *testing.T) { } } + versioner := etcd3.APIObjectVersioner{} for _, resource := range resources { // clear out the things cleared in etcd versioned := versionedData[resource.Mapping.Resource] - versioned.SetResourceVersion("") - versioned.SetSelfLink("") + versioner.PrepareObjectForStorage(versioned) versionedJSON, err := versioned.MarshalJSON() if err != nil { t.Error(err) From e46415bfbc14b5e382cad78ccf437426e68134ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Thu, 20 Jan 2022 10:01:09 +0100 Subject: [PATCH 14/16] Bump RemoveSelfLink feature gate to GA --- staging/src/k8s.io/apiserver/pkg/features/kube_features.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/staging/src/k8s.io/apiserver/pkg/features/kube_features.go b/staging/src/k8s.io/apiserver/pkg/features/kube_features.go index 83fe98fbe082..acc36999065d 100644 --- a/staging/src/k8s.io/apiserver/pkg/features/kube_features.go +++ b/staging/src/k8s.io/apiserver/pkg/features/kube_features.go @@ -135,6 +135,7 @@ const ( // owner: @wojtek-t // alpha: v1.16 // beta: v1.20 + // GA: v1.24 // // Deprecates and removes SelfLink from ObjectMeta and ListMeta. RemoveSelfLink featuregate.Feature = "RemoveSelfLink" @@ -224,7 +225,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS StorageVersionAPI: {Default: false, PreRelease: featuregate.Alpha}, WatchBookmark: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, APIPriorityAndFairness: {Default: true, PreRelease: featuregate.Beta}, - RemoveSelfLink: {Default: true, PreRelease: featuregate.Beta}, + RemoveSelfLink: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, SelectorIndex: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, WarningHeaders: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, EfficientWatchResumption: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, From c5a98327f5a2e721e53cbc7ef9bb1236bf90318e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Thu, 20 Jan 2022 10:18:48 +0100 Subject: [PATCH 15/16] Update SelfLink OpenAPI documentation --- .../apimachinery/pkg/apis/meta/v1/types.go | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 1675cfbaac03..d478ff9f0238 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -58,13 +58,7 @@ type TypeMeta struct { // ListMeta describes metadata that synthetic resources must have, including lists and // various status objects. A resource may have only one of {ObjectMeta, ListMeta}. type ListMeta struct { - // selfLink is a URL representing this object. - // Populated by the system. - // Read-only. - // - // DEPRECATED - // Kubernetes will stop propagating this field in 1.20 release and the field is planned - // to be removed in 1.21 release. + // selfLink is DEPRECATED read-only field that is no longer populated by the system. // +optional SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,1,opt,name=selfLink"` @@ -152,13 +146,7 @@ type ObjectMeta struct { // +optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` - // SelfLink is a URL representing this object. - // Populated by the system. - // Read-only. - // - // DEPRECATED - // Kubernetes will stop propagating this field in 1.20 release and the field is planned - // to be removed in 1.21 release. + // selfLink is DEPRECATED read-only field that is no longer populated by the system. // +optional SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"` From 9732bf0d336fe67d7d21831de199373d117f2d75 Mon Sep 17 00:00:00 2001 From: wojtekt Date: Mon, 14 Feb 2022 11:51:28 +0100 Subject: [PATCH 16/16] Autogenerated --- api/openapi-spec/swagger.json | 4 ++-- api/openapi-spec/v3/api__v1_openapi.json | 4 ++-- ...admissionregistration.k8s.io__v1_openapi.json | 4 ++-- .../apis__apiextensions.k8s.io__v1_openapi.json | 4 ++-- api/openapi-spec/v3/apis__apps__v1_openapi.json | 4 ++-- .../apis__authentication.k8s.io__v1_openapi.json | 2 +- .../apis__authorization.k8s.io__v1_openapi.json | 2 +- .../v3/apis__autoscaling__v1_openapi.json | 4 ++-- .../v3/apis__autoscaling__v2_openapi.json | 4 ++-- .../v3/apis__autoscaling__v2beta1_openapi.json | 4 ++-- .../v3/apis__autoscaling__v2beta2_openapi.json | 4 ++-- api/openapi-spec/v3/apis__batch__v1_openapi.json | 4 ++-- .../v3/apis__batch__v1beta1_openapi.json | 4 ++-- .../apis__certificates.k8s.io__v1_openapi.json | 4 ++-- .../apis__coordination.k8s.io__v1_openapi.json | 4 ++-- .../v3/apis__discovery.k8s.io__v1_openapi.json | 4 ++-- .../apis__discovery.k8s.io__v1beta1_openapi.json | 4 ++-- .../v3/apis__events.k8s.io__v1_openapi.json | 4 ++-- .../v3/apis__events.k8s.io__v1beta1_openapi.json | 4 ++-- ...ontrol.apiserver.k8s.io__v1beta1_openapi.json | 4 ++-- ...ontrol.apiserver.k8s.io__v1beta2_openapi.json | 4 ++-- ...ernal.apiserver.k8s.io__v1alpha1_openapi.json | 4 ++-- .../v3/apis__networking.k8s.io__v1_openapi.json | 4 ++-- .../v3/apis__node.k8s.io__v1_openapi.json | 4 ++-- .../v3/apis__node.k8s.io__v1alpha1_openapi.json | 4 ++-- .../v3/apis__node.k8s.io__v1beta1_openapi.json | 4 ++-- .../v3/apis__policy__v1_openapi.json | 4 ++-- .../v3/apis__policy__v1beta1_openapi.json | 4 ++-- ...s__rbac.authorization.k8s.io__v1_openapi.json | 4 ++-- .../v3/apis__scheduling.k8s.io__v1_openapi.json | 4 ++-- .../v3/apis__storage.k8s.io__v1_openapi.json | 4 ++-- .../apis__storage.k8s.io__v1alpha1_openapi.json | 4 ++-- .../apis__storage.k8s.io__v1beta1_openapi.json | 4 ++-- .../generated/openapi/zz_generated.openapi.go | 4 ++-- .../pkg/apis/meta/v1/generated.proto | 16 ++-------------- .../apis/meta/v1/types_swagger_doc_generated.go | 4 ++-- .../apiserver/openapi/zz_generated.openapi.go | 4 ++-- .../generated/openapi/zz_generated.openapi.go | 4 ++-- .../generated/openapi/zz_generated.openapi.go | 4 ++-- 39 files changed, 76 insertions(+), 88 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 04af998f5bda..03da70cd12bf 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -16657,7 +16657,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -16782,7 +16782,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/api__v1_openapi.json b/api/openapi-spec/v3/api__v1_openapi.json index 1bc6e9f13972..dafde1e326cd 100644 --- a/api/openapi-spec/v3/api__v1_openapi.json +++ b/api/openapi-spec/v3/api__v1_openapi.json @@ -7123,7 +7123,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -7254,7 +7254,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json index e3074772a407..e287703d489f 100644 --- a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json @@ -849,7 +849,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -975,7 +975,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json index 42b149a25b82..b4f9ef7e0246 100644 --- a/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json @@ -1133,7 +1133,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -1259,7 +1259,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__apps__v1_openapi.json b/api/openapi-spec/v3/apis__apps__v1_openapi.json index 053f8192e901..c3a3bb8193db 100644 --- a/api/openapi-spec/v3/apis__apps__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apps__v1_openapi.json @@ -4553,7 +4553,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -4679,7 +4679,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__authentication.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__authentication.k8s.io__v1_openapi.json index c6e60d68e6bd..63eab2391082 100644 --- a/api/openapi-spec/v3/apis__authentication.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__authentication.k8s.io__v1_openapi.json @@ -349,7 +349,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__authorization.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__authorization.k8s.io__v1_openapi.json index 1a08362d1df4..21434222f391 100644 --- a/api/openapi-spec/v3/apis__authorization.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__authorization.k8s.io__v1_openapi.json @@ -629,7 +629,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json b/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json index a89ada1b1509..68bbdfe69165 100644 --- a/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json +++ b/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json @@ -595,7 +595,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -721,7 +721,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json b/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json index 871e43cd407a..dce009ed7d2a 100644 --- a/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json +++ b/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json @@ -1130,7 +1130,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -1256,7 +1256,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__autoscaling__v2beta1_openapi.json b/api/openapi-spec/v3/apis__autoscaling__v2beta1_openapi.json index 88e2188b09eb..1dbe5134e701 100644 --- a/api/openapi-spec/v3/apis__autoscaling__v2beta1_openapi.json +++ b/api/openapi-spec/v3/apis__autoscaling__v2beta1_openapi.json @@ -1044,7 +1044,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -1170,7 +1170,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__autoscaling__v2beta2_openapi.json b/api/openapi-spec/v3/apis__autoscaling__v2beta2_openapi.json index 3830914780b6..347d4f8637f4 100644 --- a/api/openapi-spec/v3/apis__autoscaling__v2beta2_openapi.json +++ b/api/openapi-spec/v3/apis__autoscaling__v2beta2_openapi.json @@ -1121,7 +1121,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -1247,7 +1247,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__batch__v1_openapi.json b/api/openapi-spec/v3/apis__batch__v1_openapi.json index 6fc9bf772724..7992a1b4eb6a 100644 --- a/api/openapi-spec/v3/apis__batch__v1_openapi.json +++ b/api/openapi-spec/v3/apis__batch__v1_openapi.json @@ -3779,7 +3779,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -3905,7 +3905,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__batch__v1beta1_openapi.json b/api/openapi-spec/v3/apis__batch__v1beta1_openapi.json index efbdf31219c2..406d3b70eeda 100644 --- a/api/openapi-spec/v3/apis__batch__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__batch__v1beta1_openapi.json @@ -3581,7 +3581,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -3707,7 +3707,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json index 5795a43cb1d0..ce2a40624143 100644 --- a/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json @@ -634,7 +634,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -760,7 +760,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json index 9406d114a1e1..18fc4870de3f 100644 --- a/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json @@ -526,7 +526,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -657,7 +657,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json index 14dee44d2cbe..160f70e721f7 100644 --- a/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json @@ -682,7 +682,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -808,7 +808,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__discovery.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__discovery.k8s.io__v1beta1_openapi.json index b4e00f5bfe82..131474fa47c6 100644 --- a/api/openapi-spec/v3/apis__discovery.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__discovery.k8s.io__v1beta1_openapi.json @@ -672,7 +672,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -798,7 +798,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json index 5ac6f86d4bf3..d79e2cd86930 100644 --- a/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json @@ -628,7 +628,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -759,7 +759,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__events.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__events.k8s.io__v1beta1_openapi.json index 09c687db98c4..173c1cc5c3e7 100644 --- a/api/openapi-spec/v3/apis__events.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__events.k8s.io__v1beta1_openapi.json @@ -628,7 +628,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -759,7 +759,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1beta1_openapi.json index 21d4d956a369..6397d1266ef5 100644 --- a/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1beta1_openapi.json @@ -1019,7 +1019,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -1145,7 +1145,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1beta2_openapi.json b/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1beta2_openapi.json index 5ce59ce1f105..3995efb8d994 100644 --- a/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1beta2_openapi.json +++ b/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1beta2_openapi.json @@ -1019,7 +1019,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -1145,7 +1145,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json index 431b908b1a26..6d945004ca2f 100644 --- a/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json @@ -608,7 +608,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -734,7 +734,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json index 1f7c19156088..3e2ae2caf0c7 100644 --- a/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json @@ -1134,7 +1134,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -1260,7 +1260,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json index 22390ee4efc6..3e118140726e 100644 --- a/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json @@ -587,7 +587,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -713,7 +713,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__node.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__node.k8s.io__v1alpha1_openapi.json index c3bc195eebdd..d466bf277aa7 100644 --- a/api/openapi-spec/v3/apis__node.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__node.k8s.io__v1alpha1_openapi.json @@ -601,7 +601,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -727,7 +727,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__node.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__node.k8s.io__v1beta1_openapi.json index 4b46d9e74ccd..9d8589c42d23 100644 --- a/api/openapi-spec/v3/apis__node.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__node.k8s.io__v1beta1_openapi.json @@ -587,7 +587,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -713,7 +713,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__policy__v1_openapi.json b/api/openapi-spec/v3/apis__policy__v1_openapi.json index 1d2b069d5554..75d661c707bc 100644 --- a/api/openapi-spec/v3/apis__policy__v1_openapi.json +++ b/api/openapi-spec/v3/apis__policy__v1_openapi.json @@ -681,7 +681,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -807,7 +807,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__policy__v1beta1_openapi.json b/api/openapi-spec/v3/apis__policy__v1beta1_openapi.json index 45b33e341dd2..87eab6d17c9e 100644 --- a/api/openapi-spec/v3/apis__policy__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__policy__v1beta1_openapi.json @@ -1132,7 +1132,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -1258,7 +1258,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json index a50c16aae167..37147006cac9 100644 --- a/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json @@ -906,7 +906,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -1032,7 +1032,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json index 891c279d6f6c..8152af4c3385 100644 --- a/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json @@ -514,7 +514,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -640,7 +640,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json index 7cf86633af6e..bad0d5197f58 100644 --- a/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json @@ -1983,7 +1983,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -2109,7 +2109,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json index 9c86750f1c77..66279d3255af 100644 --- a/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json @@ -574,7 +574,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -700,7 +700,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/api/openapi-spec/v3/apis__storage.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__storage.k8s.io__v1beta1_openapi.json index 65035c0ee9d0..ab95bf3d172c 100644 --- a/api/openapi-spec/v3/apis__storage.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__storage.k8s.io__v1beta1_openapi.json @@ -574,7 +574,7 @@ "type": "string" }, "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" } }, @@ -700,7 +700,7 @@ "type": "string" }, "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "description": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "type": "string" }, "uid": { diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/generated/openapi/zz_generated.openapi.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/generated/openapi/zz_generated.openapi.go index 475826c01999..4f7227cef939 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/generated/openapi/zz_generated.openapi.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/generated/openapi/zz_generated.openapi.go @@ -2051,7 +2051,7 @@ func schema_pkg_apis_meta_v1_ListMeta(ref common.ReferenceCallback) common.OpenA Properties: map[string]spec.Schema{ "selfLink": { SchemaProps: spec.SchemaProps{ - Description: "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Description: "selfLink is DEPRECATED read-only field that is no longer populated by the system.", Type: []string{"string"}, Format: "", }, @@ -2277,7 +2277,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, "selfLink": { SchemaProps: spec.SchemaProps{ - Description: "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Description: "selfLink is DEPRECATED read-only field that is no longer populated by the system.", Type: []string{"string"}, Format: "", }, diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index 3cad881541e4..462050d0b8d6 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -457,13 +457,7 @@ message List { // ListMeta describes metadata that synthetic resources must have, including lists and // various status objects. A resource may have only one of {ObjectMeta, ListMeta}. message ListMeta { - // selfLink is a URL representing this object. - // Populated by the system. - // Read-only. - // - // DEPRECATED - // Kubernetes will stop propagating this field in 1.20 release and the field is planned - // to be removed in 1.21 release. + // selfLink is DEPRECATED read-only field that is no longer populated by the system. // +optional optional string selfLink = 1; @@ -683,13 +677,7 @@ message ObjectMeta { // +optional optional string namespace = 3; - // SelfLink is a URL representing this object. - // Populated by the system. - // Read-only. - // - // DEPRECATED - // Kubernetes will stop propagating this field in 1.20 release and the field is planned - // to be removed in 1.21 release. + // selfLink is DEPRECATED read-only field that is no longer populated by the system. // +optional optional string selfLink = 4; diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go index c1ee9f607644..03aeca411556 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go @@ -195,7 +195,7 @@ func (List) SwaggerDoc() map[string]string { var map_ListMeta = map[string]string{ "": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", - "selfLink": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "selfLink": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "resourceVersion": "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", "continue": "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.", "remainingItemCount": "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.", @@ -242,7 +242,7 @@ var map_ObjectMeta = map[string]string{ "name": "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", "generateName": "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", "namespace": "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", - "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "selfLink": "selfLink is DEPRECATED read-only field that is no longer populated by the system.", "uid": "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", "resourceVersion": "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", "generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/openapi/zz_generated.openapi.go b/staging/src/k8s.io/code-generator/examples/apiserver/openapi/zz_generated.openapi.go index fac628add81e..d490ded1b5ad 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/openapi/zz_generated.openapi.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/openapi/zz_generated.openapi.go @@ -1114,7 +1114,7 @@ func schema_pkg_apis_meta_v1_ListMeta(ref common.ReferenceCallback) common.OpenA Properties: map[string]spec.Schema{ "selfLink": { SchemaProps: spec.SchemaProps{ - Description: "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Description: "selfLink is DEPRECATED read-only field that is no longer populated by the system.", Type: []string{"string"}, Format: "", }, @@ -1340,7 +1340,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, "selfLink": { SchemaProps: spec.SchemaProps{ - Description: "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Description: "selfLink is DEPRECATED read-only field that is no longer populated by the system.", Type: []string{"string"}, Format: "", }, diff --git a/staging/src/k8s.io/kube-aggregator/pkg/generated/openapi/zz_generated.openapi.go b/staging/src/k8s.io/kube-aggregator/pkg/generated/openapi/zz_generated.openapi.go index 6be69bb9bdef..5c7e60b0b974 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/generated/openapi/zz_generated.openapi.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/generated/openapi/zz_generated.openapi.go @@ -1117,7 +1117,7 @@ func schema_pkg_apis_meta_v1_ListMeta(ref common.ReferenceCallback) common.OpenA Properties: map[string]spec.Schema{ "selfLink": { SchemaProps: spec.SchemaProps{ - Description: "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Description: "selfLink is DEPRECATED read-only field that is no longer populated by the system.", Type: []string{"string"}, Format: "", }, @@ -1343,7 +1343,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, "selfLink": { SchemaProps: spec.SchemaProps{ - Description: "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Description: "selfLink is DEPRECATED read-only field that is no longer populated by the system.", Type: []string{"string"}, Format: "", }, diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/openapi/zz_generated.openapi.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/openapi/zz_generated.openapi.go index fbd677a8fa75..f78cadc6b55e 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/openapi/zz_generated.openapi.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/openapi/zz_generated.openapi.go @@ -1115,7 +1115,7 @@ func schema_pkg_apis_meta_v1_ListMeta(ref common.ReferenceCallback) common.OpenA Properties: map[string]spec.Schema{ "selfLink": { SchemaProps: spec.SchemaProps{ - Description: "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Description: "selfLink is DEPRECATED read-only field that is no longer populated by the system.", Type: []string{"string"}, Format: "", }, @@ -1341,7 +1341,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, "selfLink": { SchemaProps: spec.SchemaProps{ - Description: "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Description: "selfLink is DEPRECATED read-only field that is no longer populated by the system.", Type: []string{"string"}, Format: "", },