mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Fix panic when AlphaFeatureGate isn't configured for gce.
This commit is contained in:
parent
0291bd35fb
commit
90ecc49386
@ -263,6 +263,13 @@ func generateCloudConfig(configFile *ConfigFile) (cloudConfig *CloudConfig, err
|
||||
glog.Errorf("Encountered error for creating alpha feature gate: %v", err)
|
||||
}
|
||||
cloudConfig.AlphaFeatureGate = alphaFeatureGate
|
||||
} else {
|
||||
// initialize AlphaFeatureGate when no AlphaFeatures are configured.
|
||||
alphaFeatureGate, err := NewAlphaFeatureGate([]string{})
|
||||
if err != nil {
|
||||
glog.Errorf("Encountered error for initializing alpha feature gate: %v", err)
|
||||
}
|
||||
cloudConfig.AlphaFeatureGate = alphaFeatureGate
|
||||
}
|
||||
|
||||
// retrieve projectID and zone
|
||||
|
Loading…
Reference in New Issue
Block a user