From bed6a46f8df6d0320c96eeb2507ed7c1b4013e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ragnar=20Mikael=20Halld=C3=B3rsson?= Date: Tue, 7 May 2024 19:50:31 +0200 Subject: [PATCH] feat: Update Helm chart to support TAINT_KEY feature --- chart/templates/clusterrole.yaml | 4 ++++ chart/templates/daemonset.yaml | 2 ++ chart/values.yaml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/chart/templates/clusterrole.yaml b/chart/templates/clusterrole.yaml index a24da84..4f2123c 100644 --- a/chart/templates/clusterrole.yaml +++ b/chart/templates/clusterrole.yaml @@ -8,7 +8,11 @@ metadata: rules: - apiGroups: [ "" ] resources: [ "nodes" ] + {{- if .Values.rbac.allowNodesPatchPermission }} + verbs: [ "get", "patch" ] + {{- else }} verbs: [ "get" ] + {{- end }} - apiGroups: [ "coordination.k8s.io" ] resources: [ "leases" ] verbs: [ "create", "delete", "get" ] diff --git a/chart/templates/daemonset.yaml b/chart/templates/daemonset.yaml index 8d11e50..5ec4d3d 100644 --- a/chart/templates/daemonset.yaml +++ b/chart/templates/daemonset.yaml @@ -42,6 +42,8 @@ spec: fieldPath: spec.nodeName - name: FILTER value: {{ .Values.daemonSet.env.FILTER | quote }} + - name: TAINT_KEY + value: {{ .Values.daemonSet.env.TAINT_KEY | quote }} - name: LOG_LEVEL value: {{ .Values.daemonSet.env.LOG_LEVEL | quote }} - name: LOG_JSON diff --git a/chart/values.yaml b/chart/values.yaml index 08dca3c..9cdd362 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -25,6 +25,7 @@ serviceAccount: # Role-Based Access Control (RBAC) configuration. rbac: create: true + allowNodesPatchPermission: false # DaemonSet configuration. daemonSet: @@ -35,6 +36,7 @@ daemonSet: kubeip: use env: FILTER: labels.kubeip=reserved;labels.environment=demo + TAINT_KEY: "" LOG_LEVEL: debug LOG_JSON: true resources: