diff --git a/installer/roles/kubernetes/templates/deployment.yml.j2 b/installer/roles/kubernetes/templates/deployment.yml.j2 index 2f1a245349..019cf2fb36 100644 --- a/installer/roles/kubernetes/templates/deployment.yml.j2 +++ b/installer/roles/kubernetes/templates/deployment.yml.j2 @@ -546,12 +546,6 @@ metadata: spec: {% if kubernetes_ingress_hostname is defined %} -{% if kubernetes_ingress_tls_secret is defined %} - tls: - - hosts: - - {{ kubernetes_ingress_hostname }} - secretName: {{ kubernetes_ingress_tls_secret }} -{% endif %} rules: - host: {{ kubernetes_ingress_hostname }} http: @@ -566,6 +560,12 @@ spec: serviceName: {{ kubernetes_deployment_name }}-web-svc servicePort: 80 {% endif %} +{% if kubernetes_ingress_tls_secret is defined %} + tls: + - hosts: + - {{ kubernetes_ingress_hostname }} + secretName: {{ kubernetes_ingress_tls_secret }} +{% endif %} {% endif %} {% if openshift_host is defined %} ---