-
Notifications
You must be signed in to change notification settings - Fork 268
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
Do not define loadBalancerIP on service unless set in values #430
Conversation
Signed-off-by: Ben Yanke <[email protected]>
Signed-off-by: Ben Yanke <[email protected]>
Signed-off-by: Ben Yanke <[email protected]>
Signed-off-by: Ben Yanke <[email protected]>
Thanks for the approval @provokateurin - is there anything else you need from me to get this merged? |
No, I'm just not experienced with the loadbalancer configuration so I want another review from @jessebot |
takin a peek :D |
Signed-off-by: JesseBot <[email protected]>
so this looks ok to me. I cloned benyanke:issue-428-b and did a helm template as is, and then again with |
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.
Requesting just a bit of an update to use ""
instead of omitting the value entirely. The change in templates/service.yaml is still good though :)
Signed-off-by: Ben Yanke <[email protected]>
Co-authored-by: JesseBot <[email protected]> Signed-off-by: Ben Yanke <[email protected]>
Co-authored-by: JesseBot <[email protected]> Signed-off-by: Ben Yanke <[email protected]>
Hi @jessebot - I've made the requested changes above. |
@benyanke awesome, thanks for your hard work and patience on this! :) After the linter runs, I'll get this merged! |
Signed-off-by: JesseBot <[email protected]>
Signed-off-by: JesseBot <[email protected]>
Can we please squash this mess? 🙈 |
Absolutely! :) I always squash and merge so that the history looks a bit cleaner and then users can always inspect the PR for more granular commit data if they choose. A maintainer can change the repo to only allow squash and merge through the general settings on this repo, but I don't have permissions for that, so right now I manually select it. |
Absolutely agree, squash merging is the way to go. |
Pull Request
Description of the change
This PR sets the
.Values.service.loadBalancerIP
field as optional, and does not define it in the service if it's not set in the values.This is because some
LoadBalancer
implementations allow or even require this value to remain unset, and while it may sometimes be fine to leave it set but blank, this could have unexpected impacts depending on your cluster configuration.In particular,
MetalLB
will leave the service<pending>
if theloadBalancerIP
is set tonil
, and hardcoding it to a value in the values breaks the ability forMetalLB
's IPAM tooling to be used for dynamic address allocation. I suspect other LoadBalancer implementations may have similar behaviors.Benefits
The primary benefit is more flexible usage with more
LoadBalancer
implementations.Possible drawbacks
None I can think of, however I am open to discussion.
Applicable issues
Additional information
For easy review on the output, here is the before and after:
After - No LB set
Note how the
loadBalancerIP
is now gone when it's not defined, for more flexible usage.After - LB Set
Note how the
loadBalancerIP
still works as before when it's defined, for full backward compatibility.After - Forcing Previous Behavior
And if you still wish to template out the field with
nil
in the value as before, that is still supported by explicitly setting tonil
.Before
Note the
nil
in theloadBalancerIP
field.Checklist
Chart.yaml
according to semver.