From e5385025600aef1ec2c5230956ba80eb43b704a6 Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Fri, 3 Sep 2021 20:58:30 +0200 Subject: [PATCH] readd portalhook --- charts/incubator/traefik/Chart.yaml | 2 +- charts/incubator/traefik/SCALE/ix_values.yaml | 3 +++ .../traefik/templates/portalhook.yaml | 23 +++++++++++++++++++ charts/incubator/traefik/values.yaml | 3 +++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 charts/incubator/traefik/templates/portalhook.yaml diff --git a/charts/incubator/traefik/Chart.yaml b/charts/incubator/traefik/Chart.yaml index 67e509cc22f..46c31b9e6f9 100644 --- a/charts/incubator/traefik/Chart.yaml +++ b/charts/incubator/traefik/Chart.yaml @@ -22,4 +22,4 @@ sources: - https://github.com/traefik/traefik-helm-chart - https://traefik.io/ type: application -version: 0.0.7 +version: 0.0.8 diff --git a/charts/incubator/traefik/SCALE/ix_values.yaml b/charts/incubator/traefik/SCALE/ix_values.yaml index a1005a580e6..11e67e6ee6f 100644 --- a/charts/incubator/traefik/SCALE/ix_values.yaml +++ b/charts/incubator/traefik/SCALE/ix_values.yaml @@ -176,3 +176,6 @@ serviceAccount: securityContext: capabilities: drop: [ALL] + +portalhook: + enabled: true diff --git a/charts/incubator/traefik/templates/portalhook.yaml b/charts/incubator/traefik/templates/portalhook.yaml new file mode 100644 index 00000000000..4fee8f136e2 --- /dev/null +++ b/charts/incubator/traefik/templates/portalhook.yaml @@ -0,0 +1,23 @@ +{{- if .Values.portalhook.enabled }} +{{- $namespace := ( printf "ix-%s" .Release.Name ) }} +{{- if or ( not .Values.ingressClass.enabled ) ( and ( .Values.ingressClass.enabled ) ( .Values.ingressClass.isDefaultClass ) ) }} +{{- $namespace = "traefikmiddlewares" }} +{{- end }} +--- + +apiVersion: v1 +kind: ConfigMap +metadata: + name: portalhook + namespace: $namespace +data: + {{- $ports := dict }} + {{- range $.Values.service }} + {{- range $name, $value := .ports }} + {{- $_ := set $ports $name $value }} + {{- end }} + {{- end }} + {{- range $name, $value := $ports }} + {{ $name }}: {{ $value.port }} + {{- end }} +{{- end }} diff --git a/charts/incubator/traefik/values.yaml b/charts/incubator/traefik/values.yaml index d02427ca60a..277cb6d20ba 100644 --- a/charts/incubator/traefik/values.yaml +++ b/charts/incubator/traefik/values.yaml @@ -319,3 +319,6 @@ middlewares: rateLimit: [] # average: 300 # burst: 200 + +portalhook: + enabled: true