From 98842d7c7e1fd2a4a89b05412964234e851328ba Mon Sep 17 00:00:00 2001 From: Noooste <83548733+Noooste@users.noreply.github.com> Date: Fri, 17 Apr 2026 16:28:51 +0200 Subject: [PATCH] feat: add namespace to metadata in Kubernetes resource files Signed-off-by: Noooste <83548733+Noooste@users.noreply.github.com> --- helm/garage-ui/templates/configmap.yaml | 1 + helm/garage-ui/templates/deployment.yaml | 1 + helm/garage-ui/templates/ingress.yaml | 1 + helm/garage-ui/templates/networkpolicy.yaml | 1 + helm/garage-ui/templates/secret.yaml | 5 +++++ helm/garage-ui/templates/service.yaml | 1 + helm/garage-ui/templates/servicemonitor.yaml | 1 + 7 files changed, 11 insertions(+) diff --git a/helm/garage-ui/templates/configmap.yaml b/helm/garage-ui/templates/configmap.yaml index bfacfd8..ae82fec 100644 --- a/helm/garage-ui/templates/configmap.yaml +++ b/helm/garage-ui/templates/configmap.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ include "garage-ui.fullname" . }}-config + namespace: {{ .Release.Namespace }} labels: {{- include "garage-ui.labels" . | nindent 4 }} data: diff --git a/helm/garage-ui/templates/deployment.yaml b/helm/garage-ui/templates/deployment.yaml index db8a6d0..8b8c61b 100644 --- a/helm/garage-ui/templates/deployment.yaml +++ b/helm/garage-ui/templates/deployment.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "garage-ui.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "garage-ui.labels" . | nindent 4 }} spec: diff --git a/helm/garage-ui/templates/ingress.yaml b/helm/garage-ui/templates/ingress.yaml index 92773ff..6e5d4d7 100644 --- a/helm/garage-ui/templates/ingress.yaml +++ b/helm/garage-ui/templates/ingress.yaml @@ -3,6 +3,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "garage-ui.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "garage-ui.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} diff --git a/helm/garage-ui/templates/networkpolicy.yaml b/helm/garage-ui/templates/networkpolicy.yaml index 412a8db..c4e6c1f 100644 --- a/helm/garage-ui/templates/networkpolicy.yaml +++ b/helm/garage-ui/templates/networkpolicy.yaml @@ -3,6 +3,7 @@ apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: {{ include "garage-ui.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "garage-ui.labels" . | nindent 4 }} spec: diff --git a/helm/garage-ui/templates/secret.yaml b/helm/garage-ui/templates/secret.yaml index 39dc817..0843d53 100644 --- a/helm/garage-ui/templates/secret.yaml +++ b/helm/garage-ui/templates/secret.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ include "garage-ui.fullname" . }}-admin-token + namespace: {{ .Release.Namespace }} labels: {{- include "garage-ui.labels" . | nindent 4 }} type: Opaque @@ -15,6 +16,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ include "garage-ui.fullname" . }}-admin-password + namespace: {{ .Release.Namespace }} labels: {{- include "garage-ui.labels" . | nindent 4 }} type: Opaque @@ -31,6 +33,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ include "garage-ui.fullname" . }}-oidc-client-secret + namespace: {{ .Release.Namespace }} labels: {{- include "garage-ui.labels" . | nindent 4 }} type: Opaque @@ -43,6 +46,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ include "garage-ui.fullname" . }}-jwt-key + namespace: {{ .Release.Namespace }} labels: {{- include "garage-ui.labels" . | nindent 4 }} annotations: @@ -61,6 +65,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ $secretName }} + namespace: {{ .Release.Namespace }} labels: {{- include "garage-ui.labels" . | nindent 4 }} annotations: diff --git a/helm/garage-ui/templates/service.yaml b/helm/garage-ui/templates/service.yaml index aa39b5c..571a5f4 100644 --- a/helm/garage-ui/templates/service.yaml +++ b/helm/garage-ui/templates/service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "garage-ui.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "garage-ui.labels" . | nindent 4 }} spec: diff --git a/helm/garage-ui/templates/servicemonitor.yaml b/helm/garage-ui/templates/servicemonitor.yaml index 3a2ef11..042e22c 100644 --- a/helm/garage-ui/templates/servicemonitor.yaml +++ b/helm/garage-ui/templates/servicemonitor.yaml @@ -3,6 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ include "garage-ui.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "garage-ui.labels" . | nindent 4 }} {{- with .Values.serviceMonitor.labels }}