Skip to content

Commit

Permalink
feat: add RBAC rules for KongVault (#992)
Browse files Browse the repository at this point in the history
Co-authored-by: Patryk Małek <[email protected]>
  • Loading branch information
czeslavo and pmalek authored Jan 29, 2024
1 parent ad65c3c commit a8c3822
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
6 changes: 5 additions & 1 deletion charts/kong/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

## Unreleased

Nothing yet.
### Added

* Added controller's RBAC rules for `KongVault` CRD (installed only when KIC
version >= 3.1.0).
[#992](https://github.com/Kong/charts/pull/992)

## 2.34.0

Expand Down
18 changes: 18 additions & 0 deletions charts/kong/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1647,6 +1647,24 @@ of a Role or ClusterRole) that provide the ingress controller access to the
Kubernetes Cluster-scoped resources it uses to build Kong configuration.
*/}}
{{- define "kong.kubernetesRBACClusterRules" -}}
{{- if (semverCompare ">= 3.1.0" (include "kong.effectiveVersion" .Values.ingressController.image)) }}
- apiGroups:
- configuration.konghq.com
resources:
- kongvaults
verbs:
- get
- list
- watch
- apiGroups:
- configuration.konghq.com
resources:
- kongvaults/status
verbs:
- get
- patch
- update
{{- end }}
- apiGroups:
- configuration.konghq.com
resources:
Expand Down

0 comments on commit a8c3822

Please sign in to comment.