From 9a9872cbddc20c58e55d54e210e96181a9e702cf Mon Sep 17 00:00:00 2001 From: Victor Getz Date: Mon, 8 May 2023 12:16:06 +0200 Subject: [PATCH] Optimize templating with traefik --- charts/traefik/Chart.yaml | 2 +- charts/traefik/templates/websecure-internal-svc.yaml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/charts/traefik/Chart.yaml b/charts/traefik/Chart.yaml index 605ca070..7d56a7ae 100644 --- a/charts/traefik/Chart.yaml +++ b/charts/traefik/Chart.yaml @@ -6,4 +6,4 @@ dependencies: version: 10.22.0 description: traefik name: traefik -version: 10.22.0-after-proxy-v2 +version: 10.22.0-after-proxy-v3 diff --git a/charts/traefik/templates/websecure-internal-svc.yaml b/charts/traefik/templates/websecure-internal-svc.yaml index 98a4d1b7..d336fe6f 100644 --- a/charts/traefik/templates/websecure-internal-svc.yaml +++ b/charts/traefik/templates/websecure-internal-svc.yaml @@ -1,3 +1,5 @@ +{{- $afterProxyPort := index .Values.traefik.ports "after-proxy"}} + apiVersion: v1 kind: Service metadata: @@ -5,10 +7,10 @@ metadata: spec: type: ClusterIP ports: - - port: 8444 - targetPort: 8444 + - port: {{$afterProxyPort.port}} + targetPort: {{$afterProxyPort.port}} protocol: TCP - name: secure-internal + name: after-proxy selector: app.kubernetes.io/name: traefik app.kubernetes.io/instance: {{ .Release.Name }} \ No newline at end of file