From aa9aecb5d68f33c604db68b4d0b1c82efcba170e Mon Sep 17 00:00:00 2001 From: FrancescoL96 Date: Fri, 11 Oct 2024 18:06:08 +0200 Subject: [PATCH] fix: added clusterrole --- .gitignore | 2 -- chart/templates/clusterrole.yaml | 43 +++++++++++++++++++++++++ chart/templates/clusterrolebinding.yaml | 14 ++++++++ chart/templates/configmap.yaml | 4 ++- 4 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 chart/templates/clusterrole.yaml create mode 100644 chart/templates/clusterrolebinding.yaml diff --git a/.gitignore b/.gitignore index 3f21dff..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +0,0 @@ -chart/templates/clusterrole.yaml -chart/templates/clusterrolebinding.yaml diff --git a/chart/templates/clusterrole.yaml b/chart/templates/clusterrole.yaml new file mode 100644 index 0000000..d24d675 --- /dev/null +++ b/chart/templates/clusterrole.yaml @@ -0,0 +1,43 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "composition-watcher.fullname" . }} + labels: + {{- include "composition-watcher.labels" . | nindent 4 }} +rules: +- apiGroups: + - '*' + resources: + - '*' + verbs: + - get + - list + - watch +- apiGroups: + - resourcetrees.krateo.io + resources: + - compositionreferences + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - resourcetrees.krateo.io + resources: + - compositionreferences/status + verbs: + - get + - patch + - update +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch + - update diff --git a/chart/templates/clusterrolebinding.yaml b/chart/templates/clusterrolebinding.yaml new file mode 100644 index 0000000..3bf7209 --- /dev/null +++ b/chart/templates/clusterrolebinding.yaml @@ -0,0 +1,14 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "composition-watcher.fullname" . }} + labels: + {{- include "composition-watcher.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ include "composition-watcher.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ include "composition-watcher.serviceAccountName" . }} + namespace: krateo-system diff --git a/chart/templates/configmap.yaml b/chart/templates/configmap.yaml index b885f1a..655d1d6 100644 --- a/chart/templates/configmap.yaml +++ b/chart/templates/configmap.yaml @@ -5,4 +5,6 @@ metadata: labels: {{- include "composition-watcher.labels" . | nindent 4 }} data: - RESOURCE_TREE_HANDLER_URL: {{ .Values.env.RESOURCE_TREE_HANDLER_URL }} \ No newline at end of file + RESOURCE_TREE_HANDLER_URL: {{ .Values.env.RESOURCE_TREE_HANDLER_URL }} + POLLING_INTERVAL: {{ .Values.env.POLLING_INTERVAL }} + MAX_RECONCILE_RATE: {{ .Values.env.MAX_RECONCILE_RATE }}