From 142769d1a57cbc9b66807acddedff4d3d41c1b15 Mon Sep 17 00:00:00 2001 From: Devon Crouse Date: Tue, 21 Feb 2023 13:54:16 -0700 Subject: [PATCH] fix: add missing namespace to static Helm templates (#2593) --- cmd/build/helmify/static/templates/namespace-post-install.yaml | 2 ++ cmd/build/helmify/static/templates/namespace-post-upgrade.yaml | 1 + .../helmify/static/templates/webhook-configs-pre-delete.yaml | 2 ++ .../charts/gatekeeper/templates/namespace-post-install.yaml | 2 ++ .../charts/gatekeeper/templates/namespace-post-upgrade.yaml | 1 + .../charts/gatekeeper/templates/webhook-configs-pre-delete.yaml | 2 ++ 6 files changed, 10 insertions(+) diff --git a/cmd/build/helmify/static/templates/namespace-post-install.yaml b/cmd/build/helmify/static/templates/namespace-post-install.yaml index 4f84b52b409..d152aee83b6 100644 --- a/cmd/build/helmify/static/templates/namespace-post-install.yaml +++ b/cmd/build/helmify/static/templates/namespace-post-install.yaml @@ -3,6 +3,7 @@ apiVersion: batch/v1 kind: Job metadata: name: gatekeeper-update-namespace-label + namespace: {{ .Release.Namespace | quote }} labels: app: '{{ template "gatekeeper.name" . }}' chart: '{{ template "gatekeeper.name" . }}' @@ -96,6 +97,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: gatekeeper-update-namespace-label + namespace: {{ .Release.Namespace | quote }} labels: release: {{ .Release.Name }} heritage: {{ .Release.Service }} diff --git a/cmd/build/helmify/static/templates/namespace-post-upgrade.yaml b/cmd/build/helmify/static/templates/namespace-post-upgrade.yaml index 43a1dadd9fa..f1f7592e447 100644 --- a/cmd/build/helmify/static/templates/namespace-post-upgrade.yaml +++ b/cmd/build/helmify/static/templates/namespace-post-upgrade.yaml @@ -3,6 +3,7 @@ apiVersion: batch/v1 kind: Job metadata: name: gatekeeper-update-namespace-label-post-upgrade + namespace: {{ .Release.Namespace | quote }} labels: app: '{{ template "gatekeeper.name" . }}' chart: '{{ template "gatekeeper.name" . }}' diff --git a/cmd/build/helmify/static/templates/webhook-configs-pre-delete.yaml b/cmd/build/helmify/static/templates/webhook-configs-pre-delete.yaml index d610394de36..4541580a2f5 100644 --- a/cmd/build/helmify/static/templates/webhook-configs-pre-delete.yaml +++ b/cmd/build/helmify/static/templates/webhook-configs-pre-delete.yaml @@ -3,6 +3,7 @@ apiVersion: batch/v1 kind: Job metadata: name: gatekeeper-delete-webhook-configs + namespace: {{ .Release.Namespace | quote }} labels: app: '{{ template "gatekeeper.name" . }}' chart: '{{ template "gatekeeper.name" . }}' @@ -65,6 +66,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: gatekeeper-delete-webhook-configs + namespace: {{ .Release.Namespace | quote }} labels: release: {{ .Release.Name }} heritage: {{ .Release.Service }} diff --git a/manifest_staging/charts/gatekeeper/templates/namespace-post-install.yaml b/manifest_staging/charts/gatekeeper/templates/namespace-post-install.yaml index 4f84b52b409..d152aee83b6 100644 --- a/manifest_staging/charts/gatekeeper/templates/namespace-post-install.yaml +++ b/manifest_staging/charts/gatekeeper/templates/namespace-post-install.yaml @@ -3,6 +3,7 @@ apiVersion: batch/v1 kind: Job metadata: name: gatekeeper-update-namespace-label + namespace: {{ .Release.Namespace | quote }} labels: app: '{{ template "gatekeeper.name" . }}' chart: '{{ template "gatekeeper.name" . }}' @@ -96,6 +97,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: gatekeeper-update-namespace-label + namespace: {{ .Release.Namespace | quote }} labels: release: {{ .Release.Name }} heritage: {{ .Release.Service }} diff --git a/manifest_staging/charts/gatekeeper/templates/namespace-post-upgrade.yaml b/manifest_staging/charts/gatekeeper/templates/namespace-post-upgrade.yaml index 43a1dadd9fa..f1f7592e447 100644 --- a/manifest_staging/charts/gatekeeper/templates/namespace-post-upgrade.yaml +++ b/manifest_staging/charts/gatekeeper/templates/namespace-post-upgrade.yaml @@ -3,6 +3,7 @@ apiVersion: batch/v1 kind: Job metadata: name: gatekeeper-update-namespace-label-post-upgrade + namespace: {{ .Release.Namespace | quote }} labels: app: '{{ template "gatekeeper.name" . }}' chart: '{{ template "gatekeeper.name" . }}' diff --git a/manifest_staging/charts/gatekeeper/templates/webhook-configs-pre-delete.yaml b/manifest_staging/charts/gatekeeper/templates/webhook-configs-pre-delete.yaml index d610394de36..4541580a2f5 100644 --- a/manifest_staging/charts/gatekeeper/templates/webhook-configs-pre-delete.yaml +++ b/manifest_staging/charts/gatekeeper/templates/webhook-configs-pre-delete.yaml @@ -3,6 +3,7 @@ apiVersion: batch/v1 kind: Job metadata: name: gatekeeper-delete-webhook-configs + namespace: {{ .Release.Namespace | quote }} labels: app: '{{ template "gatekeeper.name" . }}' chart: '{{ template "gatekeeper.name" . }}' @@ -65,6 +66,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: gatekeeper-delete-webhook-configs + namespace: {{ .Release.Namespace | quote }} labels: release: {{ .Release.Name }} heritage: {{ .Release.Service }}