From 3bc90b6b543118e29b04f7d526a2d1711fa41791 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Sat, 8 Feb 2020 17:09:55 +0900 Subject: [PATCH] Add `hostnameOverride` to value.yaml. Signed-off-by: Masaki Muranaka --- .../che-devfile-registry/templates/ingress.yaml | 8 +++++--- deploy/kubernetes/che-devfile-registry/values.yaml | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/deploy/kubernetes/che-devfile-registry/templates/ingress.yaml b/deploy/kubernetes/che-devfile-registry/templates/ingress.yaml index fd8fab9c7..494a23f7c 100644 --- a/deploy/kubernetes/che-devfile-registry/templates/ingress.yaml +++ b/deploy/kubernetes/che-devfile-registry/templates/ingress.yaml @@ -6,7 +6,9 @@ # # SPDX-License-Identifier: EPL-2.0 # - +{{- define "hostname" -}} +{{- .Values.hostnameOverride | default (printf "che-plugin-registry-%s" .Release.Namespace) -}} +{{- end -}} apiVersion: extensions/v1beta1 kind: Ingress metadata: @@ -15,7 +17,7 @@ metadata: kubernetes.io/ingress.class: {{ .Values.global.ingress.class }} spec: rules: - - host: {{ printf "che-devfile-registry-%s.%s" .Release.Namespace .Values.global.ingressDomain }} + - host: {{ template "hostname" . -}} . {{- .Values.global.ingressDomain }} http: paths: - path: / @@ -25,6 +27,6 @@ spec: {{- if .Values.cheDevfileRegistryIngressSecretName }} tls: - hosts: - - {{ printf "che-devfile-registry-%s.%s" .Release.Namespace .Values.global.ingressDomain }} + - {{ template "hostname" . -}} . {{- .Values.global.ingressDomain }} secretName: {{ .Values.cheDevfileRegistryIngressSecretName }} {{- end -}} diff --git a/deploy/kubernetes/che-devfile-registry/values.yaml b/deploy/kubernetes/che-devfile-registry/values.yaml index d9734975c..53aabc2b4 100644 --- a/deploy/kubernetes/che-devfile-registry/values.yaml +++ b/deploy/kubernetes/che-devfile-registry/values.yaml @@ -12,6 +12,8 @@ cheDevfileRegistryImagePullPolicy: Always cheDevfileRegistryMemoryLimit: 256Mi cheDevfileRegistryIngressSecretName: che-tls +#hostnameOverride: "che-devfile-registry" + cheDevfileImagesOverride: # Override for registry URL in images used in devfiles url: camino.azurecr.io