Browse Source
Fix: render tcp and udp service ports as integers in Ingress NGINX templates (#12442)
pull/12507/head
Mahdad Ghasemian
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
8 additions and
8 deletions
-
roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/ds-ingress-nginx-controller.yml.j2
-
roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/svc-ingress-nginx.yml.j2
|
|
@ -129,20 +129,20 @@ spec: |
|
|
|
{% if ingress_nginx_configmap_tcp_services %} |
|
|
|
{% for port in ingress_nginx_configmap_tcp_services.keys() %} |
|
|
|
- name: tcp-port-{{ port }} |
|
|
|
containerPort: "{{ port | int }}" |
|
|
|
containerPort: {{ port | int }} |
|
|
|
protocol: TCP |
|
|
|
{% if not ingress_nginx_host_network %} |
|
|
|
hostPort: "{{ port | int }}" |
|
|
|
hostPort: {{ port | int }} |
|
|
|
{% endif %} |
|
|
|
{% endfor %} |
|
|
|
{% endif %} |
|
|
|
{% if ingress_nginx_configmap_udp_services %} |
|
|
|
{% for port in ingress_nginx_configmap_udp_services.keys() %} |
|
|
|
- name: udp-port-{{ port }} |
|
|
|
containerPort: "{{ port | int }}" |
|
|
|
containerPort: {{ port | int }} |
|
|
|
protocol: UDP |
|
|
|
{% if not ingress_nginx_host_network %} |
|
|
|
hostPort: "{{ port | int }}" |
|
|
|
hostPort: {{ port | int }} |
|
|
|
{% endif %} |
|
|
|
{% endfor %} |
|
|
|
{% endif %} |
|
|
|
|
|
@ -31,16 +31,16 @@ spec: |
|
|
|
{% if ingress_nginx_configmap_tcp_services %} |
|
|
|
{% for port in ingress_nginx_configmap_tcp_services.keys() %} |
|
|
|
- name: tcp-port-{{ port }} |
|
|
|
port: "{{ port | int }}" |
|
|
|
targetPort: "{{ port | int }}" |
|
|
|
port: {{ port | int }} |
|
|
|
targetPort: {{ port | int }} |
|
|
|
protocol: TCP |
|
|
|
{% endfor %} |
|
|
|
{% endif %} |
|
|
|
{% if ingress_nginx_configmap_udp_services %} |
|
|
|
{% for port in ingress_nginx_configmap_udp_services.keys() %} |
|
|
|
- name: udp-port-{{ port }} |
|
|
|
port: "{{ port | int }}" |
|
|
|
targetPort: "{{ port | int }}" |
|
|
|
port: {{ port | int }} |
|
|
|
targetPort: {{ port | int }} |
|
|
|
protocol: UDP |
|
|
|
{% endfor %} |
|
|
|
{% endif %} |
|
|
|