mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 00:34:10 -04:00
KEP-3619: should check supplementalGroupsPolicyInUse for oldNode in dropDisabledFields for node
This commit is contained in:
parent
a89bb017a3
commit
1663223e58
1 changed files with 9 additions and 1 deletions
|
|
@ -107,7 +107,7 @@ func dropDisabledFields(node *api.Node, oldNode *api.Node) {
|
|||
node.Status.RuntimeHandlers = nil
|
||||
}
|
||||
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(features.SupplementalGroupsPolicy) {
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(features.SupplementalGroupsPolicy) && !supplementalGroupsPolicyInUse(oldNode) {
|
||||
node.Status.Features = nil
|
||||
}
|
||||
}
|
||||
|
|
@ -299,3 +299,11 @@ func fieldIsDeprecatedWarnings(obj runtime.Object) []string {
|
|||
}
|
||||
return warnings
|
||||
}
|
||||
|
||||
// supplementalGroupsPolicyInUse returns true if the node.status has NodeFeature
|
||||
func supplementalGroupsPolicyInUse(node *api.Node) bool {
|
||||
if node == nil {
|
||||
return false
|
||||
}
|
||||
return node.Status.Features != nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue