Skip to content

Commit 2d0a4f7

Browse files
authored
Merge pull request kubernetes#129166 from kannon92/move-node-features-to-features
[KEP-3041]: deprecate nodefeature for feature labels
2 parents f018667 + 8495df6 commit 2d0a4f7

38 files changed

+198
-62
lines changed

test/e2e/auth/service_accounts.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import (
3838
watch "k8s.io/apimachinery/pkg/watch"
3939
"k8s.io/client-go/util/retry"
4040
"k8s.io/kubernetes/plugin/pkg/admission/serviceaccount"
41+
"k8s.io/kubernetes/test/e2e/feature"
4142
"k8s.io/kubernetes/test/e2e/framework"
4243
e2ekubectl "k8s.io/kubernetes/test/e2e/framework/kubectl"
4344
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
@@ -364,7 +365,7 @@ var _ = SIGDescribe("ServiceAccounts", func() {
364365
Containers MUST verify that the projected service account token can be
365366
read and has correct file mode set including ownership and permission.
366367
*/
367-
f.It("should set ownership and permission when RunAsUser or FsGroup is present [LinuxOnly]", nodefeature.FSGroup, func(ctx context.Context) {
368+
f.It("should set ownership and permission when RunAsUser or FsGroup is present [LinuxOnly]", nodefeature.FSGroup, feature.FSGroup, func(ctx context.Context) {
368369
e2eskipper.SkipIfNodeOSDistroIs("windows")
369370

370371
var (

test/e2e/common/node/downwardapi.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"k8s.io/apimachinery/pkg/api/resource"
2525
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2626
"k8s.io/apimachinery/pkg/util/uuid"
27+
"k8s.io/kubernetes/test/e2e/feature"
2728
"k8s.io/kubernetes/test/e2e/framework"
2829
e2enetwork "k8s.io/kubernetes/test/e2e/framework/network"
2930
e2epodoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"
@@ -314,7 +315,7 @@ var _ = SIGDescribe("Downward API", func() {
314315
})
315316
})
316317

317-
var _ = SIGDescribe("Downward API", framework.WithSerial(), framework.WithDisruptive(), nodefeature.DownwardAPIHugePages, func() {
318+
var _ = SIGDescribe("Downward API", framework.WithSerial(), framework.WithDisruptive(), nodefeature.DownwardAPIHugePages, feature.DownwardAPIHugePages, func() {
318319
f := framework.NewDefaultFramework("downward-api")
319320
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
320321

test/e2e/common/node/runtimeclass.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
"k8s.io/apimachinery/pkg/watch"
3434
"k8s.io/kubernetes/pkg/kubelet/events"
3535
runtimeclasstest "k8s.io/kubernetes/pkg/kubelet/runtimeclass/testing"
36+
"k8s.io/kubernetes/test/e2e/feature"
3637
"k8s.io/kubernetes/test/e2e/framework"
3738
e2eevents "k8s.io/kubernetes/test/e2e/framework/events"
3839
e2eruntimeclass "k8s.io/kubernetes/test/e2e/framework/node/runtimeclass"
@@ -60,7 +61,7 @@ var _ = SIGDescribe("RuntimeClass", func() {
6061
})
6162

6263
// The test CANNOT be made a Conformance as it depends on a container runtime to have a specific handler not being installed.
63-
f.It("should reject a Pod requesting a RuntimeClass with an unconfigured handler", nodefeature.RuntimeHandler, func(ctx context.Context) {
64+
f.It("should reject a Pod requesting a RuntimeClass with an unconfigured handler", nodefeature.RuntimeHandler, feature.RuntimeHandler, func(ctx context.Context) {
6465
handler := f.Namespace.Name + "-handler"
6566
rcName := createRuntimeClass(ctx, f, "unconfigured-handler", handler, nil)
6667
ginkgo.DeferCleanup(deleteRuntimeClass, f, rcName)
@@ -84,7 +85,7 @@ var _ = SIGDescribe("RuntimeClass", func() {
8485

8586
// This test requires that the PreconfiguredRuntimeClassHandler has already been set up on nodes.
8687
// The test CANNOT be made a Conformance as it depends on a container runtime to have a specific handler installed and working.
87-
f.It("should run a Pod requesting a RuntimeClass with a configured handler", nodefeature.RuntimeHandler, func(ctx context.Context) {
88+
f.It("should run a Pod requesting a RuntimeClass with a configured handler", nodefeature.RuntimeHandler, feature.RuntimeHandler, func(ctx context.Context) {
8889
if err := e2eruntimeclass.NodeSupportsPreconfiguredRuntimeClassHandler(ctx, f); err != nil {
8990
e2eskipper.Skipf("Skipping test as node does not have E2E runtime class handler preconfigured in container runtime config: %v", err)
9091
}

test/e2e/common/node/security_context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ var _ = SIGDescribe("Security Context", func() {
541541
}
542542
})
543543

544-
f.It("should run the container as privileged when true [LinuxOnly]", nodefeature.HostAccess, func(ctx context.Context) {
544+
f.It("should run the container as privileged when true [LinuxOnly]", nodefeature.HostAccess, feature.HostAccess, func(ctx context.Context) {
545545
podName := createAndWaitUserPod(ctx, true)
546546
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, podName, podName)
547547
if err != nil {

test/e2e/common/storage/configmap_volume.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
apierrors "k8s.io/apimachinery/pkg/api/errors"
2828
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2929
"k8s.io/apimachinery/pkg/util/uuid"
30+
"k8s.io/kubernetes/test/e2e/feature"
3031
"k8s.io/kubernetes/test/e2e/framework"
3132
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
3233
e2epodoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"
@@ -60,7 +61,7 @@ var _ = SIGDescribe("ConfigMap", func() {
6061
doConfigMapE2EWithoutMappings(ctx, f, false, 0, &defaultMode)
6162
})
6263

63-
f.It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [LinuxOnly]", nodefeature.FSGroup, func(ctx context.Context) {
64+
f.It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [LinuxOnly]", nodefeature.FSGroup, feature.FSGroup, func(ctx context.Context) {
6465
// Windows does not support RunAsUser / FSGroup SecurityContext options, and it does not support setting file permissions.
6566
e2eskipper.SkipIfNodeOSDistroIs("windows")
6667
defaultMode := int32(0440) /* setting fsGroup sets mode to at least 440 */
@@ -76,7 +77,7 @@ var _ = SIGDescribe("ConfigMap", func() {
7677
doConfigMapE2EWithoutMappings(ctx, f, true, 0, nil)
7778
})
7879

79-
f.It("should be consumable from pods in volume as non-root with FSGroup [LinuxOnly]", nodefeature.FSGroup, func(ctx context.Context) {
80+
f.It("should be consumable from pods in volume as non-root with FSGroup [LinuxOnly]", nodefeature.FSGroup, feature.FSGroup, func(ctx context.Context) {
8081
// Windows does not support RunAsUser / FSGroup SecurityContext options.
8182
e2eskipper.SkipIfNodeOSDistroIs("windows")
8283
doConfigMapE2EWithoutMappings(ctx, f, true, 1001, nil)
@@ -111,7 +112,7 @@ var _ = SIGDescribe("ConfigMap", func() {
111112
doConfigMapE2EWithMappings(ctx, f, true, 0, nil)
112113
})
113114

114-
f.It("should be consumable from pods in volume with mappings as non-root with FSGroup [LinuxOnly]", nodefeature.FSGroup, func(ctx context.Context) {
115+
f.It("should be consumable from pods in volume with mappings as non-root with FSGroup [LinuxOnly]", nodefeature.FSGroup, feature.FSGroup, func(ctx context.Context) {
115116
// Windows does not support RunAsUser / FSGroup SecurityContext options.
116117
e2eskipper.SkipIfNodeOSDistroIs("windows")
117118
doConfigMapE2EWithMappings(ctx, f, true, 1001, nil)

test/e2e/common/storage/downwardapi_volume.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"k8s.io/apimachinery/pkg/api/resource"
2626
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2727
"k8s.io/apimachinery/pkg/util/uuid"
28+
"k8s.io/kubernetes/test/e2e/feature"
2829
"k8s.io/kubernetes/test/e2e/framework"
2930
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
3031
e2epodoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"
@@ -93,7 +94,7 @@ var _ = SIGDescribe("Downward API volume", func() {
9394
})
9495
})
9596

96-
f.It("should provide podname as non-root with fsgroup [LinuxOnly]", nodefeature.FSGroup, func(ctx context.Context) {
97+
f.It("should provide podname as non-root with fsgroup [LinuxOnly]", nodefeature.FSGroup, feature.FSGroup, func(ctx context.Context) {
9798
// Windows does not support RunAsUser / FSGroup SecurityContext options.
9899
e2eskipper.SkipIfNodeOSDistroIs("windows")
99100
podName := "metadata-volume-" + string(uuid.NewUUID())
@@ -108,7 +109,7 @@ var _ = SIGDescribe("Downward API volume", func() {
108109
})
109110
})
110111

111-
f.It("should provide podname as non-root with fsgroup and defaultMode [LinuxOnly]", nodefeature.FSGroup, func(ctx context.Context) {
112+
f.It("should provide podname as non-root with fsgroup and defaultMode [LinuxOnly]", nodefeature.FSGroup, feature.FSGroup, func(ctx context.Context) {
112113
// Windows does not support RunAsUser / FSGroup SecurityContext options, and it does not support setting file permissions.
113114
e2eskipper.SkipIfNodeOSDistroIs("windows")
114115
podName := "metadata-volume-" + string(uuid.NewUUID())

test/e2e/common/storage/empty_dir.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"k8s.io/apimachinery/pkg/api/resource"
2929
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3030
"k8s.io/apimachinery/pkg/util/uuid"
31+
"k8s.io/kubernetes/test/e2e/feature"
3132
"k8s.io/kubernetes/test/e2e/framework"
3233
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
3334
e2epodoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"
@@ -49,7 +50,7 @@ var _ = SIGDescribe("EmptyDir volumes", func() {
4950
f := framework.NewDefaultFramework("emptydir")
5051
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
5152

52-
f.Context("when FSGroup is specified [LinuxOnly]", nodefeature.FSGroup, func() {
53+
f.Context("when FSGroup is specified [LinuxOnly]", nodefeature.FSGroup, feature.FSGroup, func() {
5354

5455
ginkgo.BeforeEach(func() {
5556
// Windows does not support the FSGroup SecurityContext option.

test/e2e/common/storage/projected_configmap.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
v1 "k8s.io/api/core/v1"
2525
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2626
"k8s.io/apimachinery/pkg/util/uuid"
27+
"k8s.io/kubernetes/test/e2e/feature"
2728
"k8s.io/kubernetes/test/e2e/framework"
2829
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
2930
e2epodoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"
@@ -60,7 +61,7 @@ var _ = SIGDescribe("Projected configMap", func() {
6061
doProjectedConfigMapE2EWithoutMappings(ctx, f, false, 0, &defaultMode)
6162
})
6263

63-
f.It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [LinuxOnly]", nodefeature.FSGroup, func(ctx context.Context) {
64+
f.It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [LinuxOnly]", nodefeature.FSGroup, feature.FSGroup, func(ctx context.Context) {
6465
// Windows does not support RunAsUser / FSGroup SecurityContext options, and it does not support setting file permissions.
6566
e2eskipper.SkipIfNodeOSDistroIs("windows")
6667
defaultMode := int32(0440) /* setting fsGroup sets mode to at least 440 */
@@ -76,7 +77,7 @@ var _ = SIGDescribe("Projected configMap", func() {
7677
doProjectedConfigMapE2EWithoutMappings(ctx, f, true, 0, nil)
7778
})
7879

79-
f.It("should be consumable from pods in volume as non-root with FSGroup [LinuxOnly]", nodefeature.FSGroup, func(ctx context.Context) {
80+
f.It("should be consumable from pods in volume as non-root with FSGroup [LinuxOnly]", nodefeature.FSGroup, feature.FSGroup, func(ctx context.Context) {
8081
// Windows does not support RunAsUser / FSGroup SecurityContext options.
8182
e2eskipper.SkipIfNodeOSDistroIs("windows")
8283
doProjectedConfigMapE2EWithoutMappings(ctx, f, true, 1001, nil)
@@ -111,7 +112,7 @@ var _ = SIGDescribe("Projected configMap", func() {
111112
doProjectedConfigMapE2EWithMappings(ctx, f, true, 0, nil)
112113
})
113114

114-
f.It("should be consumable from pods in volume with mappings as non-root with FSGroup [LinuxOnly]", nodefeature.FSGroup, func(ctx context.Context) {
115+
f.It("should be consumable from pods in volume with mappings as non-root with FSGroup [LinuxOnly]", nodefeature.FSGroup, feature.FSGroup, func(ctx context.Context) {
115116
// Windows does not support RunAsUser / FSGroup SecurityContext options.
116117
e2eskipper.SkipIfNodeOSDistroIs("windows")
117118
doProjectedConfigMapE2EWithMappings(ctx, f, true, 1001, nil)

test/e2e/common/storage/projected_downwardapi.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
v1 "k8s.io/api/core/v1"
2525
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2626
"k8s.io/apimachinery/pkg/util/uuid"
27+
"k8s.io/kubernetes/test/e2e/feature"
2728
"k8s.io/kubernetes/test/e2e/framework"
2829
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
2930
e2epodoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"
@@ -93,7 +94,7 @@ var _ = SIGDescribe("Projected downwardAPI", func() {
9394
})
9495
})
9596

96-
f.It("should provide podname as non-root with fsgroup [LinuxOnly]", nodefeature.FSGroup, func(ctx context.Context) {
97+
f.It("should provide podname as non-root with fsgroup [LinuxOnly]", nodefeature.FSGroup, feature.FSGroup, func(ctx context.Context) {
9798
// Windows does not support RunAsUser / FSGroup SecurityContext options.
9899
e2eskipper.SkipIfNodeOSDistroIs("windows")
99100
podName := "metadata-volume-" + string(uuid.NewUUID())
@@ -108,7 +109,7 @@ var _ = SIGDescribe("Projected downwardAPI", func() {
108109
})
109110
})
110111

111-
f.It("should provide podname as non-root with fsgroup and defaultMode [LinuxOnly]", nodefeature.FSGroup, func(ctx context.Context) {
112+
f.It("should provide podname as non-root with fsgroup and defaultMode [LinuxOnly]", nodefeature.FSGroup, feature.FSGroup, func(ctx context.Context) {
112113
// Windows does not support RunAsUser / FSGroup SecurityContext options, and it does not support setting file permissions.
113114
e2eskipper.SkipIfNodeOSDistroIs("windows")
114115
podName := "metadata-volume-" + string(uuid.NewUUID())

0 commit comments

Comments
 (0)