mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	Merge pull request #94397 from wojtek-t/stop_setting_selflink
Stop setting SelfLink in kube-apiserver.
This commit is contained in:
		@@ -35,7 +35,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"
 | 
			
		||||
	"k8s.io/client-go/dynamic"
 | 
			
		||||
	featuregatetesting "k8s.io/component-base/featuregate/testing"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestServerUp(t *testing.T) {
 | 
			
		||||
@@ -624,6 +627,8 @@ 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)
 | 
			
		||||
 
 | 
			
		||||
@@ -31,6 +31,8 @@ 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"
 | 
			
		||||
	utilfeature "k8s.io/apiserver/pkg/util/feature"
 | 
			
		||||
	"k8s.io/client-go/dynamic"
 | 
			
		||||
 | 
			
		||||
	apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
 | 
			
		||||
@@ -340,11 +342,13 @@ 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
 | 
			
		||||
 
 | 
			
		||||
@@ -1144,9 +1144,8 @@ func TestList(t *testing.T) {
 | 
			
		||||
			t.Logf("%d: body: %s", i, string(body))
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
		// TODO: future, restore get links
 | 
			
		||||
		if !selfLinker.called {
 | 
			
		||||
			t.Errorf("%d: never set self link", i)
 | 
			
		||||
		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)
 | 
			
		||||
@@ -1279,9 +1278,8 @@ func TestListCompression(t *testing.T) {
 | 
			
		||||
			t.Logf("%d: body: %s", i, string(body))
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
		// TODO: future, restore get links
 | 
			
		||||
		if !selfLinker.called {
 | 
			
		||||
			t.Errorf("%d: never set self link", i)
 | 
			
		||||
		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)
 | 
			
		||||
@@ -1399,6 +1397,7 @@ 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)
 | 
			
		||||
		}
 | 
			
		||||
