Skip to content

Conversation

@camilamacedo86
Copy link
Member

@camilamacedo86 camilamacedo86 commented Nov 2, 2025

  • 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

Closes: #5172

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 2, 2025
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 2, 2025
@camilamacedo86
Copy link
Member Author

@defo89 the helm/v2alpha was not released yet
I think it should be part of the initial implementation as well.

So, your request made in: #4802 can be closed with those changes to address it with helm/v2alpha

Please, feel free to help us in the review

@camilamacedo86
Copy link
Member Author

Hi @liam-mackie

Could you please give a hand on the review of this one as well?
Thank you a lot for the help !!

- 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
Copy link
Contributor

@liam-mackie liam-mackie left a 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") {
Copy link
Contributor

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?

Copy link
Member Author

@camilamacedo86 camilamacedo86 Nov 3, 2025

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?

Copy link
Contributor

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 :)

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@camilamacedo86 camilamacedo86 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 3, 2025
@k8s-ci-robot k8s-ci-robot merged commit 41ff901 into kubernetes-sigs:master Nov 3, 2025
39 of 40 checks passed
@camilamacedo86 camilamacedo86 deleted the charts-port-congig-v2 branch November 3, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-blocker size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants