From 8eec7a3ae35af518c847c371fe5635d17d9ee60e Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Wed, 18 Sep 2024 15:31:27 +0200 Subject: [PATCH] Add traefik middleware to templates --- common/templates.yaml | 7 +++++++ values/common/values.middleware.yaml | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 values/common/values.middleware.yaml diff --git a/common/templates.yaml b/common/templates.yaml index 539c90a..e38d689 100644 --- a/common/templates.yaml +++ b/common/templates.yaml @@ -54,6 +54,13 @@ templates: alias: traefik values: - '{{ requiredEnv "PWD" }}/values/common/values.tcp-route.yaml' + ext-traefik-middleware: + dependencies: + - chart: bedag/raw + version: 2.0.0 + alias: middleware + values: + - '{{ requiredEnv "PWD" }}/values/common/values.middleware.yaml' ext-istio-resource: dependencies: - chart: bedag/raw diff --git a/values/common/values.middleware.yaml b/values/common/values.middleware.yaml new file mode 100644 index 0000000..802ec15 --- /dev/null +++ b/values/common/values.middleware.yaml @@ -0,0 +1,12 @@ +middleware: + templates: + - | + {{ range .Values.middlewares }} + --- + apiVersion: traefik.io/v1alpha1 + kind: Middleware + metadata: + name: {{ .name }} + spec: + {{ .spec | toYaml | nindent 4 }} + {{- end }}