From 8e52d4d52dfa9e6dadd3724d5b198f4313ec76b9 Mon Sep 17 00:00:00 2001 From: Matt Morrison Date: Sun, 23 Jul 2023 20:23:46 +1200 Subject: [PATCH] Add role & roleBinding --- charts/kubechecks/templates/role.yaml | 8 ++++++++ charts/kubechecks/templates/rolebinding.yaml | 11 +++++++++++ 2 files changed, 19 insertions(+) create mode 100644 charts/kubechecks/templates/role.yaml create mode 100644 charts/kubechecks/templates/rolebinding.yaml diff --git a/charts/kubechecks/templates/role.yaml b/charts/kubechecks/templates/role.yaml new file mode 100644 index 00000000..dc7b024c --- /dev/null +++ b/charts/kubechecks/templates/role.yaml @@ -0,0 +1,8 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "kubechecks.fullname" . }} +rules: + - apiGroups: ['*'] + resources: ['applications', 'appprojects', 'services'] + verbs: ['*'] diff --git a/charts/kubechecks/templates/rolebinding.yaml b/charts/kubechecks/templates/rolebinding.yaml new file mode 100644 index 00000000..b0375563 --- /dev/null +++ b/charts/kubechecks/templates/rolebinding.yaml @@ -0,0 +1,11 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "kubechecks.fullname" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ include "kubechecks.fullname" . }} +subjects: + - kind: ServiceAccount + name: {{ include "kubechecks.serviceAccountName" . }}