Files
homelab/k8s/apps/ingresses/templates/_helpers/domain.yaml
T
2024-03-14 13:53:05 -04:00

13 lines
399 B
YAML

{{- define "homelab.ingress.domain" -}}
{{- $rootPrefix := empty .leadPrefix | ternary "" (printf "%s." .leadPrefix) -}}
{{- if .useSecondaryDomain -}}
{{$rootPrefix}}{{.global.secondaryDomain}}
{{- else -}}
{{- if .useDirectPrefix -}}
{{$rootPrefix}}{{.global.domain}}
{{- else -}}
{{$rootPrefix}}{{.global.rootSubDomain}}.{{.global.domain}}
{{- end -}}
{{- end -}}
{{- end -}}