Skip to content

Commit

Permalink
when ingress-nginx is deployes without a class, we need to use 'ingre…
Browse files Browse the repository at this point in the history
…ss-controller-leader' resource instead of the default 'ingress-controller-leader-nginx'
  • Loading branch information
cristicalin committed Aug 6, 2022
1 parent 0d3bd69 commit 52a55a4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ rules:
# Here: "<ingress-controller-leader>-<nginx>"
# This has to be adapted if you change either parameter
# when launching the nginx-ingress-controller.
resourceNames: ["ingress-controller-leader-{{ ingress_nginx_class | default('nginx') }}"]
resourceNames: [{% if ingress_class is defined %}"ingress-controller-leader-{{ ingress_nginx_class | default('nginx') }}"{% else %}"ingress-controller-leader"{% endif %}]
verbs: ["get", "update"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
# Defaults to "<election-id>-<ingress-class>"
# Here: "<ingress-controller-leader>-<nginx>"
# This has to be adapted if you change either parameter
# when launching the nginx-ingress-controller.
resourceNames: ["ingress-controller-leader-{{ ingress_nginx_class | default('nginx') }}"]
resourceNames: [{% if ingress_class is defined %}"ingress-controller-leader-{{ ingress_nginx_class | default('nginx') }}"{% else %}"ingress-controller-leader"{% endif %}]
verbs: ["get", "update"]
- apiGroups: [""]
resources: ["configmaps"]
Expand All @@ -58,7 +58,7 @@ rules:
# Here: "<ingress-controller-leader>-<nginx>"
# This has to be adapted if you change either parameter
# when launching the nginx-ingress-controller.
resourceNames: ["ingress-controller-leader-{{ ingress_nginx_class | default('nginx') }}"]
resourceNames: [{% if ingress_class is defined %}"ingress-controller-leader-{{ ingress_nginx_class | default('nginx') }}"{% else %}"ingress-controller-leader"{% endif %}]
verbs: ["get", "update"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
Expand Down

0 comments on commit 52a55a4

Please sign in to comment.