From a89cd6d3ba315b7102d3e19e0d340e225f20636a Mon Sep 17 00:00:00 2001 From: Christian Baumann Date: Sat, 18 Feb 2023 14:50:02 +0100 Subject: [PATCH] Add namespace to namespaced resources in helm chart Signed-off-by: Christian Baumann --- charts/flagger/templates/account.yaml | 1 + charts/flagger/templates/deployment.yaml | 1 + charts/flagger/templates/pdb.yaml | 1 + charts/flagger/templates/psp.yaml | 1 + 4 files changed, 4 insertions(+) diff --git a/charts/flagger/templates/account.yaml b/charts/flagger/templates/account.yaml index 16b87ac1..72e8ccc8 100644 --- a/charts/flagger/templates/account.yaml +++ b/charts/flagger/templates/account.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ template "flagger.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} annotations: {{- if .Values.serviceAccount.annotations }} {{ toYaml .Values.serviceAccount.annotations | indent 4 }} diff --git a/charts/flagger/templates/deployment.yaml b/charts/flagger/templates/deployment.yaml index badb6197..4d3b854f 100644 --- a/charts/flagger/templates/deployment.yaml +++ b/charts/flagger/templates/deployment.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "flagger.fullname" . }} + namespace: {{ .Release.Namespace }} labels: helm.sh/chart: {{ template "flagger.chart" . }} app.kubernetes.io/name: {{ template "flagger.name" . }} diff --git a/charts/flagger/templates/pdb.yaml b/charts/flagger/templates/pdb.yaml index 24cf4231..d716a827 100644 --- a/charts/flagger/templates/pdb.yaml +++ b/charts/flagger/templates/pdb.yaml @@ -3,6 +3,7 @@ apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: name: {{ template "flagger.name" . }} + namespace: {{ .Release.Namespace }} spec: minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} selector: diff --git a/charts/flagger/templates/psp.yaml b/charts/flagger/templates/psp.yaml index 8e314591..76becf0a 100644 --- a/charts/flagger/templates/psp.yaml +++ b/charts/flagger/templates/psp.yaml @@ -50,6 +50,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: {{ template "flagger.fullname" . }}-psp + namespace: {{ .Release.Namespace }} labels: helm.sh/chart: {{ template "flagger.chart" . }} app.kubernetes.io/name: {{ template "flagger.name" . }}