Unverified Commit 11cf6043 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #55545 from osoriano/private/osoriano/gcp-initialize-alphafeaturegate

Automatic merge from submit-queue (batch tested with PRs 55545, 55548, 55815, 56136, 56185). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. 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. ```release-note NONE ``` Closes #55544
parents 21584421 58513b8c
...@@ -252,6 +252,8 @@ func generateCloudConfig(configFile *ConfigFile) (cloudConfig *CloudConfig, err ...@@ -252,6 +252,8 @@ func generateCloudConfig(configFile *ConfigFile) (cloudConfig *CloudConfig, err
cloudConfig.TokenSource = google.ComputeTokenSource("") cloudConfig.TokenSource = google.ComputeTokenSource("")
cloudConfig.UseMetadataServer = true cloudConfig.UseMetadataServer = true
featureMap := make(map[string]bool)
cloudConfig.AlphaFeatureGate = &AlphaFeatureGate{featureMap}
if configFile != nil { if configFile != nil {
if configFile.Global.ApiEndpoint != "" { if configFile.Global.ApiEndpoint != "" {
cloudConfig.ApiEndpoint = configFile.Global.ApiEndpoint cloudConfig.ApiEndpoint = configFile.Global.ApiEndpoint
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment