mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
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
This commit is contained in:
commit
11cf604377
@ -252,6 +252,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