add ingress controller class (#7522)

This commit is contained in:
Samuel Liu 2021-04-22 15:22:38 +08:00 committed by GitHub
parent 38d9d2ea0e
commit 8c7b90ebbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 1 deletions

View file

@ -110,6 +110,7 @@ ingress_publish_status_address: ""
# 53: "kube-system/coredns:53" # 53: "kube-system/coredns:53"
# ingress_nginx_extra_args: # ingress_nginx_extra_args:
# - --default-ssl-certificate=default/foo-tls # - --default-ssl-certificate=default/foo-tls
# ingress_nginx_class: nginx
# ambassador ingress controller deployment # ambassador ingress controller deployment
ingress_ambassador_enabled: false ingress_ambassador_enabled: false

View file

@ -12,3 +12,4 @@ ingress_nginx_configmap: {}
ingress_nginx_configmap_tcp_services: {} ingress_nginx_configmap_tcp_services: {}
ingress_nginx_configmap_udp_services: {} ingress_nginx_configmap_udp_services: {}
ingress_nginx_extra_args: [] ingress_nginx_extra_args: []
# ingress_nginx_class: nginx

View file

@ -50,6 +50,9 @@ spec:
- --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services - --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
- --udp-services-configmap=$(POD_NAMESPACE)/udp-services - --udp-services-configmap=$(POD_NAMESPACE)/udp-services
- --annotations-prefix=nginx.ingress.kubernetes.io - --annotations-prefix=nginx.ingress.kubernetes.io
{% if ingress_nginx_class is defined %}
- --ingress-class={{ ingress_nginx_class }}
{% endif %}
{% if ingress_nginx_host_network %} {% if ingress_nginx_host_network %}
- --report-node-internal-ip-address - --report-node-internal-ip-address
{% endif %} {% endif %}

View file

@ -32,7 +32,7 @@ rules:
# Here: "<ingress-controller-leader>-<nginx>" # Here: "<ingress-controller-leader>-<nginx>"
# This has to be adapted if you change either parameter # This has to be adapted if you change either parameter
# when launching the nginx-ingress-controller. # when launching the nginx-ingress-controller.
resourceNames: ["ingress-controller-leader-nginx"] resourceNames: ["ingress-controller-leader-{{ ingress_nginx_class | default('nginx') }}"]
verbs: ["get", "update"] verbs: ["get", "update"]
- apiGroups: [""] - apiGroups: [""]
resources: ["configmaps"] resources: ["configmaps"]