Skip to content

fix(helm): Align targetPorts in metrics endpoints for webhook and cainjector services - #8141

Closed
ssyno wants to merge 1 commit into
cert-manager:masterfrom
ssyno:targetPorts-alignment
Closed

ssyno wants to merge 1 commit into
cert-manager:masterfrom
ssyno:targetPorts-alignment

Conversation

@ssyno

@ssyno ssyno commented Oct 6, 2025 •

Copy link
Copy Markdown

This change aligns the targetPort configuration for metrics endpoints in webhook and cainjector services with the controller service by using the same template variable reference.

Previously:

  • webhook-service: Used hardcoded "http-metrics" string
  • cainjector-service: Was missing the targetPort field entirely

Now both services use {{ .Values.prometheus.servicemonitor.targetPort }} which defaults to "http-metrics", matching the controller service implementation and ensuring consistency across all three services.

Pull Request Motivation

Kind

/kind

Release Note

NONE

@cert-manager-prow cert-manager-prow Bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. labels Oct 6, 2025
@cert-manager-prow

Copy link
Copy Markdown
Contributor

@ssyno: The label(s) kind/release, kind/note cannot be applied, because the repository doesn't have them.

Details

In response to this:

This change aligns the targetPort configuration for metrics endpoints in webhook and cainjector services with the controller service by using the same template variable reference.

Previously:

  • webhook-service: Used hardcoded "http-metrics" string
  • cainjector-service: Was missing the targetPort field entirely

Now both services use {{ .Values.prometheus.servicemonitor.targetPort }} which defaults to "http-metrics", matching the controller service implementation and ensuring consistency across all three services.

Pull Request Motivation

Kind

/kind

Release Note

NONE

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.

@cert-manager-prow cert-manager-prow Bot added the area/deploy Indicates a PR modifies deployment configuration label Oct 6, 2025
@cert-manager-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found here.

Details 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

@cert-manager-prow cert-manager-prow Bot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 6, 2025
@cert-manager-prow

Copy link
Copy Markdown
Contributor

Hi @ssyno. Thanks for your PR.

I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@cert-manager-prow cert-manager-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 6, 2025
…njector services

This change aligns the targetPort configuration for metrics endpoints
in webhook and cainjector services with the controller service by using
the same template variable reference.

Previously:
- webhook-service: Used hardcoded "http-metrics" string
- cainjector-service: Was missing the targetPort field entirely

Now both services use {{ .Values.prometheus.servicemonitor.targetPort }}
which defaults to "http-metrics", matching the controller service
implementation and ensuring consistency across all three services.

Signed-off-by: Spyros Synodinos <[email protected]>
@ssyno
ssyno force-pushed the targetPorts-alignment branch from c272e0b to 0076954 Compare October 6, 2025 13:18
@cert-manager-prow cert-manager-prow Bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. and removed dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. labels Oct 6, 2025
@ssyno

ssyno commented Oct 6, 2025

Copy link
Copy Markdown
Author

/kind

@erikgb

erikgb commented Oct 8, 2025

Copy link
Copy Markdown
Member

/ok-to-test

@cert-manager-prow cert-manager-prow Bot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 8, 2025
@hjoshi123

Copy link
Copy Markdown
Collaborator

/lgtm

@cert-manager-prow cert-manager-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 8, 2025
@inteon

inteon commented Oct 9, 2025 •

Copy link
Copy Markdown
Member

Why do we want to make this configurable using {{ .Values.prometheus.servicemonitor.targetPort }}? Can't we just keep using the "http-metrics" reference?

I think this area of the Helm chart is very messy. I would like to propose that we drop the prometheus.servicemonitor.targetPort property and just use the "http-metrics" port name everywhere (if that is possible).

@cert-manager-bot

Copy link
Copy Markdown
Contributor

Issues go stale after 6 months of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues remain open for an additional 3 months of inactivity and then close.
If this issue is safe to close now please do so with /close.
/lifecycle stale

@cert-manager-prow cert-manager-prow Bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/deploy Indicates a PR modifies deployment configuration dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. ok-to-test release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants