mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Ensure GCE AlphaFeatureGate initialized
If no config file is specified for the controller-manager, the GCE CloudConfig.AlphaFeatureGate property is not initialized. This can cause a panic when checking for alpha features in the GCE provider. Closes #55544
This commit is contained in:
parent
858f3cbf59
commit
58513b8c0b
@ -240,6 +240,8 @@ func generateCloudConfig(configFile *ConfigFile) (cloudConfig *CloudConfig, err
|
||||
cloudConfig.TokenSource = google.ComputeTokenSource("")
|
||||
cloudConfig.UseMetadataServer = true
|
||||
|
||||
featureMap := make(map[string]bool)
|
||||
cloudConfig.AlphaFeatureGate = &AlphaFeatureGate{featureMap}
|
||||
if configFile != nil {
|
||||
if configFile.Global.ApiEndpoint != "" {
|
||||
cloudConfig.ApiEndpoint = configFile.Global.ApiEndpoint
|
||||
|
Loading…
Reference in New Issue
Block a user