Skip to content

feat(helm) Just use named port for webhook#5108

Merged
Skarlso merged 2 commits intoexternal-secrets:mainfrom
jcpunk:webhook-port-name
Aug 8, 2025
Merged

feat(helm) Just use named port for webhook#5108
Skarlso merged 2 commits intoexternal-secrets:mainfrom
jcpunk:webhook-port-name

Conversation

@jcpunk
Copy link
Copy Markdown
Contributor

@jcpunk jcpunk commented Aug 6, 2025

Problem Statement

Simplify inter-relationships in services/helm values

Related Issue

Fixes #...

Proposed Changes

Since the deployment already names the port, we can just use the name and it will map automatically.

Checklist

  • I have read the contribution guidelines
  • All commits are signed with git commit --signoff
  • My changes have reasonable test coverage
  • All tests pass with make test
  • I ensured my PR is ready for review with make reviewable

Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
@jcpunk jcpunk marked this pull request as ready for review August 6, 2025 20:07
@jcpunk jcpunk requested a review from a team as a code owner August 6, 2025 20:07
@jcpunk jcpunk requested a review from gusfcarvalho August 6, 2025 20:07
@Skarlso
Copy link
Copy Markdown
Contributor

Skarlso commented Aug 6, 2025

Errr. This will definitely break our chart. Especially if someone is using that configuration. :)

@jcpunk
Copy link
Copy Markdown
Contributor Author

jcpunk commented Aug 6, 2025

I may be reading it wrongly but doesn't :

          ports:
            - containerPort: {{ .Values.webhook.metrics.listen.port }}
              protocol: TCP
              name: metrics
            - containerPort: {{ .Values.webhook.port }}
              protocol: TCP
              name: webhook

from deploy/charts/external-secrets/templates/webhook-deployment.yaml mean this service has a port named "webhook" so the service can use the name to automatically attach?

@Skarlso
Copy link
Copy Markdown
Contributor

Skarlso commented Aug 7, 2025

Ah you're right. This might be okay actually.

@Skarlso
Copy link
Copy Markdown
Contributor

Skarlso commented Aug 7, 2025

It's just a bit confusing that it will be

  - targetPort: webhook (referring to the container's named port)
     name: webhook (the service port's name)

And I'm afraid if we rename it to something like webhook-svc we'll begin breaking things that reference it already.

@jcpunk
Copy link
Copy Markdown
Contributor Author

jcpunk commented Aug 7, 2025

What if I convert the port name to another templated value from values.yaml?

@Skarlso
Copy link
Copy Markdown
Contributor

Skarlso commented Aug 7, 2025

I'm wondering if this would be a problem for downstream users who rely on the port number being set to a number. That... wouldn't be a problem right? ( I'm not a helm/deployment power user ). If someone is parsing that by hand they would have their own problems anyways. :D

Let's fix the helm test issue for now, other than that, this looks fine.

@jcpunk
Copy link
Copy Markdown
Contributor Author

jcpunk commented Aug 7, 2025

Error: INSTALLATION FAILED: client rate limiter Wait returned an error: context deadline exceeded

I don't think that is something I can fix....

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Aug 8, 2025

@Skarlso
Copy link
Copy Markdown
Contributor

Skarlso commented Aug 8, 2025

Looks like some kind of fluke.

@Skarlso Skarlso merged commit 38d355f into external-secrets:main Aug 8, 2025
22 checks passed
@jcpunk jcpunk deleted the webhook-port-name branch August 8, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants