Skip to content

✨ Make webhook and metrics ports configurable in Helm chart template #4890

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Okabe-Junya
Copy link
Member

@Okabe-Junya Okabe-Junya commented Jun 26, 2025

close #4802

What I changed

  • values.yaml: Added webhook.port: 9443 and metrics.port: 8443 configuration options
  • Templates: Updated Service and Deployment templates to reference {{ .Values.webhook.port }} and {{ .Values.metrics.port }}

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 26, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Okabe-Junya
Once this PR has been reviewed and has the lgtm label, please assign camilamacedo86 for approval. For more information see the Code Review Process.

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

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 26, 2025
@Okabe-Junya
Copy link
Member Author

/test all

@Okabe-Junya Okabe-Junya changed the title Make webhook port configurable in Helm chart templates U+2728 Make webhook port configurable in Helm chart templates Jun 26, 2025
@Okabe-Junya Okabe-Junya changed the title U+2728 Make webhook port configurable in Helm chart templates ✨ Make webhook port configurable in Helm chart templates Jun 26, 2025
@@ -105,7 +105,7 @@ spec:
{{- if .HasWebhooks }}
{{ "{{- if .Values.webhook.enable }}" }}
ports:
- containerPort: 9443
- containerPort: {{ "{{ .Values.webhook.port }}" }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ports as fixed for golang in the scaffold.
We cannot change the port only for helm
That will not work if you add other port.
Also, see: #4802

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, ah... I see, Understood.
I'll think about it for a moment 🙇

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I finally understand how KubeBuilder's scaffold works.
I believe it's now configurable with this diff.

Could you please review it again? Thank you

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 26, 2025
@Okabe-Junya Okabe-Junya changed the title ✨ Make webhook port configurable in Helm chart templates ✨ Make webhook and metrics ports configurable in Helm chart template Jun 26, 2025
@Okabe-Junya Okabe-Junya marked this pull request as ready for review June 26, 2025 16:55
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 26, 2025
@Okabe-Junya
Copy link
Member Author

/cc camilamacedo86

@Okabe-Junya
Copy link
Member Author

Oh, I woke up and the e2e test failed...
I'll check it later

@k8s-ci-robot
Copy link
Contributor

@Okabe-Junya: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubebuilder-e2e-k8s-1-33-0 0debb5c link true /test pull-kubebuilder-e2e-k8s-1-33-0
pull-kubebuilder-e2e-k8s-1-31-4 0debb5c link true /test pull-kubebuilder-e2e-k8s-1-31-4
pull-kubebuilder-e2e-k8s-1-32-0 0debb5c link true /test pull-kubebuilder-e2e-k8s-1-32-0

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(helm/v1-alpha) override value for webhook port
3 participants