aboutsummaryrefslogtreecommitdiff
path: root/script/helm/garage/templates
diff options
context:
space:
mode:
authorMaximilien R <maximilien@deuxfleurs.fr>2022-06-22 10:04:59 +0200
committerMaximilien R <maximilien@deuxfleurs.fr>2022-09-30 18:46:57 +0200
commit6dba7dadf44781abfb878f06fba86e731b267c87 (patch)
treed31282531e22971fdfb4782ab570385693b896de /script/helm/garage/templates
parentd2c937a931b6549ffd2f2afdd7a871be8d8eefbf (diff)
downloadgarage-6dba7dadf44781abfb878f06fba86e731b267c87.tar.gz
garage-6dba7dadf44781abfb878f06fba86e731b267c87.zip
Add missing ClusterRole and bindings for CRDs
Diffstat (limited to 'script/helm/garage/templates')
-rw-r--r--script/helm/garage/templates/clusterrole.yaml28
1 files changed, 28 insertions, 0 deletions
diff --git a/script/helm/garage/templates/clusterrole.yaml b/script/helm/garage/templates/clusterrole.yaml
new file mode 100644
index 00000000..fa3e6405
--- /dev/null
+++ b/script/helm/garage/templates/clusterrole.yaml
@@ -0,0 +1,28 @@
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: manage-crds-{{ .Release.Namespace }}-{{ .Release.Name }}
+ labels:
+ {{- include "garage.labels" . | nindent 4 }}
+rules:
+- apiGroups: ["apiextensions.k8s.io"]
+ resources: ["customresourcedefinitions"]
+ verbs: ["get", "list", "watch", "create", "patch"]
+- apiGroups: ["deuxfleurs.fr"]
+ resources: ["garagenodes"]
+ verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: allow-crds-for-{{ .Release.Namespace }}-{{ .Release.Name }}
+ labels:
+ {{- include "garage.labels" . | nindent 4 }}
+subjects:
+- kind: ServiceAccount
+ name: {{ include "garage.serviceAccountName" . }}
+ namespace: {{ .Release.Namespace }}
+roleRef:
+ kind: ClusterRole
+ name: manage-crds-{{ .Release.Namespace }}-{{ .Release.Name }}
+ apiGroup: rbac.authorization.k8s.io \ No newline at end of file