Skip to content

Commit

Permalink
remove unnecessary permissions for terminating gateways
Browse files Browse the repository at this point in the history
  • Loading branch information
jm96441n committed Apr 19, 2024
1 parent 8ac97bf commit 975434f
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions charts/consul/templates/terminating-gateways-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,14 @@ metadata:
release: {{ $root.Release.Name }}
component: terminating-gateway
terminating-gateway-name: {{ template "consul.fullname" $root }}-{{ .name }}
{{- if (or $root.Values.global.acls.manageSystemACLs $root.Values.global.enablePodSecurityPolicies) }}
rules:
{{- if $root.Values.global.enablePodSecurityPolicies }}
rules:
- apiGroups: ["policy"]
resources: ["podsecuritypolicies"]
resourceNames:
- {{ template "consul.fullname" $root }}-{{ .name }}
verbs:
- use
{{- end }}
{{- if $root.Values.global.acls.manageSystemACLs }}
- apiGroups: [""]
resources:
- secrets
resourceNames:
- {{ template "consul.fullname" $root }}-{{ .name }}-acl-token
verbs:
- get
{{- end }}
{{- else }}
rules: []
{{- end }}
Expand Down

0 comments on commit 975434f

Please sign in to comment.