From c71bfc9420f69f605c252f66245139fc015bcc3c Mon Sep 17 00:00:00 2001 From: David Courtey Date: Sun, 3 Nov 2024 21:23:57 +0100 Subject: [PATCH] feat: fix middleware name --- helm-charts/generic-app/Chart.yaml | 2 +- helm-charts/generic-app/templates/middleware.yaml | 2 +- .../generic-app/tests/__snapshot__/ingress_test.yaml.snap | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helm-charts/generic-app/Chart.yaml b/helm-charts/generic-app/Chart.yaml index a6461d9..8698e63 100644 --- a/helm-charts/generic-app/Chart.yaml +++ b/helm-charts/generic-app/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v2 name: generic-app description: A Helm Chart for Generic App type: application -version: 0.3.6 +version: 0.3.7 diff --git a/helm-charts/generic-app/templates/middleware.yaml b/helm-charts/generic-app/templates/middleware.yaml index f54e7d0..9f86e4f 100644 --- a/helm-charts/generic-app/templates/middleware.yaml +++ b/helm-charts/generic-app/templates/middleware.yaml @@ -5,7 +5,7 @@ apiVersion: traefik.containo.us/v1alpha1 kind: Middleware metadata: - name: {{ $fullName }}-redirect-to-{{ .to | include "toSlug" }} + name: {{ $.Release.Namespace }}-{{ $fullName }}-redirect-to-{{ .to | include "toSlug" }} labels: {{- include "generic-app.labels" $ | nindent 4 }} spec: diff --git a/helm-charts/generic-app/tests/__snapshot__/ingress_test.yaml.snap b/helm-charts/generic-app/tests/__snapshot__/ingress_test.yaml.snap index 526c9b3..abf310b 100644 --- a/helm-charts/generic-app/tests/__snapshot__/ingress_test.yaml.snap +++ b/helm-charts/generic-app/tests/__snapshot__/ingress_test.yaml.snap @@ -66,7 +66,7 @@ should create middleware redirections: app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: generic-app helm.sh/chart: generic-app-0.1.0 - name: test-generic-app-redirect-to-crty-dev + name: NAMESPACE-test-generic-app-redirect-to-crty-dev spec: redirectRegex: permanent: true