2018-02-13 09:08:44 +08:00
|
|
|
---
|
2020-04-15 04:14:04 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
2018-02-13 09:08:44 +08:00
|
|
|
kind: Role
|
|
|
|
metadata:
|
|
|
|
name: ingress-nginx
|
|
|
|
namespace: {{ ingress_nginx_namespace }}
|
2018-09-02 12:19:38 +08:00
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: ingress-nginx
|
|
|
|
app.kubernetes.io/part-of: ingress-nginx
|
2018-02-13 09:08:44 +08:00
|
|
|
rules:
|
|
|
|
- apiGroups: [""]
|
2020-04-22 23:41:52 +08:00
|
|
|
resources: ["namespaces"]
|
2018-02-13 09:08:44 +08:00
|
|
|
verbs: ["get"]
|
2020-04-22 23:41:52 +08:00
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["configmaps", "pods", "secrets", "endpoints"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["services"]
|
2021-02-09 23:53:13 +08:00
|
|
|
verbs: ["get", "list", "watch"]
|
2020-04-22 23:41:52 +08:00
|
|
|
- apiGroups: ["extensions", "networking.k8s.io"]
|
|
|
|
resources: ["ingresses"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: ["extensions", "networking.k8s.io"]
|
|
|
|
resources: ["ingresses/status"]
|
|
|
|
verbs: ["update"]
|
2020-06-09 17:45:18 +08:00
|
|
|
- apiGroups: ["networking.k8s.io"]
|
|
|
|
resources: ["ingressclasses"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
2018-02-13 09:08:44 +08: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.
|
|
|
|
resourceNames: ["ingress-controller-leader-nginx"]
|
|
|
|
verbs: ["get", "update"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["configmaps"]
|
|
|
|
verbs: ["create"]
|
2020-04-22 23:41:52 +08:00
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["create", "patch"]
|
2018-09-02 12:19:38 +08:00
|
|
|
- apiGroups: ["policy"]
|
|
|
|
resourceNames: ["ingress-nginx"]
|
|
|
|
resources: ["podsecuritypolicies"]
|
|
|
|
verbs: ["use"]
|