From 926141b6137b9b1c22be7f214210bc70f2871101 Mon Sep 17 00:00:00 2001 From: Guillaume Delacour Date: Tue, 21 Jan 2020 22:33:46 +0100 Subject: [PATCH] helm-chart: Support excluding namespaces This is interesting to scan all namespaces unless a list of specific ones. Referenced in #66. --- helm-chart/templates/deployment.yaml | 3 +++ helm-chart/values.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/helm-chart/templates/deployment.yaml b/helm-chart/templates/deployment.yaml index 14ee600..c1ccc94 100644 --- a/helm-chart/templates/deployment.yaml +++ b/helm-chart/templates/deployment.yaml @@ -31,6 +31,9 @@ spec: {{- if .Values.namespace.active_in }} - --namespace={{ .Values.namespace.active_in }} {{- end }} + {{- if .Values.namespace.inactive_in }} + - --exclude-namespaces={{ .Values.namespace.inactive_in | join "," }} + {{- end }} {{- end }} {{- if .Values.debug.enable }} - --debug diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 1af2e15..4ef2443 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -12,6 +12,8 @@ debug: # namespace: ## Deployment will query all namespaces if left empty: # active_in: + ## Deployment exclude these namespaces: +# inactive_in: ## How frequently kube-downscaler should query applications uptime, unit is in seconds. ## Default is 1 minute.