mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Handle feature gate errors
This commit is contained in:
@@ -35,7 +35,9 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error
|
||||
// Make a local copy of the global feature gates and combine it with the gates set by this configuration.
|
||||
// This allows us to validate the config against the set of gates it will actually run against.
|
||||
localFeatureGate := utilfeature.DefaultFeatureGate.DeepCopy()
|
||||
localFeatureGate.SetFromMap(kc.FeatureGates)
|
||||
if err := localFeatureGate.SetFromMap(kc.FeatureGates); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if kc.NodeLeaseDurationSeconds <= 0 {
|
||||
allErrors = append(allErrors, fmt.Errorf("invalid configuration: NodeLeaseDurationSeconds must be greater than 0"))
|
||||
|
||||
Reference in New Issue
Block a user