mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
fix: fix corrupted spec for the service with nodeport type (#814)
This commit is contained in:
@@ -17,7 +17,14 @@ metadata:
|
||||
{% endif %}
|
||||
spec:
|
||||
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
|
||||
protocol: TCP
|
||||
targetPort: 8052
|
||||
@@ -39,18 +46,14 @@ spec:
|
||||
protocol: TCP
|
||||
targetPort: 8052
|
||||
name: http
|
||||
{% elif service_type | lower == "nodeport" %}
|
||||
- port: {{ nodeport_port }}
|
||||
protocol: TCP
|
||||
targetPort: 8052
|
||||
name: http
|
||||
type: NodePort
|
||||
{% endif %}
|
||||
selector:
|
||||
app.kubernetes.io/name: '{{ ansible_operator_meta.name }}'
|
||||
app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
|
||||
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
|
||||
{% else %}
|
||||
type: ClusterIP
|
||||
|
||||
Reference in New Issue
Block a user