2018-02-13 01:08:44 +00:00
---
2020-04-14 20:14:04 +00:00
apiVersion: rbac.authorization.k8s.io/v1
2018-02-13 01:08:44 +00:00
kind: Role
metadata:
name: ingress-nginx
namespace: {{ ingress_nginx_namespace }}
2018-09-02 04:19:38 +00:00
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
2018-02-13 01:08:44 +00:00
rules:
- apiGroups: [""]
2020-04-22 15:41:52 +00:00
resources: ["namespaces"]
2018-02-13 01:08:44 +00:00
verbs: ["get"]
2020-04-22 15:41:52 +00:00
- apiGroups: [""]
resources: ["configmaps", "pods", "secrets", "endpoints"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["services"]
2021-02-09 15:53:13 +00:00
verbs: ["get", "list", "watch"]
2020-04-22 15:41:52 +00:00
- apiGroups: ["extensions", "networking.k8s.io"]
2021-09-06 11:50:36 +00:00
resources: ["ingresses", "ingressclasses"]
2020-04-22 15:41:52 +00:00
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions", "networking.k8s.io"]
resources: ["ingresses/status"]
verbs: ["update"]
2020-06-09 09:45:18 +00:00
- apiGroups: ["networking.k8s.io"]
resources: ["ingressclasses"]
verbs: ["get", "list", "watch"]
2018-02-13 01:08:44 +00:00
- apiGroups: [""]
resources: ["configmaps"]
# 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.
2022-08-09 11:52:50 +00:00
resourceNames: [{% if ingress_class is defined %}"ingress-controller-leader-{{ ingress_nginx_class | default('nginx') }}"{% else %}"ingress-controller-leader"{% endif %}]
2018-02-13 01:08:44 +00:00
verbs: ["get", "update"]
2022-07-15 01:46:25 +00:00
- 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.
2022-08-09 11:52:50 +00:00
resourceNames: [{% if ingress_class is defined %}"ingress-controller-leader-{{ ingress_nginx_class | default('nginx') }}"{% else %}"ingress-controller-leader"{% endif %}]
2022-07-15 01:46:25 +00:00
verbs: ["get", "update"]
2018-02-13 01:08:44 +00:00
- apiGroups: [""]
resources: ["configmaps"]
2021-09-06 11:50:36 +00:00
verbs: ["create", "update"]
2020-04-22 15:41:52 +00:00
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "patch"]
2018-09-02 04:19:38 +00:00
- apiGroups: ["policy"]
resourceNames: ["ingress-nginx"]
resources: ["podsecuritypolicies"]
verbs: ["use"]
2022-07-15 01:46:25 +00:00
- 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.
2022-08-09 11:52:50 +00:00
resourceNames: [{% if ingress_class is defined %}"ingress-controller-leader-{{ ingress_nginx_class | default('nginx') }}"{% else %}"ingress-controller-leader"{% endif %}]
2022-07-15 01:46:25 +00:00
verbs: ["get", "update"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["create"]
2022-10-18 23:53:00 +00:00
- apiGroups: ["discovery.k8s.io"]
resources: ["endpointslices"]
verbs: ["get", "list", "watch"]