Skip to content

Commit

Permalink
add ingress hostname definition without protocol for ingress spec
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Valdron <[email protected]>
  • Loading branch information
michael-valdron committed Mar 5, 2024
1 parent 3a4532b commit aafd64e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions deploy/chart/devfile-registry/templates/_template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
{{- .Values.hostnameOverride | default (printf "devfile-registry-%s" .Release.Namespace) -}}
{{- end -}}

{{- define "devfileregistry.ingressHostname" -}}
{{- $hostname := .Values.hostnameOverride | default (printf "devfile-registry-%s" .Release.Namespace) -}}
{{- .Values.global.ingress.domain | printf "%s.%s" $hostname -}}
{{- end -}}

{{- define "devfileregistry.ingressUrl" -}}
{{- $hostname := .Values.hostnameOverride | default (printf "devfile-registry-%s" .Release.Namespace) -}}
{{- if .Values.global.tlsEnabled -}}
Expand Down
2 changes: 1 addition & 1 deletion deploy/chart/devfile-registry/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ metadata:
kubernetes.io/ingress.class: {{ .Values.global.ingress.class }}
spec:
rules:
- host: {{ template "devfileregistry.ingressUrl" . }}
- host: {{ template "devfileregistry.ingressHostname" . }}
http:
paths:
- path: /
Expand Down

0 comments on commit aafd64e

Please sign in to comment.