- 
                Notifications
    
You must be signed in to change notification settings  - Fork 460
 
bug: disallow updating apiServerLB private IP after AzureCluster creation #5827
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
base: main
Are you sure you want to change the base?
Conversation
| 
           [APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. 
Needs approval from an approver in each of these files:
 
      Approvers can indicate their approval by writing   | 
    
| 
           Hi @3mbe. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with  Once the patch is verified, the new status will be reflected by the  I understand the commands that are listed here. 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-sigs/prow repository.  | 
    
          Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@            Coverage Diff             @@
##             main    #5827      +/-   ##
==========================================
+ Coverage   46.94%   46.97%   +0.02%     
==========================================
  Files         279      279              
  Lines       29687    29697      +10     
==========================================
+ Hits        13936    13949      +13     
+ Misses      14938    14936       -2     
+ Partials      813      812       -1     ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
  | 
    
| 
           /assign @jackfrancis  | 
    
| allErrs = append(allErrs, field.Forbidden(fldPath.Child("frontendIPConfigs").Index(0).Child("privateIP"), | ||
| "Public Load Balancers cannot have a Private IP")) | ||
| 
               | 
          ||
| if old != nil && len(old.FrontendIPs) > 0 && len(lb.FrontendIPs) > 0 { | 
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.
This code logic is duplicated in two places. Maybe you can make a helper function to reduce the duplication and improve the maintainability.
| allErrs = append(allErrs, field.Invalid(fldPath.Child("frontendIPConfigs"), lb.FrontendIPs, | ||
| "API Server Load balancer should have 1 Frontend IP")) | ||
| } | ||
| if feature.Gates.Enabled(feature.APIServerILB) { | 
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.
Question: Should this immutability check apply regardless of the feature gate state? Once a private IP is set, it probably shouldn't be changed even if the feature gate changes.
What type of PR is this?
/kind bug
What this PR does / why we need it:
AzureClustercreation.type: Internalandtype: Publicwhenfeature.APIServerILBis enabled.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #5314
Special notes for your reviewer:
TODOs:
Release note: