fix: reuse webhookport from values (#1927)

* fix(controller): decode old object for delete requests

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: modernize golang

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: modernize golang

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* chore: modernize golang

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>

* fix: reuse webhookport from values

Signed-off-by: Oliver Baehler <oliver@sudo-i.net>

* fix: consider webhooks.service.port

Signed-off-by: Oliver Baehler <oliver@sudo-i.net>

* fix: consider webhooks.service.port

Signed-off-by: Oliver Baehler <oliver@sudo-i.net>

---------

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
This commit is contained in:
Oliver Bähler
2026-05-29 10:33:22 +02:00
committed by GitHub
parent c6e109ca46
commit 279f3a7d78
3 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -161,7 +161,7 @@ url: {{ printf "%s/%s" (trimSuffix "/" $.ctx.Values.webhooks.service.url ) (trim
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 }}
port: {{ default $.ctx.Values.manager.webhookPort $.ctx.Values.webhooks.service.port }}
path: {{ required "Path is required for the function" $.path }}
{{- end }}
{{- end }}
@@ -178,7 +178,7 @@ url: {{ trimSuffix "/" $.Values.webhooks.service.url }}
service:
name: {{ default (printf "%s-webhook-service" (include "capsule.fullname" $)) $.Values.webhooks.service.name }}
namespace: {{ default $.Release.Namespace $.Values.webhooks.service.namespace }}
port: {{ default 9443 $.Values.webhooks.service.port }}
port: {{ default $.Values.manager.webhookPort $.Values.webhooks.service.port }}
{{- end }}
{{- end }}
+2 -2
View File
@@ -61,7 +61,7 @@ spec:
containers:
- name: manager
args:
- --webhook-port={{ .Values.manager.webhookPort }}
- --webhook-port={{ default $.Values.manager.webhookPort $.Values.webhooks.service.port }}
- --zap-log-level={{ default 4 .Values.manager.options.logLevel }}
- --configuration-name={{ .Values.manager.options.capsuleConfiguration }}
- --workers={{ .Values.manager.options.workers }}
@@ -88,7 +88,7 @@ spec:
{{- if not (.Values.manager.hostNetwork) }}
- name: admission
protocol: TCP
containerPort: 9443
containerPort: {{ default $.Values.manager.webhookPort $.Values.webhooks.service.port }}
- name: metrics
containerPort: 8080
protocol: TCP
@@ -12,9 +12,10 @@ metadata:
{{- end }}
spec:
ports:
- name: admission
- port: {{ default $.Values.manager.webhookPort $.Values.webhooks.service.port }}
name: admission
protocol: TCP
port: 9443
targetPort: {{ default $.Values.manager.webhookPort $.Values.webhooks.service.port }}
selector:
{{- include "capsule.selectorLabels" . | nindent 4 }}
sessionAffinity: None