File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ func dropDisabledFields(node *api.Node, oldNode *api.Node) {
107
107
node .Status .RuntimeHandlers = nil
108
108
}
109
109
110
- if ! utilfeature .DefaultFeatureGate .Enabled (features .SupplementalGroupsPolicy ) {
110
+ if ! utilfeature .DefaultFeatureGate .Enabled (features .SupplementalGroupsPolicy ) && ! supplementalGroupsPolicyInUse ( oldNode ) {
111
111
node .Status .Features = nil
112
112
}
113
113
}
@@ -299,3 +299,11 @@ func fieldIsDeprecatedWarnings(obj runtime.Object) []string {
299
299
}
300
300
return warnings
301
301
}
302
+
303
+ // supplementalGroupsPolicyInUse returns true if the node.status has NodeFeature
304
+ func supplementalGroupsPolicyInUse (node * api.Node ) bool {
305
+ if node == nil {
306
+ return false
307
+ }
308
+ return node .Status .Features != nil
309
+ }
You can’t perform that action at this time.
0 commit comments