From 2be826f7a497202e238823282f908de38bfa2ad4 Mon Sep 17 00:00:00 2001 From: Ishaan Mittal Date: Thu, 5 Sep 2024 12:15:33 +0530 Subject: [PATCH] add cluster role for updating prometheus volume size --- .../tfy-agent-proxy-clusterrole-cs.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/charts/tfy-agent/templates/tfy-agent-proxy-clusterrole-cs.yaml b/charts/tfy-agent/templates/tfy-agent-proxy-clusterrole-cs.yaml index f1d2b5b9b..031399618 100644 --- a/charts/tfy-agent/templates/tfy-agent-proxy-clusterrole-cs.yaml +++ b/charts/tfy-agent/templates/tfy-agent-proxy-clusterrole-cs.yaml @@ -8,13 +8,25 @@ rules: {{- if or .Values.config.allowedNamespaces .Values.tfyAgentProxy.clusterRole.strictMode }} {{- if not .Values.config.allowedNamespaces }} - apiGroups: [""] - resources: ["namespaces"] - verbs: ["create"] + resources: ["namespaces", "pods"] + verbs: ["create", "get"] {{- end }} - apiGroups: ["storage.k8s.io"] resources: ["storageclasses"] verbs: ["get", "list"] + - apiGroups: [""] + resources: ["persistentvolumeclaims"] + verbs: ["patch"] + + - apiGroups: ["apps"] + resources: ["statefulsets"] + verbs: ["delete"] + + - apiGroups: ["monitoring.coreos.com"] + resources: ["prometheuses"] + verbs: ["patch"] + - apiGroups: ["networking.istio.io"] resources: ["virtualservices"] verbs: ["list"]