@@ -1407,6 +1406,7 @@ func TestNonEmptyList(t *testing.T) {
 | 
			
		||||
			t.Errorf("Unexpected data: %#v, %s", listOut.Items[0].ObjectMeta.SelfLink, expectedSelfLink)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestSelfLinkSkipsEmptyName(t *testing.T) {
 | 
			
		||||
	storage := map[string]rest.Storage{}
 | 
			
		||||
@@ -1449,6 +1449,7 @@ func TestSelfLinkSkipsEmptyName(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)
 | 
			
		||||
		}
 | 
			
		||||
@@ -1457,8 +1458,11 @@ func TestSelfLinkSkipsEmptyName(t *testing.T) {
 | 
			
		||||
			t.Errorf("Unexpected data: %#v, %s", listOut.Items[0].ObjectMeta.SelfLink, expectedSelfLink)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestRootSelfLink(t *testing.T) {
 | 
			
		||||
	defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.RemoveSelfLink, false)()
 | 
			
		||||
 | 
			
		||||
	storage := map[string]rest.Storage{}
 | 
			
		||||
	simpleStorage := GetWithOptionsRootRESTStorage{
 | 
			
		||||
		SimpleTypedStorage: &SimpleTypedStorage{
 | 
			
		||||
@@ -1596,8 +1600,8 @@ func TestExport(t *testing.T) {
 | 
			
		||||
		t.Errorf("Expected: exported, saw: %s", itemOut.Other)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if !selfLinker.called {
 | 
			
		||||
		t.Errorf("Never set self link")
 | 
			
		||||
	if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called {
 | 
			
		||||
		t.Errorf("unexpected selfLinker.called: %v", selfLinker.called)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1635,8 +1639,8 @@ 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 !selfLinker.called {
 | 
			
		||||
		t.Errorf("Never set self link")
 | 
			
		||||
	if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called {
 | 
			
		||||
		t.Errorf("unexpected selfLinker.called: %v", selfLinker.called)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1715,6 +1719,7 @@ func BenchmarkGetNoCompression(b *testing.B) {
 | 
			
		||||
	}
 | 
			
		||||
	b.StopTimer()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestGetCompression(t *testing.T) {
 | 
			
		||||
	storage := map[string]rest.Storage{}
 | 
			
		||||
	simpleStorage := SimpleRESTStorage{
 | 
			
		||||
@@ -1781,8 +1786,8 @@ 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 !selfLinker.called {
 | 
			
		||||
			t.Errorf("Never set self link")
 | 
			
		||||
		if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called {
 | 
			
		||||
			t.Errorf("unexpected selfLinker.called: %v", selfLinker.called)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -2762,8 +2767,8 @@ func TestGetAlternateSelfLink(t *testing.T) {
 | 
			
		||||
	if itemOut.Name != simpleStorage.item.Name {
 | 
			
		||||
		t.Errorf("Unexpected data: %#v, expected %#v (%s)", itemOut, simpleStorage.item, string(body))
 | 
			
		||||
	}
 | 
			
		||||
	if !selfLinker.called {
 | 
			
		||||
		t.Errorf("Never set self link")
 | 
			
		||||
	if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called {
 | 
			
		||||
		t.Errorf("unexpected selfLinker.called: %v", selfLinker.called)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -2800,8 +2805,8 @@ func TestGetNamespaceSelfLink(t *testing.T) {
 | 
			
		||||
	if itemOut.Name != simpleStorage.item.Name {
 | 
			
		||||
		t.Errorf("Unexpected data: %#v, expected %#v (%s)", itemOut, simpleStorage.item, string(body))
 | 
			
		||||
	}
 | 
			
		||||
	if !selfLinker.called {
 | 
			
		||||
		t.Errorf("Never set self link")
 | 
			
		||||
	if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called {
 | 
			
		||||
		t.Errorf("unexpected selfLinker.called: %v", selfLinker.called)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -3342,8 +3347,8 @@ 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 !selfLinker.called {
 | 
			
		||||
		t.Errorf("Never set self link")
 | 
			
		||||
	if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called {
 | 
			
		||||
		t.Errorf("unexpected selfLinker.called: %v", selfLinker.called)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -4010,8 +4015,8 @@ func TestCreate(t *testing.T) {
 | 
			
		||||
	if response.StatusCode != http.StatusCreated {
 | 
			
		||||
		t.Errorf("Unexpected status: %d, Expected: %d, %#v", response.StatusCode, http.StatusOK, response)
 | 
			
		||||
	}
 | 
			
		||||
	if !selfLinker.called {
 | 
			
		||||
		t.Errorf("Never set self link")
 | 
			
		||||
	if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called {
 | 
			
		||||
		t.Errorf("unexpected selfLinker.called: %v", selfLinker.called)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -4080,8 +4085,8 @@ func TestCreateYAML(t *testing.T) {
 | 
			
		||||
	if response.StatusCode != http.StatusCreated {
 | 
			
		||||
		t.Errorf("Unexpected status: %d, Expected: %d, %#v", response.StatusCode, http.StatusOK, response)
 | 
			
		||||
	}
 | 
			
		||||
	if !selfLinker.called {
 | 
			
		||||
		t.Errorf("Never set self link")
 | 
			
		||||
	if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called {
 | 
			
		||||
		t.Errorf("unexpected selfLinker.called: %v", selfLinker.called)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -4140,8 +4145,8 @@ func TestCreateInNamespace(t *testing.T) {
 | 
			
		||||
	if response.StatusCode != http.StatusCreated {
 | 
			
		||||
		t.Errorf("Unexpected status: %d, Expected: %d, %#v", response.StatusCode, http.StatusOK, response)
 | 
			
		||||
	}
 | 
			
		||||
	if !selfLinker.called {
 | 
			
		||||
		t.Errorf("Never set self link")
 | 
			
		||||
	if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called {
 | 
			
		||||
		t.Errorf("unexpected selfLinker.called: %v", selfLinker.called)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -328,6 +328,12 @@ func checkName(obj runtime.Object, name, namespace string, namer ScopeNamer) err
 | 
			
		||||
//   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 <nil> items.
 | 
			
		||||
		if meta.IsListType(obj) && meta.LenList(obj) == 0 {
 | 
			
		||||
			if err := meta.SetList(obj, []runtime.Object{}); err != nil {
 | 
			
		||||
				return err
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,9 @@ 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) {
 | 
			
		||||
@@ -67,8 +69,8 @@ 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 !selfLinker.called {
 | 
			
		||||
		t.Errorf("Never set self link")
 | 
			
		||||
	if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) == selfLinker.called {
 | 
			
		||||
		t.Errorf("unexpected selfLinker.called: %v", selfLinker.called)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -159,7 +159,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
 | 
			
		||||
	StorageVersionHash:      {Default: true, PreRelease: featuregate.Beta},
 | 
			
		||||
	WatchBookmark:           {Default: true, PreRelease: featuregate.GA, LockToDefault: true},
 | 
			
		||||
	APIPriorityAndFairness:  {Default: false, PreRelease: featuregate.Alpha},
 | 
			
		||||
	RemoveSelfLink:          {Default: false, PreRelease: featuregate.Alpha},
 | 
			
		||||
	RemoveSelfLink:          {Default: true, PreRelease: featuregate.Beta},
 | 
			
		||||
	SelectorIndex:           {Default: true, PreRelease: featuregate.Beta},
 | 
			
		||||
	WarningHeaders:          {Default: true, PreRelease: featuregate.Beta},
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -111,7 +111,6 @@ var _ = SIGDescribe("Servers with support for Table transformation", func() {
 | 
			
		||||
		framework.ExpectNoError(err, "failed to get pod templates in Table form in namespace: %s", ns)
 | 
			
		||||
		framework.ExpectEqual(len(pagedTable.Rows), 2)
 | 
			
		||||
		framework.ExpectNotEqual(pagedTable.ResourceVersion, "")
 | 
			
		||||
		framework.ExpectNotEqual(pagedTable.SelfLink, "")
 | 
			
		||||
		framework.ExpectNotEqual(pagedTable.Continue, "")
 | 
			
		||||
		framework.ExpectEqual(pagedTable.Rows[0].Cells[0], "template-0000")
 | 
			
		||||
		framework.ExpectEqual(pagedTable.Rows[1].Cells[0], "template-0001")
 | 
			
		||||
@@ -138,7 +137,6 @@ var _ = SIGDescribe("Servers with support for Table transformation", func() {
 | 
			
		||||
		framework.ExpectEqual(len(table.Rows[0].Cells), len(table.ColumnDefinitions))
 | 
			
		||||
		framework.ExpectEqual(table.ColumnDefinitions[0].Name, "Name")
 | 
			
		||||
		framework.ExpectNotEqual(table.ResourceVersion, "")
 | 
			
		||||
		framework.ExpectNotEqual(table.SelfLink, "")
 | 
			
		||||
 | 
			
		||||
		out := printTable(table)
 | 
			
		||||
		gomega.Expect(out).To(gomega.MatchRegexp("^NAME\\s"))
 | 
			
		||||
 
 | 
			
		||||
@@ -686,11 +686,16 @@ 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": "` + accessor.GetSelfLink() + `",
 | 
			
		||||
			"namespace": "default",` + selfLink + `
 | 
			
		||||
			"uid": "` + string(accessor.GetUID()) + `",
 | 
			
		||||
			"resourceVersion": "` + accessor.GetResourceVersion() + `",
 | 
			
		||||
			"creationTimestamp": "` + accessor.GetCreationTimestamp().UTC().Format(time.RFC3339) + `",
 | 
			
		||||
 
 | 
			
		||||
@@ -30,11 +30,14 @@ go_test(
 | 
			
		||||
        "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/apiserver/pkg/features:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/client-go/dynamic:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/client-go/kubernetes:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/client-go/transport:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/client-go/util/cert:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/component-base/version:go_default_library",
 | 
			
		||||
        "//test/integration/framework:go_default_library",
 | 
			
		||||
        "//test/utils:go_default_library",
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,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"
 | 
			
		||||
	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"
 | 
			
		||||
@@ -790,6 +793,8 @@ func runSelfLinkTestOnNamespace(t *testing.T, c clientset.Interface, namespace s
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
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()
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user