fix(base): strip prefix

This commit is contained in:
WrenIX 2024-01-29 22:39:57 +01:00
parent 2cbd22d473
commit cfc85e60f0
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
4 changed files with 6 additions and 6 deletions

View file

@ -5,7 +5,7 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: "{{ $.Release.Name }}-{{ $componentInstance }}"
name: "{{ printf "%s-%s" $.Release.Name $componentInstance | replace (printf "%s-%s" $.Release.Name $.Release.Name) $.Release.Name }}"
spec:
chart:
spec:
@ -13,7 +13,7 @@ spec:
{{- toYaml $.Values.commons.helm.chart.sourceRef | nindent 8 }}
chart: "./{{ $componentName }}"
reconcileStrategy: "Revision"
releaseName: "{{ $.Release.Name }}-{{ $componentInstance }}"
releaseName: "{{ printf "%s-%s" $.Release.Name $componentInstance | replace (printf "%s-%s" $.Release.Name $.Release.Name) $.Release.Name }}"
targetNamespace: "{{ ($config.namespace | default (dict)).name | default (dict) | default $.Release.Namespace }}"
install:
{{- toYaml $.Values.commons.helm.release.install | nindent 4 }}

View file

@ -9,7 +9,7 @@ commons:
namespace: "mycloud" <2>
authentik:
domain: "auth.wrenix.eu" <3>
backend: "mycloud-mycloud-authentik-hr" <4>
backend: "mycloud-authentik-hr" <4>
components:
infra-monitoring:

View file

@ -115,7 +115,7 @@ spec:
{{- end }}
{{- with $.Values.commons.auth }}
{{- if and .enabled (eq .type "authentik") (not $.Values.karma.auth.anonymous.enabled) }}
"traefik.ingress.kubernetes.io/router.middlewares": "{{ .namespace }}-mycloud-mycloud-authentik-outpost@kubernetescrd"
"traefik.ingress.kubernetes.io/router.middlewares": "{{ .namespace }}-mycloud-authentik-outpost@kubernetescrd"
{{- end }}
{{- end }}
{{- with .annotations }}

View file

@ -82,7 +82,7 @@ spec:
{{- end }}
{{- with $.Values.commons.auth }}
{{- if and .enabled (eq .type "authentik") (not $.Values.prometheus.auth.anonymous.enabled) }}
"traefik.ingress.kubernetes.io/router.middlewares": "{{ .namespace }}-mycloud-mycloud-authentik-outpost@kubernetescrd"
"traefik.ingress.kubernetes.io/router.middlewares": "{{ .namespace }}-mycloud-authentik-outpost@kubernetescrd"
{{- end }}
{{- end }}
{{- with .annotations }}
@ -127,7 +127,7 @@ spec:
{{- end }}
{{- with $.Values.commons.auth }}
{{- if and .enabled (eq .type "authentik") (not $.Values.alertmanager.auth.anonymous.enabled) }}
"traefik.ingress.kubernetes.io/router.middlewares": "{{ .namespace }}-mycloud-mycloud-authentik-outpost@kubernetescrd"
"traefik.ingress.kubernetes.io/router.middlewares": "{{ .namespace }}-mycloud-authentik-outpost@kubernetescrd"
{{- end }}
{{- end }}
{{- with .annotations }}