Skip to content

Commit

Permalink
add ingressclassname templating
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Getz committed Feb 6, 2024
1 parent 12219d1 commit 45af4ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions blueprints/templates/infrastructure-charts/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,8 @@ Create the name of the service account to use
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{- define "ingressClassName" -}}
{{ (.Values.ingress).className | default "traefik" }}
{{- end }}
2 changes: 1 addition & 1 deletion blueprints/templates/infrastructure-charts/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .className | default "traefik" }}
ingressClassName: {{ (include "ingressClassName" $) }}

{{- if .defaultIngress.enabled }}
{{- $certSecretName := (.defaultIngress.tls).secretName | default (printf "%s-%s" (include "myService.fullname" $) "cert")}}
Expand Down

0 comments on commit 45af4ef

Please sign in to comment.