mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Merge pull request #129168 from kannon92/drop-node-features
[KEP-3041] - remove nodefeatures from k/k repo
This commit is contained in:
commit
29bf17b6cf
@ -39,7 +39,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2eevents "k8s.io/kubernetes/test/e2e/framework/events"
|
e2eevents "k8s.io/kubernetes/test/e2e/framework/events"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
testutils "k8s.io/kubernetes/test/utils"
|
testutils "k8s.io/kubernetes/test/utils"
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
@ -730,7 +729,7 @@ done
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
var _ = SIGDescribe(nodefeature.SidecarContainers, feature.SidecarContainers, "Probing restartable init container", func() {
|
var _ = SIGDescribe(feature.SidecarContainers, "Probing restartable init container", func() {
|
||||||
f := framework.NewDefaultFramework("container-probe")
|
f := framework.NewDefaultFramework("container-probe")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
|
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
|
||||||
var podClient *e2epod.PodClient
|
var podClient *e2epod.PodClient
|
||||||
|
@ -28,7 +28,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2enetwork "k8s.io/kubernetes/test/e2e/framework/network"
|
e2enetwork "k8s.io/kubernetes/test/e2e/framework/network"
|
||||||
e2epodoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"
|
e2epodoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
@ -315,7 +314,7 @@ var _ = SIGDescribe("Downward API", func() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
var _ = SIGDescribe("Downward API", framework.WithSerial(), framework.WithDisruptive(), nodefeature.DownwardAPIHugePages, feature.DownwardAPIHugePages, func() {
|
var _ = SIGDescribe("Downward API", framework.WithSerial(), framework.WithDisruptive(), feature.DownwardAPIHugePages, func() {
|
||||||
f := framework.NewDefaultFramework("downward-api")
|
f := framework.NewDefaultFramework("downward-api")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
@ -255,7 +254,7 @@ var _ = SIGDescribe("Container Lifecycle Hook", func() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
var _ = SIGDescribe(nodefeature.SidecarContainers, feature.SidecarContainers, "Restartable Init Container Lifecycle Hook", func() {
|
var _ = SIGDescribe(feature.SidecarContainers, "Restartable Init Container Lifecycle Hook", func() {
|
||||||
f := framework.NewDefaultFramework("restartable-init-container-lifecycle-hook")
|
f := framework.NewDefaultFramework("restartable-init-container-lifecycle-hook")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
|
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
|
||||||
var podClient *e2epod.PodClient
|
var podClient *e2epod.PodClient
|
||||||
|
@ -39,7 +39,6 @@ import (
|
|||||||
e2eruntimeclass "k8s.io/kubernetes/test/e2e/framework/node/runtimeclass"
|
e2eruntimeclass "k8s.io/kubernetes/test/e2e/framework/node/runtimeclass"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
"github.com/onsi/ginkgo/v2"
|
"github.com/onsi/ginkgo/v2"
|
||||||
@ -61,7 +60,7 @@ var _ = SIGDescribe("RuntimeClass", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// The test CANNOT be made a Conformance as it depends on a container runtime to have a specific handler not being installed.
|
// The test CANNOT be made a Conformance as it depends on a container runtime to have a specific handler not being installed.
|
||||||
f.It("should reject a Pod requesting a RuntimeClass with an unconfigured handler", nodefeature.RuntimeHandler, feature.RuntimeHandler, func(ctx context.Context) {
|
f.It("should reject a Pod requesting a RuntimeClass with an unconfigured handler", feature.RuntimeHandler, func(ctx context.Context) {
|
||||||
handler := f.Namespace.Name + "-handler"
|
handler := f.Namespace.Name + "-handler"
|
||||||
rcName := createRuntimeClass(ctx, f, "unconfigured-handler", handler, nil)
|
rcName := createRuntimeClass(ctx, f, "unconfigured-handler", handler, nil)
|
||||||
ginkgo.DeferCleanup(deleteRuntimeClass, f, rcName)
|
ginkgo.DeferCleanup(deleteRuntimeClass, f, rcName)
|
||||||
@ -85,7 +84,7 @@ var _ = SIGDescribe("RuntimeClass", func() {
|
|||||||
|
|
||||||
// This test requires that the PreconfiguredRuntimeClassHandler has already been set up on nodes.
|
// This test requires that the PreconfiguredRuntimeClassHandler has already been set up on nodes.
|
||||||
// The test CANNOT be made a Conformance as it depends on a container runtime to have a specific handler installed and working.
|
// The test CANNOT be made a Conformance as it depends on a container runtime to have a specific handler installed and working.
|
||||||
f.It("should run a Pod requesting a RuntimeClass with a configured handler", nodefeature.RuntimeHandler, feature.RuntimeHandler, func(ctx context.Context) {
|
f.It("should run a Pod requesting a RuntimeClass with a configured handler", feature.RuntimeHandler, func(ctx context.Context) {
|
||||||
if err := e2eruntimeclass.NodeSupportsPreconfiguredRuntimeClassHandler(ctx, f); err != nil {
|
if err := e2eruntimeclass.NodeSupportsPreconfiguredRuntimeClassHandler(ctx, f); err != nil {
|
||||||
e2eskipper.Skipf("Skipping test as node does not have E2E runtime class handler preconfigured in container runtime config: %v", err)
|
e2eskipper.Skipf("Skipping test as node does not have E2E runtime class handler preconfigured in container runtime config: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,6 @@ import (
|
|||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
e2epodoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"
|
e2epodoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
"k8s.io/utils/pointer"
|
"k8s.io/utils/pointer"
|
||||||
@ -541,7 +540,7 @@ var _ = SIGDescribe("Security Context", func() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
f.It("should run the container as privileged when true [LinuxOnly]", nodefeature.HostAccess, feature.HostAccess, func(ctx context.Context) {
|
f.It("should run the container as privileged when true [LinuxOnly]", feature.HostAccess, func(ctx context.Context) {
|
||||||
podName := createAndWaitUserPod(ctx, true)
|
podName := createAndWaitUserPod(ctx, true)
|
||||||
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, podName, podName)
|
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, podName, podName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -43,7 +43,6 @@ import (
|
|||||||
|
|
||||||
// define and freeze constants
|
// define and freeze constants
|
||||||
_ "k8s.io/kubernetes/test/e2e/feature"
|
_ "k8s.io/kubernetes/test/e2e/feature"
|
||||||
_ "k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
|
|
||||||
// test sources
|
// test sources
|
||||||
_ "k8s.io/kubernetes/test/e2e/apimachinery"
|
_ "k8s.io/kubernetes/test/e2e/apimachinery"
|
||||||
|
@ -41,11 +41,6 @@ type Feature string
|
|||||||
// "Linux" or "Windows".
|
// "Linux" or "Windows".
|
||||||
type Environment string
|
type Environment string
|
||||||
|
|
||||||
// NodeFeature is the name of a feature that a node must support. To be
|
|
||||||
// removed, see
|
|
||||||
// https://github.com/kubernetes/enhancements/tree/master/keps/sig-testing/3041-node-conformance-and-features#nodefeature.
|
|
||||||
type NodeFeature string
|
|
||||||
|
|
||||||
type Valid[T comparable] struct {
|
type Valid[T comparable] struct {
|
||||||
items sets.Set[T]
|
items sets.Set[T]
|
||||||
frozen bool
|
frozen bool
|
||||||
@ -76,14 +71,13 @@ func (v *Valid[T]) Freeze() {
|
|||||||
v.frozen = true
|
v.frozen = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// These variables contain the parameters that [WithFeature], [WithEnvironment]
|
// These variables contain the parameters that [WithFeature] and [WithEnvironment] accept.
|
||||||
// and [WithNodeFeatures] accept. The framework itself has no pre-defined
|
// The framework itself has no pre-defined
|
||||||
// constants. Test suites and tests may define their own and then add them here
|
// constants. Test suites and tests may define their own and then add them here
|
||||||
// before calling these With functions.
|
// before calling these With functions.
|
||||||
var (
|
var (
|
||||||
ValidFeatures Valid[Feature]
|
ValidFeatures Valid[Feature]
|
||||||
ValidEnvironments Valid[Environment]
|
ValidEnvironments Valid[Environment]
|
||||||
ValidNodeFeatures Valid[NodeFeature]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var errInterface = reflect.TypeOf((*error)(nil)).Elem()
|
var errInterface = reflect.TypeOf((*error)(nil)).Elem()
|
||||||
@ -421,28 +415,6 @@ func withEnvironment(name Environment) interface{} {
|
|||||||
return newLabel("Environment", string(name))
|
return newLabel("Environment", string(name))
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithNodeFeature specifies that a certain test or group of tests only works
|
|
||||||
// if the node supports a certain feature. The return value must be passed as
|
|
||||||
// additional argument to [framework.It], [framework.Describe],
|
|
||||||
// [framework.Context].
|
|
||||||
//
|
|
||||||
// The environment must be listed in ValidNodeFeatures.
|
|
||||||
func WithNodeFeature(name NodeFeature) interface{} {
|
|
||||||
return withNodeFeature(name)
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNodeFeature is a shorthand for the corresponding package function.
|
|
||||||
func (f *Framework) WithNodeFeature(name NodeFeature) interface{} {
|
|
||||||
return withNodeFeature(name)
|
|
||||||
}
|
|
||||||
|
|
||||||
func withNodeFeature(name NodeFeature) interface{} {
|
|
||||||
if !ValidNodeFeatures.items.Has(name) {
|
|
||||||
RecordBug(NewBug(fmt.Sprintf("WithNodeFeature: unknown environment %q", name), 2))
|
|
||||||
}
|
|
||||||
return newLabel("NodeFeature", string(name))
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithConformace specifies that a certain test or group of tests must pass in
|
// WithConformace specifies that a certain test or group of tests must pass in
|
||||||
// all conformant Kubernetes clusters. The return value must be passed as
|
// all conformant Kubernetes clusters. The return value must be passed as
|
||||||
// additional argument to [framework.It], [framework.Describe],
|
// additional argument to [framework.It], [framework.Describe],
|
||||||
|
@ -63,7 +63,6 @@ func RecordBugs() {
|
|||||||
var (
|
var (
|
||||||
validFeature = framework.ValidFeatures.Add("feature-foo")
|
validFeature = framework.ValidFeatures.Add("feature-foo")
|
||||||
validEnvironment = framework.ValidEnvironments.Add("Linux")
|
validEnvironment = framework.ValidEnvironments.Add("Linux")
|
||||||
validNodeFeature = framework.ValidNodeFeatures.Add("node-feature-foo")
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Describe() {
|
func Describe() {
|
||||||
@ -78,8 +77,6 @@ func Describe() {
|
|||||||
framework.WithFeature(validFeature),
|
framework.WithFeature(validFeature),
|
||||||
framework.WithEnvironment("no-such-env"),
|
framework.WithEnvironment("no-such-env"),
|
||||||
framework.WithEnvironment(validEnvironment),
|
framework.WithEnvironment(validEnvironment),
|
||||||
framework.WithNodeFeature("no-such-node-env"),
|
|
||||||
framework.WithNodeFeature(validNodeFeature),
|
|
||||||
framework.WithFeatureGate("no-such-feature-gate"),
|
framework.WithFeatureGate("no-such-feature-gate"),
|
||||||
framework.WithFeatureGate(features.Alpha),
|
framework.WithFeatureGate(features.Alpha),
|
||||||
framework.WithFeatureGate(features.Beta),
|
framework.WithFeatureGate(features.Beta),
|
||||||
@ -113,21 +110,20 @@ const (
|
|||||||
numBugs = 3
|
numBugs = 3
|
||||||
bugOutput = `ERROR: bugs.go:53: new bug
|
bugOutput = `ERROR: bugs.go:53: new bug
|
||||||
ERROR: bugs.go:58: parent
|
ERROR: bugs.go:58: parent
|
||||||
ERROR: bugs.go:72: empty strings as separators are unnecessary and need to be removed
|
ERROR: bugs.go:71: empty strings as separators are unnecessary and need to be removed
|
||||||
ERROR: bugs.go:72: trailing or leading spaces are unnecessary and need to be removed: " space1"
|
ERROR: bugs.go:71: trailing or leading spaces are unnecessary and need to be removed: " space1"
|
||||||
ERROR: bugs.go:72: trailing or leading spaces are unnecessary and need to be removed: "space2 "
|
ERROR: bugs.go:71: trailing or leading spaces are unnecessary and need to be removed: "space2 "
|
||||||
ERROR: bugs.go:77: WithFeature: unknown feature "no-such-feature"
|
ERROR: bugs.go:76: WithFeature: unknown feature "no-such-feature"
|
||||||
ERROR: bugs.go:79: WithEnvironment: unknown environment "no-such-env"
|
ERROR: bugs.go:78: WithEnvironment: unknown environment "no-such-env"
|
||||||
ERROR: bugs.go:81: WithNodeFeature: unknown environment "no-such-node-env"
|
ERROR: bugs.go:80: WithFeatureGate: the feature gate "no-such-feature-gate" is unknown
|
||||||
ERROR: bugs.go:83: WithFeatureGate: the feature gate "no-such-feature-gate" is unknown
|
ERROR: bugs.go:106: SIG label must be lowercase, no spaces and no sig- prefix, got instead: "123"
|
||||||
ERROR: bugs.go:109: SIG label must be lowercase, no spaces and no sig- prefix, got instead: "123"
|
|
||||||
ERROR: buggy/buggy.go:100: hello world
|
ERROR: buggy/buggy.go:100: hello world
|
||||||
ERROR: some/relative/path/buggy.go:200: with spaces
|
ERROR: some/relative/path/buggy.go:200: with spaces
|
||||||
`
|
`
|
||||||
// Used by unittests/list-tests. It's sorted by test name, not source code location.
|
// Used by unittests/list-tests. It's sorted by test name, not source code location.
|
||||||
ListTestsOutput = `The following spec names can be used with 'ginkgo run --focus/skip':
|
ListTestsOutput = `The following spec names can be used with 'ginkgo run --focus/skip':
|
||||||
../bugs/bugs.go:103: [sig-testing] abc space1 space2 [Feature:no-such-feature] [Feature:feature-foo] [Environment:no-such-env] [Environment:Linux] [NodeFeature:no-such-node-env] [NodeFeature:node-feature-foo] [FeatureGate:no-such-feature-gate] [FeatureGate:TestAlphaFeature] [Alpha] [FeatureGate:TestBetaFeature] [Beta] [FeatureGate:TestGAFeature] [Conformance] [NodeConformance] [Slow] [Serial] [Disruptive] [custom-label] xyz x [foo] should [bar]
|
../bugs/bugs.go:100: [sig-testing] abc space1 space2 [Feature:no-such-feature] [Feature:feature-foo] [Environment:no-such-env] [Environment:Linux] [FeatureGate:no-such-feature-gate] [FeatureGate:TestAlphaFeature] [Alpha] [FeatureGate:TestBetaFeature] [Beta] [FeatureGate:TestGAFeature] [Conformance] [NodeConformance] [Slow] [Serial] [Disruptive] [custom-label] xyz x [foo] should [bar]
|
||||||
../bugs/bugs.go:98: [sig-testing] abc space1 space2 [Feature:no-such-feature] [Feature:feature-foo] [Environment:no-such-env] [Environment:Linux] [NodeFeature:no-such-node-env] [NodeFeature:node-feature-foo] [FeatureGate:no-such-feature-gate] [FeatureGate:TestAlphaFeature] [Alpha] [FeatureGate:TestBetaFeature] [Beta] [FeatureGate:TestGAFeature] [Conformance] [NodeConformance] [Slow] [Serial] [Disruptive] [custom-label] xyz y [foo] should [bar]
|
../bugs/bugs.go:95: [sig-testing] abc space1 space2 [Feature:no-such-feature] [Feature:feature-foo] [Environment:no-such-env] [Environment:Linux] [FeatureGate:no-such-feature-gate] [FeatureGate:TestAlphaFeature] [Alpha] [FeatureGate:TestBetaFeature] [Beta] [FeatureGate:TestGAFeature] [Conformance] [NodeConformance] [Slow] [Serial] [Disruptive] [custom-label] xyz y [foo] should [bar]
|
||||||
|
|
||||||
`
|
`
|
||||||
|
|
||||||
@ -146,8 +142,6 @@ ERROR: some/relative/path/buggy.go:200: with spaces
|
|||||||
FeatureGate:TestGAFeature
|
FeatureGate:TestGAFeature
|
||||||
FeatureGate:no-such-feature-gate
|
FeatureGate:no-such-feature-gate
|
||||||
NodeConformance
|
NodeConformance
|
||||||
NodeFeature:no-such-node-env
|
|
||||||
NodeFeature:node-feature-foo
|
|
||||||
Serial
|
Serial
|
||||||
Slow
|
Slow
|
||||||
bar
|
bar
|
||||||
|
@ -34,7 +34,6 @@ import (
|
|||||||
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
e2essh "k8s.io/kubernetes/test/e2e/framework/ssh"
|
e2essh "k8s.io/kubernetes/test/e2e/framework/ssh"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
testutils "k8s.io/kubernetes/test/utils"
|
testutils "k8s.io/kubernetes/test/utils"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ import (
|
|||||||
|
|
||||||
// This test checks if node-problem-detector (NPD) runs fine without error on
|
// This test checks if node-problem-detector (NPD) runs fine without error on
|
||||||
// the up to 10 nodes in the cluster. NPD's functionality is tested in e2e_node tests.
|
// the up to 10 nodes in the cluster. NPD's functionality is tested in e2e_node tests.
|
||||||
var _ = SIGDescribe("NodeProblemDetector", nodefeature.NodeProblemDetector, feature.NodeProblemDetector, func() {
|
var _ = SIGDescribe("NodeProblemDetector", feature.NodeProblemDetector, func() {
|
||||||
const (
|
const (
|
||||||
pollInterval = 1 * time.Second
|
pollInterval = 1 * time.Second
|
||||||
pollTimeout = 1 * time.Minute
|
pollTimeout = 1 * time.Minute
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
# See the OWNERS docs at https://go.k8s.io/owners
|
|
||||||
|
|
||||||
approvers:
|
|
||||||
# Features in test/e2e/nodefeature/nodefeature.go are not directly mapped to the kubelet feature gates,
|
|
||||||
# but is a good approximation to allow adding alpha features by SIG approvers.
|
|
||||||
- feature-approvers
|
|
||||||
# Also include SIG Node approvers, keeping in-sync with test/e2e_node/OWNERS
|
|
||||||
- tallclair
|
|
||||||
- derekwaynecarr
|
|
||||||
- klueska
|
|
||||||
- sjenning
|
|
||||||
- mrunalp
|
|
||||||
- SergeyKanzhelev
|
|
||||||
- endocrimes
|
|
||||||
reviewers:
|
|
||||||
- bart0sh
|
|
||||||
- endocrimes
|
|
||||||
- sig-node-reviewers
|
|
||||||
labels:
|
|
||||||
- sig/node
|
|
@ -1,125 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2023 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 feature contains pre-defined node features used by test/e2e and/or
|
|
||||||
// test/e2e_node.
|
|
||||||
package nodefeature
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
|
||||||
)
|
|
||||||
|
|
||||||
// We are deprecating this.
|
|
||||||
// These features will be kept around for a short period so we can switch over test-infra to use WithFeature.
|
|
||||||
var (
|
|
||||||
// Please keep the list in alphabetical order.
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
CheckpointContainer = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("CheckpointContainer"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
CriticalPod = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("CriticalPod"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
DeviceManager = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("DeviceManager"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
DevicePlugin = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("DevicePlugin"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
DownwardAPIHugePages = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("DownwardAPIHugePages"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
// not used anywhere
|
|
||||||
DynamicResourceAllocation = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("DynamicResourceAllocation"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
Eviction = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("Eviction"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
GarbageCollect = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("GarbageCollect"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
GracefulNodeShutdown = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("GracefulNodeShutdown"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
GracefulNodeShutdownBasedOnPodPriority = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("GracefulNodeShutdownBasedOnPodPriority"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
HostAccess = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("HostAccess"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
ImageID = framework.WithNodeFeature(framework.ValidNodeFeatures.Add(" ImageID"))
|
|
||||||
|
|
||||||
// ImageVolume is used for testing the image volume source feature (https://kep.k8s.io/4639).
|
|
||||||
ImageVolume = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("ImageVolume"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
KubeletConfigDropInDir = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("KubeletConfigDropInDir"))
|
|
||||||
|
|
||||||
// KubeletSeparateDiskGC (SIG-node, used for testing separate image filesystem <https://kep.k8s.io/4191>)
|
|
||||||
// The tests need separate disk settings on nodes and separate filesystems in storage.conf
|
|
||||||
KubeletSeparateDiskGC = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("KubeletSeparateDiskGC"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
LSCIQuotaMonitoring = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("LSCIQuotaMonitoring"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
NodeAllocatable = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("NodeAllocatable"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
NodeProblemDetector = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("NodeProblemDetector"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
OOMScoreAdj = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("OOMScoreAdj"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
PodResources = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("PodResources"))
|
|
||||||
|
|
||||||
// ResourceHealthStatus (SIG-node, resource health Status for device plugins and DRA <https://kep.k8s.io/4680>)
|
|
||||||
ResourceHealthStatus = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("ResourceHealthStatus"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
ProcMountType = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("ProcMountType"))
|
|
||||||
|
|
||||||
// RecursiveReadOnlyMounts (SIG-node, used for testing recursive read-only mounts <https://kep.k8s.io/3857>)
|
|
||||||
RecursiveReadOnlyMounts = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("RecursiveReadOnlyMounts"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
ResourceMetrics = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("ResourceMetrics"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
RuntimeHandler = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("RuntimeHandler"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
SidecarContainers = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("SidecarContainers"))
|
|
||||||
|
|
||||||
// Added to test Swap Feature
|
|
||||||
// This label should be used when testing KEP-2400 (Node Swap Support)
|
|
||||||
Swap = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("NodeSwap"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
SystemNodeCriticalPod = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("SystemNodeCriticalPod"))
|
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
|
||||||
UserNamespacesSupport = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("UserNamespacesSupport"))
|
|
||||||
// Please keep the list in alphabetical order.
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
// This prevents adding additional ad-hoc features in tests.
|
|
||||||
framework.ValidNodeFeatures.Freeze()
|
|
||||||
}
|
|
@ -8,7 +8,6 @@ rules:
|
|||||||
- k8s.io/kubernetes/test/e2e/framework
|
- k8s.io/kubernetes/test/e2e/framework
|
||||||
- k8s.io/kubernetes/test/e2e/storage/utils
|
- k8s.io/kubernetes/test/e2e/storage/utils
|
||||||
- k8s.io/kubernetes/test/e2e/network/common
|
- k8s.io/kubernetes/test/e2e/network/common
|
||||||
- k8s.io/kubernetes/test/e2e/nodefeature
|
|
||||||
- k8s.io/kubernetes/test/e2e/perftype
|
- k8s.io/kubernetes/test/e2e/perftype
|
||||||
- k8s.io/kubernetes/test/e2e/testing-manifests
|
- k8s.io/kubernetes/test/e2e/testing-manifests
|
||||||
- k8s.io/kubernetes/test/e2e_node
|
- k8s.io/kubernetes/test/e2e_node
|
||||||
|
@ -37,7 +37,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2emetrics "k8s.io/kubernetes/test/e2e/framework/metrics"
|
e2emetrics "k8s.io/kubernetes/test/e2e/framework/metrics"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
testutils "k8s.io/kubernetes/test/utils"
|
testutils "k8s.io/kubernetes/test/utils"
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
@ -131,7 +130,7 @@ func getCheckpointContainerErrorMetric(ctx context.Context, f *framework.Framewo
|
|||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ = SIGDescribe("Checkpoint Container", nodefeature.CheckpointContainer, feature.CheckpointContainer, func() {
|
var _ = SIGDescribe("Checkpoint Container", feature.CheckpointContainer, func() {
|
||||||
f := framework.NewDefaultFramework("checkpoint-container-test")
|
f := framework.NewDefaultFramework("checkpoint-container-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
|
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
|
||||||
ginkgo.It("will checkpoint a container out of a pod", func(ctx context.Context) {
|
ginkgo.It("will checkpoint a container out of a pod", func(ctx context.Context) {
|
||||||
|
@ -32,7 +32,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
"k8s.io/utils/ptr"
|
"k8s.io/utils/ptr"
|
||||||
)
|
)
|
||||||
@ -1622,7 +1621,7 @@ var _ = SIGDescribe(framework.WithSerial(), "Containers Lifecycle", func() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
var _ = SIGDescribe(nodefeature.SidecarContainers, feature.SidecarContainers, "Containers Lifecycle", func() {
|
var _ = SIGDescribe(feature.SidecarContainers, "Containers Lifecycle", func() {
|
||||||
f := framework.NewDefaultFramework("containers-lifecycle-test")
|
f := framework.NewDefaultFramework("containers-lifecycle-test")
|
||||||
addAfterEachForCleaningUpPods(f)
|
addAfterEachForCleaningUpPods(f)
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
@ -5409,7 +5408,7 @@ var _ = SIGDescribe(nodefeature.SidecarContainers, feature.SidecarContainers, "C
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
var _ = SIGDescribe(nodefeature.SidecarContainers, feature.SidecarContainers, framework.WithSerial(), "Containers Lifecycle", func() {
|
var _ = SIGDescribe(feature.SidecarContainers, framework.WithSerial(), "Containers Lifecycle", func() {
|
||||||
f := framework.NewDefaultFramework("containers-lifecycle-test-serial")
|
f := framework.NewDefaultFramework("containers-lifecycle-test-serial")
|
||||||
addAfterEachForCleaningUpPods(f)
|
addAfterEachForCleaningUpPods(f)
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
|
@ -37,7 +37,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
@ -102,7 +101,7 @@ func dumpRunningContainer(ctx context.Context) error {
|
|||||||
var _ = SIGDescribe("Container Manager Misc", framework.WithSerial(), func() {
|
var _ = SIGDescribe("Container Manager Misc", framework.WithSerial(), func() {
|
||||||
f := framework.NewDefaultFramework("kubelet-container-manager")
|
f := framework.NewDefaultFramework("kubelet-container-manager")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
f.Describe("Validate OOM score adjustments", nodefeature.OOMScoreAdj, feature.OOMScoreAdj, func() {
|
f.Describe("Validate OOM score adjustments", feature.OOMScoreAdj, func() {
|
||||||
ginkgo.Context("once the node is setup", func() {
|
ginkgo.Context("once the node is setup", func() {
|
||||||
ginkgo.It("container runtime's oom-score-adj should be -999", func(ctx context.Context) {
|
ginkgo.It("container runtime's oom-score-adj should be -999", func(ctx context.Context) {
|
||||||
runtimePids, err := getPidsForProcess(framework.TestContext.ContainerRuntimeProcessName, framework.TestContext.ContainerRuntimePidFile)
|
runtimePids, err := getPidsForProcess(framework.TestContext.ContainerRuntimeProcessName, framework.TestContext.ContainerRuntimePidFile)
|
||||||
|
@ -41,7 +41,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Helper for makeCPUManagerPod().
|
// Helper for makeCPUManagerPod().
|
||||||
@ -710,7 +709,7 @@ func runCPUManagerTests(f *framework.Framework) {
|
|||||||
runSMTAlignmentPositiveTests(ctx, f, smtLevel)
|
runSMTAlignmentPositiveTests(ctx, f, smtLevel)
|
||||||
})
|
})
|
||||||
|
|
||||||
f.It("should not reuse CPUs of restartable init containers", nodefeature.SidecarContainers, feature.SidecarContainers, func(ctx context.Context) {
|
f.It("should not reuse CPUs of restartable init containers", feature.SidecarContainers, func(ctx context.Context) {
|
||||||
cpuCap, cpuAlloc, _ = getLocalNodeCPUDetails(ctx, f)
|
cpuCap, cpuAlloc, _ = getLocalNodeCPUDetails(ctx, f)
|
||||||
|
|
||||||
// Skip rest of the tests if CPU capacity < 3.
|
// Skip rest of the tests if CPU capacity < 3.
|
||||||
|
@ -30,7 +30,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
@ -45,7 +44,7 @@ const (
|
|||||||
bestEffortPodName = "best-effort"
|
bestEffortPodName = "best-effort"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = SIGDescribe("CriticalPod", framework.WithSerial(), framework.WithDisruptive(), nodefeature.CriticalPod, feature.CriticalPod, func() {
|
var _ = SIGDescribe("CriticalPod", framework.WithSerial(), framework.WithDisruptive(), feature.CriticalPod, func() {
|
||||||
f := framework.NewDefaultFramework("critical-pod-test")
|
f := framework.NewDefaultFramework("critical-pod-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
ginkgo.Context("when we need to admit a critical pod", func() {
|
ginkgo.Context("when we need to admit a critical pod", func() {
|
||||||
|
@ -38,7 +38,6 @@ import (
|
|||||||
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
e2etestfiles "k8s.io/kubernetes/test/e2e/framework/testfiles"
|
e2etestfiles "k8s.io/kubernetes/test/e2e/framework/testfiles"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
testutils "k8s.io/kubernetes/test/utils"
|
testutils "k8s.io/kubernetes/test/utils"
|
||||||
|
|
||||||
"github.com/onsi/ginkgo/v2"
|
"github.com/onsi/ginkgo/v2"
|
||||||
@ -52,7 +51,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Serial because the test updates kubelet configuration.
|
// Serial because the test updates kubelet configuration.
|
||||||
var _ = SIGDescribe("Device Manager", framework.WithSerial(), nodefeature.DeviceManager, feature.DeviceManager, func() {
|
var _ = SIGDescribe("Device Manager", framework.WithSerial(), feature.DeviceManager, func() {
|
||||||
f := framework.NewDefaultFramework("devicemanager-test")
|
f := framework.NewDefaultFramework("devicemanager-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
@ -41,7 +40,7 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e_node/testdeviceplugin"
|
"k8s.io/kubernetes/test/e2e_node/testdeviceplugin"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = SIGDescribe("Device Plugin Failures Pod Status", nodefeature.ResourceHealthStatus, feature.ResourceHealthStatus, func() {
|
var _ = SIGDescribe("Device Plugin Failures Pod Status", feature.ResourceHealthStatus, func() {
|
||||||
f := framework.NewDefaultFramework("device-plugin-failures")
|
f := framework.NewDefaultFramework("device-plugin-failures")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
|
|
||||||
|
@ -54,7 +54,6 @@ import (
|
|||||||
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
e2etestfiles "k8s.io/kubernetes/test/e2e/framework/testfiles"
|
e2etestfiles "k8s.io/kubernetes/test/e2e/framework/testfiles"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -63,7 +62,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Serial because the test restarts Kubelet
|
// Serial because the test restarts Kubelet
|
||||||
var _ = SIGDescribe("Device Plugin", nodefeature.DevicePlugin, framework.WithSerial(), feature.DevicePlugin, func() {
|
var _ = SIGDescribe("Device Plugin", framework.WithSerial(), feature.DevicePlugin, func() {
|
||||||
f := framework.NewDefaultFramework("device-plugin-errors")
|
f := framework.NewDefaultFramework("device-plugin-errors")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
testDevicePlugin(f, kubeletdevicepluginv1beta1.DevicePluginPath)
|
testDevicePlugin(f, kubeletdevicepluginv1beta1.DevicePluginPath)
|
||||||
@ -694,7 +693,7 @@ func testDevicePlugin(f *framework.Framework, pluginSockDir string) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
f.It("Can schedule a pod with a restartable init container", nodefeature.SidecarContainers, feature.SidecarContainers, func(ctx context.Context) {
|
f.It("Can schedule a pod with a restartable init container", feature.SidecarContainers, func(ctx context.Context) {
|
||||||
podRECMD := "devs=$(ls /tmp/ | egrep '^Dev-[0-9]+$') && echo stub devices: $devs && sleep %s"
|
podRECMD := "devs=$(ls /tmp/ | egrep '^Dev-[0-9]+$') && echo stub devices: $devs && sleep %s"
|
||||||
sleepOneSecond := "1s"
|
sleepOneSecond := "1s"
|
||||||
rl := v1.ResourceList{v1.ResourceName(SampleDeviceResourceName): *resource.NewQuantity(1, resource.DecimalSI)}
|
rl := v1.ResourceList{v1.ResourceName(SampleDeviceResourceName): *resource.NewQuantity(1, resource.DecimalSI)}
|
||||||
|
@ -55,7 +55,6 @@ import (
|
|||||||
|
|
||||||
// define and freeze constants
|
// define and freeze constants
|
||||||
_ "k8s.io/kubernetes/test/e2e/feature"
|
_ "k8s.io/kubernetes/test/e2e/feature"
|
||||||
_ "k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
|
|
||||||
// reconfigure framework
|
// reconfigure framework
|
||||||
_ "k8s.io/kubernetes/test/e2e/framework/debug/init"
|
_ "k8s.io/kubernetes/test/e2e/framework/debug/init"
|
||||||
|
@ -40,7 +40,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
testutils "k8s.io/kubernetes/test/utils"
|
testutils "k8s.io/kubernetes/test/utils"
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
@ -71,7 +70,7 @@ const (
|
|||||||
|
|
||||||
// InodeEviction tests that the node responds to node disk pressure by evicting only responsible pods.
|
// InodeEviction tests that the node responds to node disk pressure by evicting only responsible pods.
|
||||||
// Node disk pressure is induced by consuming all inodes on the node.
|
// Node disk pressure is induced by consuming all inodes on the node.
|
||||||
var _ = SIGDescribe("InodeEviction", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), nodefeature.Eviction, feature.Eviction, func() {
|
var _ = SIGDescribe("InodeEviction", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.Eviction, func() {
|
||||||
f := framework.NewDefaultFramework("inode-eviction-test")
|
f := framework.NewDefaultFramework("inode-eviction-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
expectedNodeCondition := v1.NodeDiskPressure
|
expectedNodeCondition := v1.NodeDiskPressure
|
||||||
@ -106,7 +105,7 @@ var _ = SIGDescribe("InodeEviction", framework.WithSlow(), framework.WithSerial(
|
|||||||
|
|
||||||
// ImageGCNoEviction tests that the node does not evict pods when inodes are consumed by images
|
// ImageGCNoEviction tests that the node does not evict pods when inodes are consumed by images
|
||||||
// Disk pressure is induced by pulling large images
|
// Disk pressure is induced by pulling large images
|
||||||
var _ = SIGDescribe("ImageGCNoEviction", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), nodefeature.Eviction, feature.Eviction, func() {
|
var _ = SIGDescribe("ImageGCNoEviction", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.Eviction, func() {
|
||||||
f := framework.NewDefaultFramework("image-gc-eviction-test")
|
f := framework.NewDefaultFramework("image-gc-eviction-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
pressureTimeout := 10 * time.Minute
|
pressureTimeout := 10 * time.Minute
|
||||||
@ -137,7 +136,7 @@ var _ = SIGDescribe("ImageGCNoEviction", framework.WithSlow(), framework.WithSer
|
|||||||
|
|
||||||
// MemoryAllocatableEviction tests that the node responds to node memory pressure by evicting only responsible pods.
|
// MemoryAllocatableEviction tests that the node responds to node memory pressure by evicting only responsible pods.
|
||||||
// Node memory pressure is only encountered because we reserve the majority of the node's capacity via kube-reserved.
|
// Node memory pressure is only encountered because we reserve the majority of the node's capacity via kube-reserved.
|
||||||
var _ = SIGDescribe("MemoryAllocatableEviction", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), nodefeature.Eviction, feature.Eviction, func() {
|
var _ = SIGDescribe("MemoryAllocatableEviction", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.Eviction, func() {
|
||||||
f := framework.NewDefaultFramework("memory-allocatable-eviction-test")
|
f := framework.NewDefaultFramework("memory-allocatable-eviction-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
expectedNodeCondition := v1.NodeMemoryPressure
|
expectedNodeCondition := v1.NodeMemoryPressure
|
||||||
@ -171,7 +170,7 @@ var _ = SIGDescribe("MemoryAllocatableEviction", framework.WithSlow(), framework
|
|||||||
|
|
||||||
// LocalStorageEviction tests that the node responds to node disk pressure by evicting only responsible pods
|
// LocalStorageEviction tests that the node responds to node disk pressure by evicting only responsible pods
|
||||||
// Disk pressure is induced by running pods which consume disk space.
|
// Disk pressure is induced by running pods which consume disk space.
|
||||||
var _ = SIGDescribe("LocalStorageEviction", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), nodefeature.Eviction, feature.Eviction, func() {
|
var _ = SIGDescribe("LocalStorageEviction", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.Eviction, func() {
|
||||||
f := framework.NewDefaultFramework("localstorage-eviction-test")
|
f := framework.NewDefaultFramework("localstorage-eviction-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
pressureTimeout := 15 * time.Minute
|
pressureTimeout := 15 * time.Minute
|
||||||
@ -212,7 +211,7 @@ var _ = SIGDescribe("LocalStorageEviction", framework.WithSlow(), framework.With
|
|||||||
// LocalStorageEviction tests that the node responds to node disk pressure by evicting only responsible pods
|
// LocalStorageEviction tests that the node responds to node disk pressure by evicting only responsible pods
|
||||||
// Disk pressure is induced by running pods which consume disk space, which exceed the soft eviction threshold.
|
// Disk pressure is induced by running pods which consume disk space, which exceed the soft eviction threshold.
|
||||||
// Note: This test's purpose is to test Soft Evictions. Local storage was chosen since it is the least costly to run.
|
// Note: This test's purpose is to test Soft Evictions. Local storage was chosen since it is the least costly to run.
|
||||||
var _ = SIGDescribe("LocalStorageSoftEviction", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), nodefeature.Eviction, feature.Eviction, func() {
|
var _ = SIGDescribe("LocalStorageSoftEviction", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.Eviction, func() {
|
||||||
f := framework.NewDefaultFramework("localstorage-eviction-test")
|
f := framework.NewDefaultFramework("localstorage-eviction-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
pressureTimeout := 10 * time.Minute
|
pressureTimeout := 10 * time.Minute
|
||||||
@ -250,7 +249,7 @@ var _ = SIGDescribe("LocalStorageSoftEviction", framework.WithSlow(), framework.
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
var _ = SIGDescribe("LocalStorageSoftEvictionNotOverwriteTerminationGracePeriodSeconds", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), nodefeature.Eviction, feature.Eviction, func() {
|
var _ = SIGDescribe("LocalStorageSoftEvictionNotOverwriteTerminationGracePeriodSeconds", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.Eviction, func() {
|
||||||
f := framework.NewDefaultFramework("localstorage-eviction-test")
|
f := framework.NewDefaultFramework("localstorage-eviction-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
pressureTimeout := 10 * time.Minute
|
pressureTimeout := 10 * time.Minute
|
||||||
@ -289,7 +288,7 @@ var _ = SIGDescribe("LocalStorageSoftEvictionNotOverwriteTerminationGracePeriodS
|
|||||||
})
|
})
|
||||||
|
|
||||||
// LocalStorageCapacityIsolationEviction tests that container and volume local storage limits are enforced through evictions
|
// LocalStorageCapacityIsolationEviction tests that container and volume local storage limits are enforced through evictions
|
||||||
var _ = SIGDescribe("LocalStorageCapacityIsolationEviction", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.LocalStorageCapacityIsolationQuota, nodefeature.Eviction, feature.Eviction, func() {
|
var _ = SIGDescribe("LocalStorageCapacityIsolationEviction", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.LocalStorageCapacityIsolationQuota, feature.Eviction, func() {
|
||||||
f := framework.NewDefaultFramework("localstorage-eviction-test")
|
f := framework.NewDefaultFramework("localstorage-eviction-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
evictionTestTimeout := 10 * time.Minute
|
evictionTestTimeout := 10 * time.Minute
|
||||||
@ -342,7 +341,7 @@ var _ = SIGDescribe("LocalStorageCapacityIsolationEviction", framework.WithSlow(
|
|||||||
// PriorityMemoryEvictionOrdering tests that the node responds to node memory pressure by evicting pods.
|
// PriorityMemoryEvictionOrdering tests that the node responds to node memory pressure by evicting pods.
|
||||||
// This test tests that the guaranteed pod is never evicted, and that the lower-priority pod is evicted before
|
// This test tests that the guaranteed pod is never evicted, and that the lower-priority pod is evicted before
|
||||||
// the higher priority pod.
|
// the higher priority pod.
|
||||||
var _ = SIGDescribe("PriorityMemoryEvictionOrdering", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), nodefeature.Eviction, feature.Eviction, func() {
|
var _ = SIGDescribe("PriorityMemoryEvictionOrdering", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.Eviction, func() {
|
||||||
f := framework.NewDefaultFramework("priority-memory-eviction-ordering-test")
|
f := framework.NewDefaultFramework("priority-memory-eviction-ordering-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
expectedNodeCondition := v1.NodeMemoryPressure
|
expectedNodeCondition := v1.NodeMemoryPressure
|
||||||
@ -402,7 +401,7 @@ var _ = SIGDescribe("PriorityMemoryEvictionOrdering", framework.WithSlow(), fram
|
|||||||
// PriorityLocalStorageEvictionOrdering tests that the node responds to node disk pressure by evicting pods.
|
// PriorityLocalStorageEvictionOrdering tests that the node responds to node disk pressure by evicting pods.
|
||||||
// This test tests that the guaranteed pod is never evicted, and that the lower-priority pod is evicted before
|
// This test tests that the guaranteed pod is never evicted, and that the lower-priority pod is evicted before
|
||||||
// the higher priority pod.
|
// the higher priority pod.
|
||||||
var _ = SIGDescribe("PriorityLocalStorageEvictionOrdering", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), nodefeature.Eviction, feature.Eviction, func() {
|
var _ = SIGDescribe("PriorityLocalStorageEvictionOrdering", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.Eviction, func() {
|
||||||
f := framework.NewDefaultFramework("priority-disk-eviction-ordering-test")
|
f := framework.NewDefaultFramework("priority-disk-eviction-ordering-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
expectedNodeCondition := v1.NodeDiskPressure
|
expectedNodeCondition := v1.NodeDiskPressure
|
||||||
@ -465,7 +464,7 @@ var _ = SIGDescribe("PriorityLocalStorageEvictionOrdering", framework.WithSlow()
|
|||||||
})
|
})
|
||||||
|
|
||||||
// PriorityPidEvictionOrdering tests that the node emits pid pressure in response to a fork bomb, and evicts pods by priority
|
// PriorityPidEvictionOrdering tests that the node emits pid pressure in response to a fork bomb, and evicts pods by priority
|
||||||
var _ = SIGDescribe("PriorityPidEvictionOrdering", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), nodefeature.Eviction, feature.Eviction, func() {
|
var _ = SIGDescribe("PriorityPidEvictionOrdering", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.Eviction, func() {
|
||||||
f := framework.NewDefaultFramework("pidpressure-eviction-test")
|
f := framework.NewDefaultFramework("pidpressure-eviction-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
pressureTimeout := 10 * time.Minute
|
pressureTimeout := 10 * time.Minute
|
||||||
|
@ -30,7 +30,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
"github.com/onsi/ginkgo/v2"
|
"github.com/onsi/ginkgo/v2"
|
||||||
@ -74,7 +73,7 @@ type testRun struct {
|
|||||||
|
|
||||||
// GarbageCollect tests that the Kubelet conforms to the Kubelet Garbage Collection Policy, found here:
|
// GarbageCollect tests that the Kubelet conforms to the Kubelet Garbage Collection Policy, found here:
|
||||||
// http://kubernetes.io/docs/admin/garbage-collection/
|
// http://kubernetes.io/docs/admin/garbage-collection/
|
||||||
var _ = SIGDescribe("GarbageCollect", framework.WithSerial(), nodefeature.GarbageCollect, feature.GarbageCollect, func() {
|
var _ = SIGDescribe("GarbageCollect", framework.WithSerial(), feature.GarbageCollect, func() {
|
||||||
f := framework.NewDefaultFramework("garbage-collect-test")
|
f := framework.NewDefaultFramework("garbage-collect-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
containerNamePrefix := "gc-test-container-"
|
containerNamePrefix := "gc-test-container-"
|
||||||
|
@ -29,7 +29,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
"github.com/onsi/ginkgo/v2"
|
"github.com/onsi/ginkgo/v2"
|
||||||
@ -43,7 +42,7 @@ const (
|
|||||||
checkGCFreq time.Duration = 30 * time.Second
|
checkGCFreq time.Duration = 30 * time.Second
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = SIGDescribe("ImageGarbageCollect", framework.WithSerial(), nodefeature.GarbageCollect, feature.GarbageCollect, func() {
|
var _ = SIGDescribe("ImageGarbageCollect", framework.WithSerial(), feature.GarbageCollect, func() {
|
||||||
f := framework.NewDefaultFramework("image-garbage-collect-test")
|
f := framework.NewDefaultFramework("image-garbage-collect-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
var is internalapi.ImageManagerService
|
var is internalapi.ImageManagerService
|
||||||
|
@ -25,7 +25,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
|
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
@ -33,7 +32,7 @@ import (
|
|||||||
"github.com/onsi/gomega"
|
"github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = SIGDescribe("ImageID", nodefeature.ImageID, feature.ImageID, func() {
|
var _ = SIGDescribe("ImageID", feature.ImageID, func() {
|
||||||
|
|
||||||
busyBoxImage := "registry.k8s.io/e2e-test-images/busybox@sha256:a9155b13325b2abef48e71de77bb8ac015412a566829f621d06bfae5c699b1b9"
|
busyBoxImage := "registry.k8s.io/e2e-test-images/busybox@sha256:a9155b13325b2abef48e71de77bb8ac015412a566829f621d06bfae5c699b1b9"
|
||||||
|
|
||||||
|
@ -35,13 +35,12 @@ import (
|
|||||||
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Run this single test locally using a running CRI-O instance by:
|
// Run this single test locally using a running CRI-O instance by:
|
||||||
// make test-e2e-node CONTAINER_RUNTIME_ENDPOINT="unix:///var/run/crio/crio.sock" TEST_ARGS='--ginkgo.focus="ImageVolume" --feature-gates=ImageVolume=true --service-feature-gates=ImageVolume=true --kubelet-flags="--cgroup-root=/ --runtime-cgroups=/system.slice/crio.service --kubelet-cgroups=/system.slice/kubelet.service --fail-swap-on=false"'
|
// make test-e2e-node CONTAINER_RUNTIME_ENDPOINT="unix:///var/run/crio/crio.sock" TEST_ARGS='--ginkgo.focus="ImageVolume" --feature-gates=ImageVolume=true --service-feature-gates=ImageVolume=true --kubelet-flags="--cgroup-root=/ --runtime-cgroups=/system.slice/crio.service --kubelet-cgroups=/system.slice/kubelet.service --fail-swap-on=false"'
|
||||||
var _ = SIGDescribe("ImageVolume", nodefeature.ImageVolume, feature.ImageVolume, func() {
|
var _ = SIGDescribe("ImageVolume", feature.ImageVolume, func() {
|
||||||
f := framework.NewDefaultFramework("image-volume-test")
|
f := framework.NewDefaultFramework("image-volume-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
|
|
||||||
|
@ -28,10 +28,9 @@ import (
|
|||||||
kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config"
|
kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config"
|
||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = SIGDescribe("Kubelet Config", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), nodefeature.KubeletConfigDropInDir, feature.KubeletConfigDropInDir, func() {
|
var _ = SIGDescribe("Kubelet Config", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.KubeletConfigDropInDir, func() {
|
||||||
f := framework.NewDefaultFramework("kubelet-config-drop-in-dir-test")
|
f := framework.NewDefaultFramework("kubelet-config-drop-in-dir-test")
|
||||||
ginkgo.Context("when merging drop-in configs", func() {
|
ginkgo.Context("when merging drop-in configs", func() {
|
||||||
var oldcfg *kubeletconfig.KubeletConfiguration
|
var oldcfg *kubeletconfig.KubeletConfiguration
|
||||||
|
@ -30,14 +30,13 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
"k8s.io/utils/ptr"
|
"k8s.io/utils/ptr"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Usage:
|
// Usage:
|
||||||
// make test-e2e-node TEST_ARGS='--service-feature-gates=RecursiveReadOnlyMounts=true --kubelet-flags="--feature-gates=RecursiveReadOnlyMounts=true"' FOCUS="Mount recursive read-only" SKIP=""
|
// make test-e2e-node TEST_ARGS='--service-feature-gates=RecursiveReadOnlyMounts=true --kubelet-flags="--feature-gates=RecursiveReadOnlyMounts=true"' FOCUS="Mount recursive read-only" SKIP=""
|
||||||
var _ = SIGDescribe("Mount recursive read-only [LinuxOnly]", nodefeature.RecursiveReadOnlyMounts, feature.RecursiveReadOnlyMounts, func() {
|
var _ = SIGDescribe("Mount recursive read-only [LinuxOnly]", feature.RecursiveReadOnlyMounts, func() {
|
||||||
f := framework.NewDefaultFramework("mount-rro")
|
f := framework.NewDefaultFramework("mount-rro")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
ginkgo.Describe("Mount recursive read-only", func() {
|
ginkgo.Describe("Mount recursive read-only", func() {
|
||||||
|
@ -38,7 +38,6 @@ import (
|
|||||||
|
|
||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
e2enodekubelet "k8s.io/kubernetes/test/e2e_node/kubeletconfig"
|
e2enodekubelet "k8s.io/kubernetes/test/e2e_node/kubeletconfig"
|
||||||
|
|
||||||
"github.com/onsi/ginkgo/v2"
|
"github.com/onsi/ginkgo/v2"
|
||||||
@ -72,7 +71,7 @@ func setDesiredConfiguration(initialConfig *kubeletconfig.KubeletConfiguration,
|
|||||||
var _ = SIGDescribe("Node Container Manager", framework.WithSerial(), func() {
|
var _ = SIGDescribe("Node Container Manager", framework.WithSerial(), func() {
|
||||||
f := framework.NewDefaultFramework("node-container-manager")
|
f := framework.NewDefaultFramework("node-container-manager")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
f.Describe("Validate Node Allocatable", nodefeature.NodeAllocatable, feature.NodeAllocatable, func() {
|
f.Describe("Validate Node Allocatable", feature.NodeAllocatable, func() {
|
||||||
ginkgo.It("sets up the node and runs the test", func(ctx context.Context) {
|
ginkgo.It("sets up the node and runs the test", func(ctx context.Context) {
|
||||||
framework.ExpectNoError(runTest(ctx, f))
|
framework.ExpectNoError(runTest(ctx, f))
|
||||||
})
|
})
|
||||||
|
@ -41,11 +41,10 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
testutils "k8s.io/kubernetes/test/utils"
|
testutils "k8s.io/kubernetes/test/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = SIGDescribe("NodeProblemDetector", nodefeature.NodeProblemDetector, feature.NodeProblemDetector, framework.WithSerial(), func() {
|
var _ = SIGDescribe("NodeProblemDetector", feature.NodeProblemDetector, framework.WithSerial(), func() {
|
||||||
const (
|
const (
|
||||||
pollInterval = 1 * time.Second
|
pollInterval = 1 * time.Second
|
||||||
pollConsistent = 5 * time.Second
|
pollConsistent = 5 * time.Second
|
||||||
|
@ -44,7 +44,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
|
|
||||||
"github.com/godbus/dbus/v5"
|
"github.com/godbus/dbus/v5"
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
@ -58,7 +57,7 @@ import (
|
|||||||
testutils "k8s.io/kubernetes/test/utils"
|
testutils "k8s.io/kubernetes/test/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = SIGDescribe("GracefulNodeShutdown", framework.WithSerial(), nodefeature.GracefulNodeShutdown, nodefeature.GracefulNodeShutdownBasedOnPodPriority, feature.GracefulNodeShutdown, feature.GracefulNodeShutdownBasedOnPodPriority, func() {
|
var _ = SIGDescribe("GracefulNodeShutdown", framework.WithSerial(), feature.GracefulNodeShutdown, feature.GracefulNodeShutdownBasedOnPodPriority, func() {
|
||||||
f := framework.NewDefaultFramework("graceful-node-shutdown")
|
f := framework.NewDefaultFramework("graceful-node-shutdown")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
|
|
||||||
|
@ -49,7 +49,6 @@ import (
|
|||||||
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -844,7 +843,7 @@ func podresourcesGetTests(ctx context.Context, f *framework.Framework, cli kubel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Serial because the test updates kubelet configuration.
|
// Serial because the test updates kubelet configuration.
|
||||||
var _ = SIGDescribe("POD Resources", framework.WithSerial(), feature.PodResources, nodefeature.PodResources, func() {
|
var _ = SIGDescribe("POD Resources", framework.WithSerial(), feature.PodResources, func() {
|
||||||
f := framework.NewDefaultFramework("podresources-test")
|
f := framework.NewDefaultFramework("podresources-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
|
|
||||||
@ -904,7 +903,7 @@ var _ = SIGDescribe("POD Resources", framework.WithSerial(), feature.PodResource
|
|||||||
podresourcesGetAllocatableResourcesTests(ctx, cli, sd, onlineCPUs, reservedSystemCPUs)
|
podresourcesGetAllocatableResourcesTests(ctx, cli, sd, onlineCPUs, reservedSystemCPUs)
|
||||||
})
|
})
|
||||||
|
|
||||||
framework.It("should return the expected responses", nodefeature.SidecarContainers, feature.SidecarContainers, func(ctx context.Context) {
|
framework.It("should return the expected responses", feature.SidecarContainers, func(ctx context.Context) {
|
||||||
onlineCPUs, err := getOnlineCPUs()
|
onlineCPUs, err := getOnlineCPUs()
|
||||||
framework.ExpectNoError(err, "getOnlineCPUs() failed err: %v", err)
|
framework.ExpectNoError(err, "getOnlineCPUs() failed err: %v", err)
|
||||||
|
|
||||||
@ -1008,7 +1007,7 @@ var _ = SIGDescribe("POD Resources", framework.WithSerial(), feature.PodResource
|
|||||||
podresourcesGetTests(ctx, f, cli, false)
|
podresourcesGetTests(ctx, f, cli, false)
|
||||||
})
|
})
|
||||||
|
|
||||||
framework.It("should return the expected responses", nodefeature.SidecarContainers, feature.SidecarContainers, func(ctx context.Context) {
|
framework.It("should return the expected responses", feature.SidecarContainers, func(ctx context.Context) {
|
||||||
onlineCPUs, err := getOnlineCPUs()
|
onlineCPUs, err := getOnlineCPUs()
|
||||||
framework.ExpectNoError(err, "getOnlineCPUs() failed err: %v", err)
|
framework.ExpectNoError(err, "getOnlineCPUs() failed err: %v", err)
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
testutils "k8s.io/kubernetes/test/utils"
|
testutils "k8s.io/kubernetes/test/utils"
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
@ -46,7 +45,7 @@ var _ = SIGDescribe("DefaultProcMount [LinuxOnly]", framework.WithNodeConformanc
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
var _ = SIGDescribe("ProcMount [LinuxOnly]", nodefeature.ProcMountType, feature.ProcMountType, nodefeature.UserNamespacesSupport, feature.UserNamespacesSupport, func() {
|
var _ = SIGDescribe("ProcMount [LinuxOnly]", feature.ProcMountType, feature.UserNamespacesSupport, func() {
|
||||||
f := framework.NewDefaultFramework("proc-mount-baseline-test")
|
f := framework.NewDefaultFramework("proc-mount-baseline-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
|
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
|
||||||
|
|
||||||
@ -77,7 +76,7 @@ var _ = SIGDescribe("ProcMount [LinuxOnly]", nodefeature.ProcMountType, feature.
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
var _ = SIGDescribe("ProcMount [LinuxOnly]", nodefeature.ProcMountType, feature.ProcMountType, nodefeature.UserNamespacesSupport, feature.UserNamespacesSupport, func() {
|
var _ = SIGDescribe("ProcMount [LinuxOnly]", feature.ProcMountType, feature.UserNamespacesSupport, func() {
|
||||||
f := framework.NewDefaultFramework("proc-mount-privileged-test")
|
f := framework.NewDefaultFramework("proc-mount-privileged-test")
|
||||||
|
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
|
@ -31,7 +31,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
"k8s.io/mount-utils"
|
"k8s.io/mount-utils"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
@ -101,7 +100,7 @@ func runOneQuotaTest(f *framework.Framework, quotasRequested bool, userNamespace
|
|||||||
// pod that creates a file, deletes it, and writes data to it. If
|
// pod that creates a file, deletes it, and writes data to it. If
|
||||||
// quotas are used to monitor, it will detect this deleted-but-in-use
|
// quotas are used to monitor, it will detect this deleted-but-in-use
|
||||||
// file; if du is used to monitor, it will not detect this.
|
// file; if du is used to monitor, it will not detect this.
|
||||||
var _ = SIGDescribe("LocalStorageCapacityIsolationFSQuotaMonitoring", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.LocalStorageCapacityIsolationQuota, nodefeature.LSCIQuotaMonitoring, feature.LSCIQuotaMonitoring, nodefeature.UserNamespacesSupport, feature.UserNamespacesSupport, func() {
|
var _ = SIGDescribe("LocalStorageCapacityIsolationFSQuotaMonitoring", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.LocalStorageCapacityIsolationQuota, feature.LSCIQuotaMonitoring, feature.UserNamespacesSupport, func() {
|
||||||
f := framework.NewDefaultFramework("localstorage-quota-monitoring-test")
|
f := framework.NewDefaultFramework("localstorage-quota-monitoring-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
runOneQuotaTest(f, true, true)
|
runOneQuotaTest(f, true, true)
|
||||||
|
@ -30,7 +30,6 @@ import (
|
|||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
e2evolume "k8s.io/kubernetes/test/e2e/framework/volume"
|
e2evolume "k8s.io/kubernetes/test/e2e/framework/volume"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
"github.com/prometheus/common/model"
|
"github.com/prometheus/common/model"
|
||||||
@ -47,7 +46,7 @@ const (
|
|||||||
maxStatsAge = time.Minute
|
maxStatsAge = time.Minute
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = SIGDescribe("ResourceMetricsAPI", nodefeature.ResourceMetrics, feature.ResourceMetrics, func() {
|
var _ = SIGDescribe("ResourceMetricsAPI", feature.ResourceMetrics, func() {
|
||||||
f := framework.NewDefaultFramework("resource-metrics")
|
f := framework.NewDefaultFramework("resource-metrics")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
ginkgo.Context("when querying /resource/metrics", func() {
|
ginkgo.Context("when querying /resource/metrics", func() {
|
||||||
|
@ -30,7 +30,6 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
@ -149,7 +148,7 @@ var _ = SIGDescribe("Security Context", func() {
|
|||||||
nginxPid = strings.TrimSpace(output)
|
nginxPid = strings.TrimSpace(output)
|
||||||
})
|
})
|
||||||
|
|
||||||
f.It("should show its pid in the host PID namespace", nodefeature.HostAccess, feature.HostAccess, func(ctx context.Context) {
|
f.It("should show its pid in the host PID namespace", feature.HostAccess, func(ctx context.Context) {
|
||||||
busyboxPodName := "busybox-hostpid-" + string(uuid.NewUUID())
|
busyboxPodName := "busybox-hostpid-" + string(uuid.NewUUID())
|
||||||
createAndWaitHostPidPod(ctx, busyboxPodName, true)
|
createAndWaitHostPidPod(ctx, busyboxPodName, true)
|
||||||
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, busyboxPodName, busyboxPodName)
|
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, busyboxPodName, busyboxPodName)
|
||||||
@ -169,7 +168,7 @@ var _ = SIGDescribe("Security Context", func() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
f.It("should not show its pid in the non-hostpid containers", nodefeature.HostAccess, feature.HostAccess, func(ctx context.Context) {
|
f.It("should not show its pid in the non-hostpid containers", feature.HostAccess, func(ctx context.Context) {
|
||||||
busyboxPodName := "busybox-non-hostpid-" + string(uuid.NewUUID())
|
busyboxPodName := "busybox-non-hostpid-" + string(uuid.NewUUID())
|
||||||
createAndWaitHostPidPod(ctx, busyboxPodName, false)
|
createAndWaitHostPidPod(ctx, busyboxPodName, false)
|
||||||
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, busyboxPodName, busyboxPodName)
|
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, busyboxPodName, busyboxPodName)
|
||||||
@ -225,7 +224,7 @@ var _ = SIGDescribe("Security Context", func() {
|
|||||||
framework.Logf("Got host shared memory ID %q", hostSharedMemoryID)
|
framework.Logf("Got host shared memory ID %q", hostSharedMemoryID)
|
||||||
})
|
})
|
||||||
|
|
||||||
f.It("should show the shared memory ID in the host IPC containers", nodefeature.HostAccess, feature.HostAccess, func(ctx context.Context) {
|
f.It("should show the shared memory ID in the host IPC containers", feature.HostAccess, func(ctx context.Context) {
|
||||||
ipcutilsPodName := "ipcutils-hostipc-" + string(uuid.NewUUID())
|
ipcutilsPodName := "ipcutils-hostipc-" + string(uuid.NewUUID())
|
||||||
createAndWaitHostIPCPod(ctx, ipcutilsPodName, true)
|
createAndWaitHostIPCPod(ctx, ipcutilsPodName, true)
|
||||||
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, ipcutilsPodName, ipcutilsPodName)
|
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, ipcutilsPodName, ipcutilsPodName)
|
||||||
@ -240,7 +239,7 @@ var _ = SIGDescribe("Security Context", func() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
f.It("should not show the shared memory ID in the non-hostIPC containers", nodefeature.HostAccess, feature.HostAccess, func(ctx context.Context) {
|
f.It("should not show the shared memory ID in the non-hostIPC containers", feature.HostAccess, func(ctx context.Context) {
|
||||||
ipcutilsPodName := "ipcutils-non-hostipc-" + string(uuid.NewUUID())
|
ipcutilsPodName := "ipcutils-non-hostipc-" + string(uuid.NewUUID())
|
||||||
createAndWaitHostIPCPod(ctx, ipcutilsPodName, false)
|
createAndWaitHostIPCPod(ctx, ipcutilsPodName, false)
|
||||||
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, ipcutilsPodName, ipcutilsPodName)
|
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, ipcutilsPodName, ipcutilsPodName)
|
||||||
@ -308,7 +307,7 @@ var _ = SIGDescribe("Security Context", func() {
|
|||||||
framework.Logf("Opened a new tcp port %q", listeningPort)
|
framework.Logf("Opened a new tcp port %q", listeningPort)
|
||||||
})
|
})
|
||||||
|
|
||||||
f.It("should listen on same port in the host network containers", nodefeature.HostAccess, feature.HostAccess, func(ctx context.Context) {
|
f.It("should listen on same port in the host network containers", feature.HostAccess, func(ctx context.Context) {
|
||||||
busyboxPodName := "busybox-hostnetwork-" + string(uuid.NewUUID())
|
busyboxPodName := "busybox-hostnetwork-" + string(uuid.NewUUID())
|
||||||
createAndWaitHostNetworkPod(ctx, busyboxPodName, true)
|
createAndWaitHostNetworkPod(ctx, busyboxPodName, true)
|
||||||
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, busyboxPodName, busyboxPodName)
|
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, busyboxPodName, busyboxPodName)
|
||||||
@ -322,7 +321,7 @@ var _ = SIGDescribe("Security Context", func() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
f.It("shouldn't show the same port in the non-hostnetwork containers", nodefeature.HostAccess, feature.HostAccess, func(ctx context.Context) {
|
f.It("shouldn't show the same port in the non-hostnetwork containers", feature.HostAccess, func(ctx context.Context) {
|
||||||
busyboxPodName := "busybox-non-hostnetwork-" + string(uuid.NewUUID())
|
busyboxPodName := "busybox-non-hostnetwork-" + string(uuid.NewUUID())
|
||||||
createAndWaitHostNetworkPod(ctx, busyboxPodName, false)
|
createAndWaitHostNetworkPod(ctx, busyboxPodName, false)
|
||||||
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, busyboxPodName, busyboxPodName)
|
logs, err := e2epod.GetPodLogs(ctx, f.ClientSet, f.Namespace.Name, busyboxPodName, busyboxPodName)
|
||||||
|
@ -36,7 +36,6 @@ import (
|
|||||||
kubeletmetrics "k8s.io/kubernetes/pkg/kubelet/metrics"
|
kubeletmetrics "k8s.io/kubernetes/pkg/kubelet/metrics"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ import (
|
|||||||
"github.com/onsi/gomega"
|
"github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = SIGDescribe("KubeletSeparateDiskGC", nodefeature.KubeletSeparateDiskGC, feature.KubeletSeparateDiskGC, func() {
|
var _ = SIGDescribe("KubeletSeparateDiskGC", feature.KubeletSeparateDiskGC, func() {
|
||||||
f := framework.NewDefaultFramework("split-disk-test")
|
f := framework.NewDefaultFramework("split-disk-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
pressureTimeout := 10 * time.Minute
|
pressureTimeout := 10 * time.Minute
|
||||||
|
@ -29,7 +29,6 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/kubelet/apis/config"
|
"k8s.io/kubernetes/pkg/kubelet/apis/config"
|
||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
|
|
||||||
"github.com/onsi/ginkgo/v2"
|
"github.com/onsi/ginkgo/v2"
|
||||||
@ -57,7 +56,7 @@ var (
|
|||||||
noLimits *resource.Quantity = nil
|
noLimits *resource.Quantity = nil
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = SIGDescribe("Swap", "[LinuxOnly]", nodefeature.Swap, feature.Swap, framework.WithSerial(), func() {
|
var _ = SIGDescribe("Swap", "[LinuxOnly]", feature.Swap, framework.WithSerial(), func() {
|
||||||
f := framework.NewDefaultFramework("swap-qos")
|
f := framework.NewDefaultFramework("swap-qos")
|
||||||
addAfterEachForCleaningUpPods(f)
|
addAfterEachForCleaningUpPods(f)
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
|
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline
|
||||||
|
@ -31,14 +31,13 @@ import (
|
|||||||
evictionapi "k8s.io/kubernetes/pkg/kubelet/eviction/api"
|
evictionapi "k8s.io/kubernetes/pkg/kubelet/eviction/api"
|
||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
"k8s.io/kubernetes/test/e2e/nodefeature"
|
|
||||||
admissionapi "k8s.io/pod-security-admission/api"
|
admissionapi "k8s.io/pod-security-admission/api"
|
||||||
|
|
||||||
"github.com/onsi/ginkgo/v2"
|
"github.com/onsi/ginkgo/v2"
|
||||||
"github.com/onsi/gomega"
|
"github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = SIGDescribe("SystemNodeCriticalPod", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), nodefeature.SystemNodeCriticalPod, feature.SystemNodeCriticalPod, nodefeature.Eviction, feature.Eviction, func() {
|
var _ = SIGDescribe("SystemNodeCriticalPod", framework.WithSlow(), framework.WithSerial(), framework.WithDisruptive(), feature.SystemNodeCriticalPod, feature.Eviction, func() {
|
||||||
f := framework.NewDefaultFramework("system-node-critical-pod-test")
|
f := framework.NewDefaultFramework("system-node-critical-pod-test")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
// this test only manipulates pods in kube-system
|
// this test only manipulates pods in kube-system
|
||||||
|
Loading…
Reference in New Issue
Block a user