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

Update RBAC configuration and docs to include leases resource for leader election #1127

Merged
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
8 changes: 8 additions & 0 deletions docs/haproxy-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ metadata:
name: ingress-controller
namespace: ingress-controller
rules:
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- create
- update
- apiGroups:
- ""
resources:
Expand Down
17 changes: 13 additions & 4 deletions docs/static/resources/haproxy-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ rules:
- list
- watch
- apiGroups:
- "extensions"
- "networking.k8s.io"
- extensions
- networking.k8s.io
resources:
- ingressclasses
- ingresses
verbs:
- get
Expand All @@ -56,8 +57,8 @@ rules:
- create
- patch
- apiGroups:
- "extensions"
- "networking.k8s.io"
- extensions
- networking.k8s.io
resources:
- ingresses/status
verbs:
Expand All @@ -69,6 +70,14 @@ metadata:
name: ingress-controller
namespace: ingress-controller
rules:
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- create
- update
- apiGroups:
- ""
resources:
Expand Down
4 changes: 3 additions & 1 deletion examples/rbac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ The Role permissions are:
* `endpoints`: create, get, update

Furthermore to support leader-election, the ingress controller needs to
have access to a `configmap` in the `ingress-controller` namespace:
have access to both the `configmap` and `leases` resources in the
`ingress-controller` namespace:

* `configmaps`: get, update, create
* `coordination.k8s.io/leases`: get, update, create

## Namespace created in this example

Expand Down
8 changes: 8 additions & 0 deletions examples/rbac/ingress-controller-rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ metadata:
name: ingress-controller
namespace: ingress-controller
rules:
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- create
- update
- apiGroups:
- ""
resources:
Expand Down
Loading