Allow setting annotations on ingress-nginx service (#11544)

pull/11002/head
Qasim Mehmood 2024-09-18 15:54:44 +05:00 committed by GitHub
parent c3de25c782
commit e550118314
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 0 deletions

View File

@ -104,6 +104,8 @@ gateway_api_enabled: false
ingress_nginx_enabled: false ingress_nginx_enabled: false
# ingress_nginx_host_network: false # ingress_nginx_host_network: false
# ingress_nginx_service_type: LoadBalancer # ingress_nginx_service_type: LoadBalancer
# ingress_nginx_service_annotations:
# example.io/loadbalancerIPs: 1.2.3.4
# ingress_nginx_service_nodeport_http: 30080 # ingress_nginx_service_nodeport_http: 30080
# ingress_nginx_service_nodeport_https: 30081 # ingress_nginx_service_nodeport_https: 30081
ingress_publish_status_address: "" ingress_publish_status_address: ""

View File

@ -4,6 +4,7 @@ ingress_nginx_host_network: false
ingress_nginx_service_type: LoadBalancer ingress_nginx_service_type: LoadBalancer
ingress_nginx_service_nodeport_http: "" ingress_nginx_service_nodeport_http: ""
ingress_nginx_service_nodeport_https: "" ingress_nginx_service_nodeport_https: ""
ingress_nginx_service_annotations: {}
ingress_publish_status_address: "" ingress_publish_status_address: ""
ingress_nginx_nodeselector: ingress_nginx_nodeselector:
kubernetes.io/os: "linux" kubernetes.io/os: "linux"

View File

@ -7,6 +7,10 @@ metadata:
labels: labels:
app.kubernetes.io/name: ingress-nginx app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx app.kubernetes.io/part-of: ingress-nginx
{% if ingress_nginx_service_annotations %}
annotations:
{{ ingress_nginx_service_annotations | to_nice_yaml(indent=2, width=1337) | indent(width=4) }}
{% endif %}
spec: spec:
type: {{ ingress_nginx_service_type }} type: {{ ingress_nginx_service_type }}
ports: ports: