Skip to content

Commit

Permalink
fix: 🐛 update rbac for both traefik.io and containo.us apigroups (#836)
Browse files Browse the repository at this point in the history
  • Loading branch information
mloiseleur authored Apr 25, 2023
1 parent 3ddbeb4 commit 0efbcb5
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions traefik/templates/rbac/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ rules:
{{- end -}}
{{- if .Values.providers.kubernetesCRD.enabled }}
- apiGroups:
- traefik.io
- traefik.containo.us
resources:
- ingressroutes
Expand Down
1 change: 1 addition & 0 deletions traefik/templates/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ rules:
{{- end -}}
{{- if .Values.providers.kubernetesCRD.enabled }}
- apiGroups:
- traefik.io
- traefik.containo.us
resources:
- ingressroutes
Expand Down
50 changes: 50 additions & 0 deletions traefik/tests/rbac-config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,53 @@ tests:
path: subjects[0].namespace
value: "traefik-ns-override"
template: rbac/rolebinding.yaml
- it: cluster rbac should be on both traefik.io and containo.us API group
set:
asserts:
- template: rbac/clusterrole.yaml
contains:
path: rules
content:
apiGroups:
- traefik.io
- traefik.containo.us
resources:
- ingressroutes
- ingressroutetcps
- ingressrouteudps
- middlewares
- middlewaretcps
- tlsoptions
- tlsstores
- traefikservices
- serverstransports
verbs:
- get
- list
- watch
- it: namespaced rbac should be on both traefik.io and containo.us API group
set:
rbac:
namespaced: true
asserts:
- template: rbac/role.yaml
contains:
path: rules
content:
apiGroups:
- traefik.io
- traefik.containo.us
resources:
- ingressroutes
- ingressroutetcps
- ingressrouteudps
- middlewares
- middlewaretcps
- tlsoptions
- tlsstores
- traefikservices
- serverstransports
verbs:
- get
- list
- watch

0 comments on commit 0efbcb5

Please sign in to comment.