add variable to set tls secret for kubernetes ingress

Signed-off-by: Khaled Elkhawaga <k.elkhawaga@gmail.com>
This commit is contained in:
Khaled Elkhawaga 2019-10-11 00:50:52 +02:00
parent 08df2cad68
commit 267e297eca
2 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,7 @@ dockerhub_base=ansible
# The example below shows an annotation to be used with Traefik but other Ingress controllers are also supported.
#kubernetes_ingress_hostname=awx.example.org
#kubernetes_ingress_annotations={'kubernetes.io/ingress.class': 'traefik', 'traefik.ingress.kubernetes.io/redirect-entry-point': 'https'}
#kubernetes_ingress_tls_secret=awx-cert
# Kubernetes and Openshift Install Resource Requests
# These are the request and limit values for a pod's container for task/web/rabbitmq/memcached/management.

View File

@ -433,6 +433,12 @@ metadata:
{% endfor %}
spec:
{% if kubernetes_ingress_tls_secret is defined %}
tls:
- hosts:
- {{ kubernetes_ingress_hostname }}
secretName: {{ kubernetes_ingress_tls_secret }}
{% endif %}
rules:
- host: {{ kubernetes_ingress_hostname }}
http: