mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-07 22:02:53 +00:00
Make tower_ingress_type to respect ClusterIP definition
This commit is contained in:
@@ -7,6 +7,7 @@ database_name: "{{ deployment_type }}"
|
||||
database_username: "{{ deployment_type }}"
|
||||
|
||||
task_privileged: false
|
||||
service_type: ClusterIP
|
||||
ingress_type: none
|
||||
|
||||
# Add annotations to the service account. Specify as literal block. E.g.:
|
||||
@@ -51,7 +52,7 @@ route_tls_secret: ''
|
||||
#
|
||||
route_host: ''
|
||||
|
||||
hostname: '{{ deployment_type }}.example.com'
|
||||
hostname: '{{ meta.name }}.example.com'
|
||||
|
||||
# Add a nodeSelector for the AWX pods. It must match a node's labels for the pod
|
||||
# to be scheduled on that node. Specify as literal block. E.g.:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% if 'ingress' == ingress_type|lower %}
|
||||
{% if ingress_type|lower == "ingress" %}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
@@ -32,7 +32,7 @@ spec:
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if 'route' == ingress_type|lower %}
|
||||
{% if ingress_type|lower == "route" %}
|
||||
---
|
||||
apiVersion: route.openshift.io/v1
|
||||
kind: Route
|
||||
|
||||
@@ -17,7 +17,7 @@ metadata:
|
||||
{% endif %}
|
||||
spec:
|
||||
ports:
|
||||
{% if ingress_type | lower != 'loadbalancer' and loadbalancer_protocol | lower != 'https' %}
|
||||
{% if service_type | lower != 'loadbalancer' and loadbalancer_protocol | lower != 'https' %}
|
||||
- port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8052
|
||||
@@ -29,12 +29,12 @@ spec:
|
||||
targetPort: 8053
|
||||
name: https
|
||||
{% endif %}
|
||||
{% if ingress_type | lower == 'loadbalancer' and loadbalancer_protocol | lower == 'https' %}
|
||||
{% if service_type | lower == 'loadbalancer' and loadbalancer_protocol | lower == 'https' %}
|
||||
- port: {{ loadbalancer_port }}
|
||||
protocol: TCP
|
||||
targetPort: 8052
|
||||
name: https
|
||||
{% elif ingress_type | lower == 'loadbalancer' and loadbalancer_protocol | lower != 'https' %}
|
||||
{% elif service_type | lower == 'loadbalancer' and loadbalancer_protocol | lower != 'https' %}
|
||||
- port: {{ loadbalancer_port }}
|
||||
protocol: TCP
|
||||
targetPort: 8052
|
||||
@@ -44,9 +44,9 @@ spec:
|
||||
app.kubernetes.io/name: '{{ meta.name }}'
|
||||
app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
|
||||
app.kubernetes.io/component: '{{ deployment_type }}'
|
||||
{% if ingress_type | lower == "loadbalancer" %}
|
||||
{% if service_type | lower == "loadbalancer" %}
|
||||
type: LoadBalancer
|
||||
{% elif ingress_type != "none" %}
|
||||
{% elif service_type | lower == "nodeport" %}
|
||||
type: NodePort
|
||||
{% else %}
|
||||
type: ClusterIP
|
||||
|
||||
Reference in New Issue
Block a user