mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-27 05:43:11 +00:00
fix: fix corrupted spec for the service with nodeport type (#814)
This commit is contained in:
@@ -17,7 +17,14 @@ metadata:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
{% if service_type | lower != 'loadbalancer' and loadbalancer_protocol | lower != 'https' %}
|
|
||||||
|
{% if service_type | lower == "nodeport" %}
|
||||||
|
- port: 80
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8052
|
||||||
|
name: http
|
||||||
|
nodePort: {{ nodeport_port }}
|
||||||
|
{% elif service_type | lower != 'loadbalancer' and loadbalancer_protocol | lower != 'https' %}
|
||||||
- port: 80
|
- port: 80
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: 8052
|
targetPort: 8052
|
||||||
@@ -39,18 +46,14 @@ spec:
|
|||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: 8052
|
targetPort: 8052
|
||||||
name: http
|
name: http
|
||||||
{% elif service_type | lower == "nodeport" %}
|
|
||||||
- port: {{ nodeport_port }}
|
|
||||||
protocol: TCP
|
|
||||||
targetPort: 8052
|
|
||||||
name: http
|
|
||||||
type: NodePort
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: '{{ ansible_operator_meta.name }}'
|
app.kubernetes.io/name: '{{ ansible_operator_meta.name }}'
|
||||||
app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
|
app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
|
||||||
app.kubernetes.io/component: '{{ deployment_type }}'
|
app.kubernetes.io/component: '{{ deployment_type }}'
|
||||||
{% if service_type | lower == "loadbalancer" %}
|
{% if service_type | lower == "nodeport" %}
|
||||||
|
type: NodePort
|
||||||
|
{% elif service_type | lower == "loadbalancer" %}
|
||||||
type: LoadBalancer
|
type: LoadBalancer
|
||||||
{% else %}
|
{% else %}
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|||||||
Reference in New Issue
Block a user