Browse Source

Allow defining extra hosts for ingress

gmsantos 4 years ago
parent
commit
1491436f40

+ 9 - 0
tools/kubernetes/helm/hue/templates/ingress-http.yaml

@@ -18,4 +18,13 @@ spec:
           serviceName: hue-balancer
           servicePort: 80
         path: /
+  {{- range .Values.ingress.extraHosts }}
+  - host: {{ . | quote }}
+    http:
+      paths:
+      - backend:
+          serviceName: hue-balancer
+          servicePort: 80
+        path: /
+  {{- end }}
 {{- end -}}

+ 12 - 0
tools/kubernetes/helm/hue/templates/ingress-https.yaml

@@ -26,6 +26,15 @@ spec:
           serviceName: hue-balancer
           servicePort: 80
         path: /
+  {{- range .Values.ingress.extraHosts }}
+  - host: {{ . | quote }}
+    http:
+      paths:
+      - backend:
+          serviceName: hue-balancer
+          servicePort: 80
+        path: /
+  {{- end }}
   {{ if .Values.api.enabled }}
   - host: {{ .Values.api.domain }}
     http:
@@ -38,6 +47,9 @@ spec:
   tls:
   - hosts:
     - {{ .Values.ingress.domain }}
+    {{- range .Values.ingress.extraHosts }}
+    - {{ . | quote }}
+    {{- end }}
     {{ if .Values.api.enabled }}
     - {{ .Values.api.domain }}
     {{ end }}

+ 9 - 0
tools/kubernetes/helm/hue/templates/ingress-traefik-hue.yaml

@@ -14,4 +14,13 @@ spec:
         backend:
           serviceName: hue
           servicePort: hue
+  {{- range .Values.ingress.extraHosts }}
+  - host: {{ . | quote }}
+    http:
+      paths:
+      - backend:
+          serviceName: hue-balancer
+          servicePort: 80
+        path: /
+  {{- end }}
 {{- end -}}

+ 2 - 0
tools/kubernetes/helm/hue/values.yaml

@@ -63,6 +63,8 @@ ingress:
   # type: "nginx-ssl-staging"
   # type: "traefik"
   domain: "demo.gethue.com"
+  # extraHosts:
+  # - "demo.hue.com"
   email: "team@gethue.com"
   loadBalancerIp: "127.0.0.1"
 aws: