-
Notifications
You must be signed in to change notification settings - Fork 1.6k
✨ (helm/v2-alpha): Make webhook and metrics ports configurable #5172
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
✨ (helm/v2-alpha): Make webhook and metrics ports configurable #5172
Conversation
|
Hi @liam-mackie Could you please give a hand on the review of this one as well? |
- Add configurable webhook.port (default: 9443) and metrics.port (default: 8443) in values.yaml - Add comprehensive unit tests for port configuration with default and custom values
c29b63b to
81a6a7e
Compare
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.
Amazing work! Single nit on whether to continue string matching or start marshalling into structures we can traverse programatically a little easier.
| // Template webhook ports (9443 by default) | ||
| if isWebhook { | ||
| // Replace containerPort: 9443 (or any value) for webhook-server with template | ||
| if strings.Contains(yamlContent, "webhook-server") { |
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.
nit: should we consider using a similar pattern to the unstructured package and trying to structure the data rather than string matching?
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.
I think we could try that, but wouldn’t that apply to whole plugin?
What do you think? Should we check in a follow-up to see if we could improve this horizontally?
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.
Yeah - I think that's something we can improve anywhere in the package with some neat generic functions. Once I'm back from Kubecon I'll likely have some more time to contribute, and I'll start implementation. This PR is fine as-is and if we decide to go with a more structured approach, we can refactor the project as a whole :)
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, liam-mackie The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Closes: #5172