From 1df735eb1d150660d9e7c77ebe10cf44f2e9ff1c Mon Sep 17 00:00:00 2001 From: Andres Romero Date: Fri, 6 Nov 2020 15:20:48 +0000 Subject: [PATCH] Adding watch namespace env variable --- config/manager/manager.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 0b40b09..4d7f4fa 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -28,5 +28,10 @@ spec: - "--enable-leader-election" - "--leader-election-id=gitea-operator" image: controller:latest + env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] terminationGracePeriodSeconds: 10 serviceAccountName: gitea-operator-sa