mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Merge pull request #105495 from ikeeip/storageobjectinuseprotection_lock_to_default
Lock StorageObjectInUseProtection feature gate to default
This commit is contained in:
commit
dea14dbdcc
@ -1231,30 +1231,18 @@ func TestStorageObjectInUseProtectionFiltering(t *testing.T) {
|
|||||||
pvc *v1.PersistentVolumeClaim
|
pvc *v1.PersistentVolumeClaim
|
||||||
enableStorageObjectInUseProtection bool
|
enableStorageObjectInUseProtection bool
|
||||||
}{
|
}{
|
||||||
"feature enabled - pv deletionTimeStamp not set": {
|
"pv deletionTimeStamp not set": {
|
||||||
isExpectedMatch: true,
|
isExpectedMatch: true,
|
||||||
vol: pv,
|
vol: pv,
|
||||||
pvc: pvc,
|
pvc: pvc,
|
||||||
enableStorageObjectInUseProtection: true,
|
enableStorageObjectInUseProtection: true,
|
||||||
},
|
},
|
||||||
"feature enabled - pv deletionTimeStamp set": {
|
"pv deletionTimeStamp set": {
|
||||||
isExpectedMatch: false,
|
isExpectedMatch: false,
|
||||||
vol: pvToDelete,
|
vol: pvToDelete,
|
||||||
pvc: pvc,
|
pvc: pvc,
|
||||||
enableStorageObjectInUseProtection: true,
|
enableStorageObjectInUseProtection: true,
|
||||||
},
|
},
|
||||||
"feature disabled - pv deletionTimeStamp not set": {
|
|
||||||
isExpectedMatch: true,
|
|
||||||
vol: pv,
|
|
||||||
pvc: pvc,
|
|
||||||
enableStorageObjectInUseProtection: false,
|
|
||||||
},
|
|
||||||
"feature disabled - pv deletionTimeStamp set": {
|
|
||||||
isExpectedMatch: true,
|
|
||||||
vol: pvToDelete,
|
|
||||||
pvc: pvc,
|
|
||||||
enableStorageObjectInUseProtection: false,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for name, testCase := range satisfyingTestCases {
|
for name, testCase := range satisfyingTestCases {
|
||||||
@ -1279,30 +1267,18 @@ func TestStorageObjectInUseProtectionFiltering(t *testing.T) {
|
|||||||
pvc *v1.PersistentVolumeClaim
|
pvc *v1.PersistentVolumeClaim
|
||||||
enableStorageObjectInUseProtection bool
|
enableStorageObjectInUseProtection bool
|
||||||
}{
|
}{
|
||||||
"feature enabled - pv deletionTimeStamp not set": {
|
"pv deletionTimeStamp not set": {
|
||||||
isExpectedMatch: true,
|
isExpectedMatch: true,
|
||||||
vol: createTestVolOrderedIndex(pv),
|
vol: createTestVolOrderedIndex(pv),
|
||||||
pvc: pvc,
|
pvc: pvc,
|
||||||
enableStorageObjectInUseProtection: true,
|
enableStorageObjectInUseProtection: true,
|
||||||
},
|
},
|
||||||
"feature enabled - pv deletionTimeStamp set": {
|
"pv deletionTimeStamp set": {
|
||||||
isExpectedMatch: false,
|
isExpectedMatch: false,
|
||||||
vol: createTestVolOrderedIndex(pvToDelete),
|
vol: createTestVolOrderedIndex(pvToDelete),
|
||||||
pvc: pvc,
|
pvc: pvc,
|
||||||
enableStorageObjectInUseProtection: true,
|
enableStorageObjectInUseProtection: true,
|
||||||
},
|
},
|
||||||
"feature disabled - pv deletionTimeStamp not set": {
|
|
||||||
isExpectedMatch: true,
|
|
||||||
vol: createTestVolOrderedIndex(pv),
|
|
||||||
pvc: pvc,
|
|
||||||
enableStorageObjectInUseProtection: false,
|
|
||||||
},
|
|
||||||
"feature disabled - pv deletionTimeStamp set": {
|
|
||||||
isExpectedMatch: true,
|
|
||||||
vol: createTestVolOrderedIndex(pvToDelete),
|
|
||||||
pvc: pvc,
|
|
||||||
enableStorageObjectInUseProtection: false,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
for name, testCase := range filteringTestCases {
|
for name, testCase := range filteringTestCases {
|
||||||
t.Run(name, func(t *testing.T) {
|
t.Run(name, func(t *testing.T) {
|
||||||
|
@ -801,7 +801,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
|
|||||||
MemoryManager: {Default: true, PreRelease: featuregate.Beta},
|
MemoryManager: {Default: true, PreRelease: featuregate.Beta},
|
||||||
CPUCFSQuotaPeriod: {Default: false, PreRelease: featuregate.Alpha},
|
CPUCFSQuotaPeriod: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
TopologyManager: {Default: true, PreRelease: featuregate.Beta},
|
TopologyManager: {Default: true, PreRelease: featuregate.Beta},
|
||||||
StorageObjectInUseProtection: {Default: true, PreRelease: featuregate.GA},
|
StorageObjectInUseProtection: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25
|
||||||
CSIMigration: {Default: true, PreRelease: featuregate.Beta},
|
CSIMigration: {Default: true, PreRelease: featuregate.Beta},
|
||||||
CSIMigrationGCE: {Default: false, PreRelease: featuregate.Beta}, // Off by default (requires GCE PD CSI Driver)
|
CSIMigrationGCE: {Default: false, PreRelease: featuregate.Beta}, // Off by default (requires GCE PD CSI Driver)
|
||||||
InTreePluginGCEUnregister: {Default: false, PreRelease: featuregate.Alpha},
|
InTreePluginGCEUnregister: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
|
Loading…
Reference in New Issue
Block a user