diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index d3dfe8c..9e7faa6 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -65,5 +65,5 @@ Create the name of the service account to use Define the public fqdn */}} {{- define "url-shortener.fqdn" -}} -https:// {{- or (.Values.ingress.hosts | first).host ( get .Values.ingress.annotations "traefik.ingress.kubernetes.io/router.tls.domains.0.sans" ) }} +https:// {{- or ((.Values.ingress.hosts | first).host | replace ".lab" ".fr" ) ( get .Values.ingress.annotations "traefik.ingress.kubernetes.io/router.tls.domains.0.sans" ) }} {{- end }} \ No newline at end of file diff --git a/chart/templates/public-ingress.yaml b/chart/templates/public-ingress.yaml index f08bff0..7d4b2b9 100644 --- a/chart/templates/public-ingress.yaml +++ b/chart/templates/public-ingress.yaml @@ -5,13 +5,12 @@ metadata: labels: {{- include "url-shortener.labels" . | nindent 4 }} annotations: - {{- with omit .Values.ingress.annotations "traefik.ingress.kubernetes.io/router.middlewares" -}} - {{ toYaml . | nindent 4 }} - {{- end }} + traefik.ingress.kubernetes.io/router.entrypoints: web traefik.ingress.kubernetes.io/router.pathmatcher: PathRegexp + traefik.ingress.kubernetes.io/router.middlewares: kube-system-crowdsec@kubernetescrd spec: rules: - - host: {{ (.Values.ingress.hosts | first).host }} + - host: {{ (.Values.ingress.hosts | first).host | replace ".lab" ".fr" }} http: paths: - path: /[^/]+ diff --git a/chart/values.yaml b/chart/values.yaml index 441cf8f..d8a28bc 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -49,7 +49,9 @@ ingress: annotations: traefik.ingress.kubernetes.io/router.entrypoints: websecure traefik.ingress.kubernetes.io/router.tls: "true" - cert-manager.io/cluster-issuer: step-ca + cert-manager.io/issuer: step-issuer + cert-manager.io/issuer-kind: StepClusterIssuer + cert-manager.io/issuer-group: certmanager.step.sm traefik.ingress.kubernetes.io/router.middlewares: localIp@file tls: - secretName: url-arcodange-lab-tls