Fix the NodePort port specification

This commit is contained in:
Uros Bajzelj
2022-02-11 10:57:43 +00:00
parent eac2328bd3
commit 536d7dc842

View File

@@ -39,6 +39,12 @@ 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 }}'
@@ -46,8 +52,6 @@ spec:
app.kubernetes.io/component: '{{ deployment_type }}'
{% if service_type | lower == "loadbalancer" %}
type: LoadBalancer
{% elif service_type | lower == "nodeport" %}
type: NodePort
{% else %}
type: ClusterIP
{% endif %}