Merge pull request #51372 from mtaufen/feature-gate-file

Automatic merge from submit-queue (batch tested with PRs 49971, 51357, 51616, 51649, 51372)

Separate feature gates for dynamic kubelet config vs loading from a file

This makes it so these two features can be turned on independently, rather than bundling both under dynamic kubelet config.

fixes: #51664

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2017-09-01 01:12:47 -07:00
committed by GitHub
7 changed files with 27 additions and 31 deletions

View File

@@ -138,8 +138,8 @@ func ValidateKubeletFlags(f *KubeletFlags) error {
return fmt.Errorf("the DynamicKubeletConfig feature gate must be enabled in order to use the --dynamic-config-dir flag")
}
// ensure that nobody sets InitConfigDir if the dynamic config feature gate is turned off
if f.InitConfigDir.Provided() && !utilfeature.DefaultFeatureGate.Enabled(features.DynamicKubeletConfig) {
return fmt.Errorf("the DynamicKubeletConfig feature gate must be enabled in order to use the --init-config-dir flag")
if f.InitConfigDir.Provided() && !utilfeature.DefaultFeatureGate.Enabled(features.KubeletConfigFile) {
return fmt.Errorf("the KubeletConfigFile feature gate must be enabled in order to use the --init-config-dir flag")
}
return nil
}