-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure GCE AlphaFeatureGate initialized #55545
Ensure GCE AlphaFeatureGate initialized #55545
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@@ -263,6 +263,9 @@ func generateCloudConfig(configFile *ConfigFile) (cloudConfig *CloudConfig, err | |||
glog.Errorf("Encountered error for creating alpha feature gate: %v", err) | |||
} | |||
cloudConfig.AlphaFeatureGate = alphaFeatureGate | |||
} else { | |||
featureMap := make(map[string]bool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I would like to move these to Line 242.
@dixudx - please ensure that you sign the CLA. Also, moving that code to line 242 makes sense to me. |
@osoriano Please sign the CLA. Thanks. |
@dixudx I moved the AlphaFeatureGate initialization to its own block on line 242 |
} | ||
cloudConfig.AlphaFeatureGate = alphaFeatureGate | ||
} else { | ||
featureMap := make(map[string]bool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I mean,
featureMap := make(map[string]bool)
cloudConfig.AlphaFeatureGate = &AlphaFeatureGate{featureMap}
if configFile != nil {
...
alphaFeatureGate, err := NewAlphaFeatureGate(configFile.Global.AlphaFeatures)
if err != nil {
...
} else {
...
cloudConfig.AlphaFeatureGate = alphaFeatureGate
}
...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need two blocks if configFile != nil
.
Please also squash your commits. Thanks for your contribution.
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 kubernetes#55544
76896dd
to
58513b8
Compare
Ok, makes sense. I moved the code from the else block to line 242. I redeployed and the LoadBalancer was created. |
/lgtm |
/assign @saad-ali |
/ok-to-test |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: osoriano, roberthbailey, saad-ali Associated issue: 55544 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
/priority critical-urgent /remove-priority important-soon adjusting priorities for code freeze. |
[MILESTONENOTIFIER] Milestone Pull Request Current @krousey @osoriano @roberthbailey @saad-ali Note: This pull request is marked as Example update:
Pull Request Labels
|
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 here. |
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