Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ingress rbac roles #806

Merged
merged 1 commit into from
Jun 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions examples/rbac/nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ able to function as an ingress across the cluster. These permissions are
granted to the ClusterRole named `nginx-ingress-clusterrole`

* `configmaps`, `endpoints`, `nodes`, `pods`, `secrets`: list, watch
* `nodes`: get
* `services`, `ingresses`: get, list, watch
* `events`: create, patch
* `ingresses/status`: update
Expand All @@ -49,6 +50,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
Expand Down
20 changes: 20 additions & 0 deletions examples/rbac/nginx/nginx-ingress-controller-rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ rules:
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -69,6 +75,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:
Expand Down