From 901d1305e5d81769dc682ee987e062a127186d1d Mon Sep 17 00:00:00 2001 From: mfhunruh <61690629+mfhunruh@users.noreply.github.com> Date: Sun, 20 Apr 2025 13:39:45 +0300 Subject: [PATCH] feat: add POD_NAMESPACE environment var to the snapshot controller --- deploy/csi-snapshot-controller.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deploy/csi-snapshot-controller.yaml b/deploy/csi-snapshot-controller.yaml index 94f7982f..867a2fc7 100644 --- a/deploy/csi-snapshot-controller.yaml +++ b/deploy/csi-snapshot-controller.yaml @@ -56,7 +56,12 @@ spec: args: - "--v=2" - "--leader-election=true" - - "--leader-election-namespace=kube-system" + - "--leader-election-namespace=$(POD_NAMESPACE)" + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: limits: memory: 300Mi