From 287c687f823e806a02b3166dc1a95c477a9fce40 Mon Sep 17 00:00:00 2001 From: James Mellors Date: Mon, 21 Apr 2025 19:54:55 +0100 Subject: [PATCH] add namespace override support to Helm chart --- helm/ntfy/templates/_helpers.tpl | 11 +++++++++++ helm/ntfy/values.yaml | 1 + 2 files changed, 12 insertions(+) diff --git a/helm/ntfy/templates/_helpers.tpl b/helm/ntfy/templates/_helpers.tpl index 6904d88..be688be 100644 --- a/helm/ntfy/templates/_helpers.tpl +++ b/helm/ntfy/templates/_helpers.tpl @@ -60,3 +60,14 @@ Create the name of the service account to use {{- default "default" .Values.serviceAccount.name }} {{- end }} {{- end }} + +{{/* +Determine the namespace to use, allowing for a namespace override. +*/}} +{{- define "ntfy.namespace" -}} + {{- if .Values.namespaceOverride }} + {{- .Values.namespaceOverride }} + {{- else }} + {{- .Release.Namespace }} + {{- end }} +{{- end }} diff --git a/helm/ntfy/values.yaml b/helm/ntfy/values.yaml index 990422b..aa6151e 100644 --- a/helm/ntfy/values.yaml +++ b/helm/ntfy/values.yaml @@ -13,6 +13,7 @@ image: imagePullSecrets: [] nameOverride: "" fullnameOverride: "" +namespaceOverride: "monitoring" serviceAccount: # Specifies whether a service account should be created