From 92d42967a12c16a3dc4c5216da6b73518caee98a Mon Sep 17 00:00:00 2001 From: nirbenator Date: Tue, 24 Sep 2024 15:49:13 +0300 Subject: [PATCH] feat: allow not creating rbac at all --- charts/komodor-agent/README.md | 1 + charts/komodor-agent/templates/clusterrole.yaml | 3 ++- charts/komodor-agent/values.yaml | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/komodor-agent/README.md b/charts/komodor-agent/README.md index 6f6fd82f..c6402286 100644 --- a/charts/komodor-agent/README.md +++ b/charts/komodor-agent/README.md @@ -97,6 +97,7 @@ The command removes all the Kubernetes components associated with the chart and | createNamespace | bool | `true` | Creates the namespace | | tags | dict | `{}` | Tags the agent in order to identify it based on `key:value` properties separated by semicolon (`;`) example: `--set tags.env=staging,tags.team=payments` --- Can also be set in the values under `tags` as a dictionary of key:value strings | | clusterName | string | `nil` | **(*required*)** Name to be displayed in the Komodor web application | +| createRbac | bool | `true` | Creates the necessary RBAC resources for the agent - use with caution! | | telegrafImageVersion | string | `"1.31.3-alpine-v1"` | Telegraf version to be used | | telegrafWindowsImageVersion | string | `"1.31.0-v1"` | Telegraf version to be used for windows | | networkMapperImageVersion | string | `"v1.0.3"` | Network mapper version to be used | diff --git a/charts/komodor-agent/templates/clusterrole.yaml b/charts/komodor-agent/templates/clusterrole.yaml index fcdbb3c9..e70d84b9 100644 --- a/charts/komodor-agent/templates/clusterrole.yaml +++ b/charts/komodor-agent/templates/clusterrole.yaml @@ -1,4 +1,4 @@ ---- +{{- if .Values.createRbac -}} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: @@ -519,3 +519,4 @@ subjects: - kind: ServiceAccount name: {{ include "komodorAgent.serviceAccountName" . }} namespace: {{ .Release.Namespace }} +{{- end -}} \ No newline at end of file diff --git a/charts/komodor-agent/values.yaml b/charts/komodor-agent/values.yaml index 251600c2..e855d3a5 100644 --- a/charts/komodor-agent/values.yaml +++ b/charts/komodor-agent/values.yaml @@ -9,6 +9,8 @@ createNamespace: true tags: { } # clusterName -- **(*required*)** Name to be displayed in the Komodor web application clusterName: +# createRbac -- Creates the necessary RBAC resources for the agent - use with caution! +createRbac: true # telegrafImageVersion -- (string) Telegraf version to be used telegrafImageVersion: &telegrafVersion 1.31.3-alpine-v1