From 30333c2b762b9ac188b5e0fe710dfcc332a16f83 Mon Sep 17 00:00:00 2001 From: Wouter Smit Date: Thu, 20 Oct 2022 07:23:00 +0200 Subject: [PATCH] allows overriding the namespace of the orchestrator --- helm/trident-operator/templates/_helpers.tpl | 10 ++++++++++ .../templates/tridentorchestrator.yaml | 2 +- helm/trident-operator/values.yaml | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/helm/trident-operator/templates/_helpers.tpl b/helm/trident-operator/templates/_helpers.tpl index d9399252c..34c298b6c 100644 --- a/helm/trident-operator/templates/_helpers.tpl +++ b/helm/trident-operator/templates/_helpers.tpl @@ -187,3 +187,13 @@ Trident image pull policy {{- "IfNotPresent" }} {{- end }} {{- end }} + +{{/* +Trident orchestrator namespace +*/}} +{{- define "trident.orchestratorNamespace" -}} +{{- if .Values.orchestratorNamespace }} +{{- .Values.orchestratorNamespace }} +{{- else }} +{{- .Release.Namespace }}{{- end }} +{{- end }} diff --git a/helm/trident-operator/templates/tridentorchestrator.yaml b/helm/trident-operator/templates/tridentorchestrator.yaml index 9e7c3b5fd..769d42e3a 100644 --- a/helm/trident-operator/templates/tridentorchestrator.yaml +++ b/helm/trident-operator/templates/tridentorchestrator.yaml @@ -3,7 +3,7 @@ kind: TridentOrchestrator metadata: name: trident spec: - namespace: {{ .Release.Namespace }} + namespace: {{ include "trident.orchestratorNamespace" $ }} enableForceDetach: {{ include "trident.enableForceDetach" $ }} debug: {{ include "trident.debug" $ }} IPv6: {{ include "trident.IPv6" $ }} diff --git a/helm/trident-operator/values.yaml b/helm/trident-operator/values.yaml index 40ddee792..a1301550d 100644 --- a/helm/trident-operator/values.yaml +++ b/helm/trident-operator/values.yaml @@ -105,5 +105,8 @@ tridentProbePort: "" # windows allows Trident to be installed on Windows worker node. windows: false +# orchestratorNamespace allows overriding the namespace of the orchestrator +orchestratorNamespace: "" + # enableForceDetach allows enabling the force detach feature. enableForceDetach: false