Merge pull request #804 from weitzj/fix/798

Fix #798 - RBAC for leader election
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-06-01 20:18:36 -04:00 committed by GitHub
commit f1484650d3
2 changed files with 29 additions and 0 deletions

View file

@ -49,6 +49,21 @@ permissions are granted to the Role named `nginx-ingress-role`
* `configmaps`, `pods`, `secrets`: get
* `endpoints`: create, get, update
Furthermore to support leader-election, the nginx-ingress-controller needs to
have access to a `configmap` using the resourceName `ingress-controller-leader-nginx`
* `configmaps`: create, get, update (for resourceName `ingress-controller-leader-nginx`)
This resourceName is the concatenation of the `election-id` and the
`ingress-class` as defined by the ingress-controller, which default to:
* `election-id`: `ingress-controller-leader`
* `ingress-class`: `nginx`
* `resourceName` : `<election-id>-<ingress-class>`
Please adapt accordingly if you overwrite either parameter when launching the
nginx-ingress-controller.
### Bindings
The ServiceAccount `nginx-ingress-serviceaccount` is bound to the Role

View file

@ -69,6 +69,20 @@ rules:
- secrets
verbs:
- get
- apiGroups:
- ""
resources:
- configmaps
resourceNames:
# 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.
- "ingress-controller-leader-nginx"
verbs:
- create
- get
- update
- apiGroups:
- ""
resources: