1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

Merge pull request #4128 from tchellomello/k8s-annotations

Introduces the ability to pass annotations to the Kubernetes Ingress Controllers

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-06-21 13:14:47 +00:00 committed by GitHub
commit 59bec99f4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View File

@ -26,6 +26,12 @@ dockerhub_base=ansible
# pg_cpu_limit=1000
# pg_mem_limit=2
# Kubernetes Ingress Annotations
# You can use the variables below to pass annotations to Kubernetes Ingress
# 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 and Openshift Install Resource Requests
# These are the request and limit values for a pod's container for task/web/rabbitmq/memcached/management.
# The total amount of requested resources for a pod is the sum of all

View File

@ -373,11 +373,28 @@ kind: Ingress
metadata:
name: {{ kubernetes_deployment_name }}-web-svc
namespace: {{ kubernetes_namespace }}
{% if kubernetes_ingress_annotations is defined %}
annotations:
{% for key, value in kubernetes_ingress_annotations.items() %}
{{ key }}: {{ value }}
{% endfor %}
spec:
rules:
- host: {{ kubernetes_ingress_hostname }}
http:
paths:
- path: /
backend:
serviceName: {{ kubernetes_deployment_name }}-web-svc
servicePort: 80
{% else %}
spec:
backend:
serviceName: {{ kubernetes_deployment_name }}-web-svc
servicePort: 80
{% endif %}
{% endif %}
{% if openshift_host is defined %}
---
apiVersion: v1