From 0513bc8858a4f2475474a99b42c42835d32c1a53 Mon Sep 17 00:00:00 2001 From: Megum1n Date: Thu, 14 Nov 2024 21:10:43 +0100 Subject: [PATCH] Helm: Add namespace to all resources (#4195) Co-authored-by: Charles Sibbald <123247+casibbald@users.noreply.github.com> --- charts/gitops-server/templates/deployment.yaml | 1 + charts/gitops-server/templates/ingress.yaml | 1 + charts/gitops-server/templates/network-policy.yaml | 1 + charts/gitops-server/templates/oidc-auth-secret.yaml | 1 + charts/gitops-server/templates/service.yaml | 1 + charts/gitops-server/templates/serviceaccount.yaml | 1 + 6 files changed, 6 insertions(+) diff --git a/charts/gitops-server/templates/deployment.yaml b/charts/gitops-server/templates/deployment.yaml index 02fe434fd6..b0e498bdf6 100644 --- a/charts/gitops-server/templates/deployment.yaml +++ b/charts/gitops-server/templates/deployment.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "chart.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "chart.labels" . | nindent 4 }} {{- include "chart.appSelectorLabels" . | nindent 4 }} diff --git a/charts/gitops-server/templates/ingress.yaml b/charts/gitops-server/templates/ingress.yaml index 63c1311c95..9e67ec210d 100644 --- a/charts/gitops-server/templates/ingress.yaml +++ b/charts/gitops-server/templates/ingress.yaml @@ -16,6 +16,7 @@ apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ $fullName }} + namespace: {{ .Release.Namespace }} labels: {{- include "chart.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} diff --git a/charts/gitops-server/templates/network-policy.yaml b/charts/gitops-server/templates/network-policy.yaml index e2cd10a61d..7c9e8e3134 100644 --- a/charts/gitops-server/templates/network-policy.yaml +++ b/charts/gitops-server/templates/network-policy.yaml @@ -4,6 +4,7 @@ apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: allow-dashboard-ingress + namespace: {{ .Release.Namespace }} spec: podSelector: matchLabels: diff --git a/charts/gitops-server/templates/oidc-auth-secret.yaml b/charts/gitops-server/templates/oidc-auth-secret.yaml index 212f14f12d..3b969eddbd 100644 --- a/charts/gitops-server/templates/oidc-auth-secret.yaml +++ b/charts/gitops-server/templates/oidc-auth-secret.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: oidc-auth + namespace: {{ .Release.Namespace }} labels: {{- include "chart.labels" . | nindent 4 }} data: diff --git a/charts/gitops-server/templates/service.yaml b/charts/gitops-server/templates/service.yaml index 38581eed37..df5c20bee8 100644 --- a/charts/gitops-server/templates/service.yaml +++ b/charts/gitops-server/templates/service.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "chart.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "chart.labels" . | nindent 4 }} annotations: diff --git a/charts/gitops-server/templates/serviceaccount.yaml b/charts/gitops-server/templates/serviceaccount.yaml index 26a57fa869..ae9123d33a 100644 --- a/charts/gitops-server/templates/serviceaccount.yaml +++ b/charts/gitops-server/templates/serviceaccount.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "chart.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "chart.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }}