Skip to content

Commit

Permalink
Allow API gateway controller to manage roles + bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancoleman committed Nov 2, 2022
1 parent dc422f6 commit 706fa94
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions charts/consul/templates/api-gateway-controller-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@ metadata:
release: {{ .Release.Name }}
component: api-gateway-controller
rules:
{{- if .Values.global.enablePodSecurityPolicies }}
- apiGroups:
- rbac.authorization.k8s.io
resources:
- roles
- rolebindings
verbs:
- create
- get
- list
- watch
- apiGroups:
- policy
resources:
- podsecuritypolicies
verbs:
- use
{{- end}}
- apiGroups:
- api-gateway.consul.hashicorp.com
resources:
Expand Down
3 changes: 3 additions & 0 deletions charts/consul/templates/api-gateway-gatewayclassconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ spec:
{{- if .Values.global.acls.manageSystemACLs }}
managed: true
method: {{ template "consul.fullname" . }}-k8s-auth-method
{{- if .Values.global.enablePodSecurityPolicies }}
podSecurityPolicy: {{ template "consul.fullname" . }}-api-gateway
{{- end }}
{{- end }}
{{- if .Values.global.tls.enabled }}
scheme: https
Expand Down

0 comments on commit 706fa94

Please sign in to comment.