fix: reuse webhookport from values#1927
Conversation
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
There was a problem hiding this comment.
Pull request overview
Replaces hardcoded 9443 webhook port references in the Helm chart templates with the configurable .Values.manager.webhookPort value, so changing the value in values.yaml actually propagates to both the Service and the Pod's container port.
Changes:
- Use
.Values.manager.webhookPortfor the webhook ServiceportandtargetPort. - Use
.Values.manager.webhookPortfor the manager Pod'sadmissioncontainerPort.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| charts/capsule/templates/webhook-service.yaml | Templated the admission Service port/targetPort from webhookPort instead of hardcoded 9443. |
| charts/capsule/templates/_pod.tpl | Templated the admission containerPort from webhookPort instead of hardcoded 9443. |
|
It must be assured, that the port on the dynamic-webhook matches the pod and service ports. |
Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
|
@bakito agrre with the changes? |
no. The default port should also be considered here:
otherwise generated dynamic webhooks are pointing to the wrong service port |
|
|
@bakito didnt push. .. D: |
Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
| service: | ||
| name: {{ default (printf "%s-webhook-service" (include "capsule.fullname" $.ctx)) $.ctx.Values.webhooks.service.name }} | ||
| namespace: {{ default $.ctx.Release.Namespace $.ctx.Values.webhooks.service.namespace }} | ||
| port: {{ default 9443 $.ctx.Values.webhooks.service.port }} |
There was a problem hiding this comment.
default need to be changed here too
|
LGTM |
No description provided.