Skip to content

Commit

Permalink
Add explainatory comments about configmap name
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzj committed Jun 1, 2017
1 parent cfef998 commit b84c9b4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
17 changes: 16 additions & 1 deletion examples/rbac/nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,23 @@ granted to the ClusterRole named `nginx-ingress-clusterrole`
These permissions are granted specific to the nginx-ingress namespace. These
permissions are granted to the Role named `nginx-ingress-role`

* `configmaps`, `pods`, `secrets`: get
* `endpoints`: create, get, update
* `pods`, `secrets`: get

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

Expand Down
4 changes: 4 additions & 0 deletions examples/rbac/nginx/nginx-ingress-controller-rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ rules:
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
Expand Down

0 comments on commit b84c9b4

Please sign in to comment.