diff --git a/deploy/chart/devfile-registry/templates/_template.tpl b/deploy/chart/devfile-registry/templates/_template.tpl index 4eba850a..17f79d95 100644 --- a/deploy/chart/devfile-registry/templates/_template.tpl +++ b/deploy/chart/devfile-registry/templates/_template.tpl @@ -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 -}} diff --git a/deploy/chart/devfile-registry/templates/ingress.yaml b/deploy/chart/devfile-registry/templates/ingress.yaml index 7c54900f..a42df447 100644 --- a/deploy/chart/devfile-registry/templates/ingress.yaml +++ b/deploy/chart/devfile-registry/templates/ingress.yaml @@ -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: /