Merge "Add tls,and enable multi hosts in horizon ingress"

This commit is contained in:
Zuul 2020-05-25 21:00:08 +00:00 committed by Gerrit Code Review
commit e5cf5dc4e9
2 changed files with 28 additions and 1 deletions

View File

@ -6,4 +6,5 @@ metadata:
prometheus: helm
spec:
ingress:
host: "horizon.vexxhost.com"
- host: "horizon1.vexxhost.com"
- host: "horizon2.vexxhost.com"

View File

@ -18,7 +18,11 @@ kind: Ingress
metadata:
name: horizon
namespace: openstack
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
cert-manager.k8s.io/cluster-issuer: "letsencrypt-prod"
spec:
{% if spec.ingress.host is defined %}
rules:
- host: {{ spec.ingress.host }}
http:
@ -27,3 +31,25 @@ spec:
backend:
serviceName: horizon
servicePort: 80
tls:
- hosts:
- {{ spec.ingress.host }}
secretName: horizon-tls
{% else %}
rules:
{% for v in spec.ingress %}
- host: {{ v.host }}
http:
paths:
- path: /
backend:
serviceName: horizon
servicePort: 80
{% endfor %}
tls:
- hosts:
{% for v in spec.ingress %}
- {{ v.host }}
{% endfor %}
secretName: horizon-tls
{% endif %}