From 5fe981ebac1af41bc12631536dfa0c96a305b60d Mon Sep 17 00:00:00 2001 From: Ciprian Hacman Date: Mon, 24 Feb 2020 12:18:47 +0200 Subject: [PATCH] Limit permissions required for Logagent only setups (#20971) Signed-off-by: Ciprian Hacman --- stable/sematext-agent/Chart.yaml | 2 +- stable/sematext-agent/templates/clusterrole.yaml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/stable/sematext-agent/Chart.yaml b/stable/sematext-agent/Chart.yaml index 3f3b4de30a..8f7befe185 100644 --- a/stable/sematext-agent/Chart.yaml +++ b/stable/sematext-agent/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 appVersion: "1.0" -version: 1.0.21 +version: 1.0.22 description: Helm chart for deploying Sematext Agent to Kubernetes keywords: - sematext diff --git a/stable/sematext-agent/templates/clusterrole.yaml b/stable/sematext-agent/templates/clusterrole.yaml index be26e9a9d3..b73685e5d9 100644 --- a/stable/sematext-agent/templates/clusterrole.yaml +++ b/stable/sematext-agent/templates/clusterrole.yaml @@ -14,6 +14,14 @@ rules: resources: - events - pods + verbs: + - list + - get + - watch +{{- if or (.Values.containerToken) (.Values.infraToken) }} +- apiGroups: + - "" + resources: - configmaps - nodes - secrets @@ -53,3 +61,4 @@ rules: - watch - list {{- end }} +{{- end }}