Promote SELinuxChangePolicy and SELinuxMount to beta

SELinuxMount stays off by default, because it changes the default
kubelet behavior. SELinuxChangePolicy is on by default and notifies users
on Pods that could get broken by SELinuxMount feature gate.
This commit is contained in:
Jan Safranek
2025-03-03 20:32:23 +01:00
parent a5dda5d879
commit 96bae53a37
6 changed files with 91 additions and 4 deletions

View File

@@ -4396,8 +4396,12 @@ func TestDropSELinuxChangePolicy(t *testing.T) {
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
for _, gate := range tc.gates {
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, gate, true)
// Set feature gates for the test. *Disable* those that are not in tc.gates.
allGates := []featuregate.Feature{features.SELinuxChangePolicy, features.SELinuxMount}
enabledGates := sets.New(tc.gates...)
for _, gate := range allGates {
enable := enabledGates.Has(gate)
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, gate, enable)
}
oldPod := tc.oldPod.DeepCopy()