Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #23 from PizzaFactory/prp-add-hostnameOverride
Browse files Browse the repository at this point in the history
Add `hostnameOverride` to value.yaml.
  • Loading branch information
monaka authored Feb 8, 2020
2 parents 041e02b + 3bc90b6 commit 78b7e78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions deploy/kubernetes/che-devfile-registry/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: /
Expand All @@ -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 -}}
2 changes: 2 additions & 0 deletions deploy/kubernetes/che-devfile-registry/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 78b7e78

Please sign in to comment.