diff --git a/roles/kubernetes-apps/ingress_controller/ingress_nginx/tasks/main.yml b/roles/kubernetes-apps/ingress_controller/ingress_nginx/tasks/main.yml index 15137e72926..b67a17f393b 100644 --- a/roles/kubernetes-apps/ingress_controller/ingress_nginx/tasks/main.yml +++ b/roles/kubernetes-apps/ingress_controller/ingress_nginx/tasks/main.yml @@ -22,7 +22,7 @@ - { name: clusterrolebinding-ingress-nginx, file: clusterrolebinding-ingress-nginx.yml, type: clusterrolebinding } - { name: role-ingress-nginx, file: role-ingress-nginx.yml, type: role } - { name: rolebinding-ingress-nginx, file: rolebinding-ingress-nginx.yml, type: rolebinding } - - { name: ingressclass-nginx, file: ingressclass-nginx.yml.j2, type: ingressclass } + - { name: ingressclass-nginx, file: ingressclass-nginx.yml, type: ingressclass } - { name: ds-ingress-nginx-controller, file: ds-ingress-nginx-controller.yml, type: ds } ingress_nginx_templates_for_webhook: - { name: admission-webhook-configuration, file: admission-webhook-configuration.yml, type: sa } diff --git a/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/role-ingress-nginx.yml.j2 b/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/role-ingress-nginx.yml.j2 index a09b399184b..6c4b1c13fa7 100644 --- a/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/role-ingress-nginx.yml.j2 +++ b/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/role-ingress-nginx.yml.j2 @@ -32,7 +32,7 @@ rules: # Here: "-" # This has to be adapted if you change either parameter # when launching the nginx-ingress-controller. - resourceNames: [{% if ingress_nginx_class is defined %}"ingress-controller-leader-{{ ingress_nginx_class | default('nginx') }}"{% else %}"ingress-controller-leader"{% endif %}] + resourceNames: ["ingress-controller-leader-{{ ingress_nginx_class }}"] verbs: ["get", "update"] - apiGroups: [""] resources: ["events"] @@ -43,7 +43,7 @@ rules: # Here: "-" # This has to be adapted if you change either parameter # when launching the nginx-ingress-controller. - resourceNames: [{% if ingress_nginx_class is defined %}"ingress-controller-leader-{{ ingress_nginx_class | default('nginx') }}"{% else %}"ingress-controller-leader"{% endif %}] + resourceNames: ["ingress-controller-leader-{{ ingress_nginx_class }}"] verbs: ["get", "update"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"]