Skip to content

Commit

Permalink
feat: add deletecollection right on secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
jspdown authored May 28, 2024
1 parent 7112c8a commit fb69807
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 20 deletions.
11 changes: 1 addition & 10 deletions traefik/templates/rbac/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ rules:
- apiratelimits
- apis
- apiversions
- edgeingresses
verbs:
- list
- watch
Expand All @@ -146,8 +145,6 @@ rules:
- apiGroups:
- ""
resources:
- services
- endpoints
- namespaces
- pods
- nodes
Expand Down Expand Up @@ -193,13 +190,11 @@ rules:
- update
- create
- delete
- deletecollection
- apiGroups:
- apps
resources:
- deployments
- statefulsets
- replicasets
- daemonsets
verbs:
- get
- list
Expand All @@ -213,8 +208,4 @@ rules:
- get
- list
- watch
- create
- update
- patch
- delete
{{- end -}}
85 changes: 85 additions & 0 deletions traefik/templates/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,90 @@ rules:
verbs:
- update
{{- end -}}
{{- if $.Values.hub.token }}
- apiGroups:
- hub.traefik.io
resources:
- accesscontrolpolicies
- apiaccesses
- apiportals
- apiratelimits
- apis
- apiversions
verbs:
- list
- watch
- create
- update
- patch
- delete
- get
- apiGroups:
- ""
resources:
- namespaces
- pods
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- discovery.k8s.io
resources:
- endpointslices
verbs:
- list
- get
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
- update
- create
- delete
- deletecollection
- apiGroups:
- apps
resources:
- replicasets
verbs:
- get
- list
- watch
- apiGroups:
- extensions
- networking.k8s.io
resources:
- ingresses
verbs:
- get
- list
- watch
{{- end -}}
{{- end -}}
{{- end -}}
11 changes: 1 addition & 10 deletions traefik/tests/rbac-config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,6 @@ tests:
- apiratelimits
- apis
- apiversions
- edgeingresses
verbs:
- list
- watch
Expand All @@ -820,8 +819,6 @@ tests:
apiGroups:
- ""
resources:
- services
- endpoints
- namespaces
- pods
- nodes
Expand Down Expand Up @@ -883,17 +880,15 @@ tests:
- update
- create
- delete
- deletecollection
- template: rbac/clusterrole.yaml
contains:
path: rules
content:
apiGroups:
- apps
resources:
- deployments
- statefulsets
- replicasets
- daemonsets
verbs:
- get
- list
Expand All @@ -911,7 +906,3 @@ tests:
- get
- list
- watch
- create
- update
- patch
- delete

0 comments on commit fb69807

Please sign in to comment.