From fa441203687494d46dbc378810e84805b35bde2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Bj=C3=B6rklin?= Date: Mon, 20 Nov 2023 02:49:32 -0800 Subject: [PATCH] add namespace property to all namespaced objects (#396) --- charts/netdata/templates/configmap.yaml | 4 ++++ charts/netdata/templates/cronjob.yaml | 1 + charts/netdata/templates/daemonset.yaml | 1 + charts/netdata/templates/deployment.yaml | 2 ++ charts/netdata/templates/ingress.yaml | 1 + charts/netdata/templates/persistentvolumeclaim.yaml | 3 +++ charts/netdata/templates/role.yml | 1 + charts/netdata/templates/rolebinding.yaml | 1 + charts/netdata/templates/secrets.yaml | 3 +++ charts/netdata/templates/service.yaml | 1 + charts/netdata/templates/serviceaccount.yaml | 2 ++ 11 files changed, 20 insertions(+) diff --git a/charts/netdata/templates/configmap.yaml b/charts/netdata/templates/configmap.yaml index ed549804..1ee3d2e2 100644 --- a/charts/netdata/templates/configmap.yaml +++ b/charts/netdata/templates/configmap.yaml @@ -5,6 +5,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: netdata-conf-parent + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} @@ -21,6 +22,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: netdata-conf-child + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} @@ -37,6 +39,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: netdata-conf-k8s-state + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} @@ -53,6 +56,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ .Values.sd.child.configmap.name }} + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} diff --git a/charts/netdata/templates/cronjob.yaml b/charts/netdata/templates/cronjob.yaml index 6f861be3..82593ce1 100644 --- a/charts/netdata/templates/cronjob.yaml +++ b/charts/netdata/templates/cronjob.yaml @@ -12,6 +12,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: {{ template "netdata.name" . }}-restarter + namespace: {{ .Release.Namespace }} spec: schedule: "{{ .Values.restarter.schedule }}" concurrencyPolicy: {{ .Values.restarter.concurrencyPolicy }} diff --git a/charts/netdata/templates/daemonset.yaml b/charts/netdata/templates/daemonset.yaml index a28512ab..c8f30937 100644 --- a/charts/netdata/templates/daemonset.yaml +++ b/charts/netdata/templates/daemonset.yaml @@ -3,6 +3,7 @@ apiVersion: apps/v1 kind: DaemonSet metadata: name: {{ template "netdata.name" . }}-child + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} diff --git a/charts/netdata/templates/deployment.yaml b/charts/netdata/templates/deployment.yaml index 18fd6340..55f1a7f7 100644 --- a/charts/netdata/templates/deployment.yaml +++ b/charts/netdata/templates/deployment.yaml @@ -4,6 +4,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "netdata.name" . }}-parent + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} @@ -182,6 +183,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "netdata.name" . }}-k8s-state + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} diff --git a/charts/netdata/templates/ingress.yaml b/charts/netdata/templates/ingress.yaml index d73fe24a..e8ec7ac1 100644 --- a/charts/netdata/templates/ingress.yaml +++ b/charts/netdata/templates/ingress.yaml @@ -8,6 +8,7 @@ apiVersion: {{ $apiVersion }} kind: Ingress metadata: name: {{ $fullName }} + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} diff --git a/charts/netdata/templates/persistentvolumeclaim.yaml b/charts/netdata/templates/persistentvolumeclaim.yaml index e93483e2..9d69b33b 100644 --- a/charts/netdata/templates/persistentvolumeclaim.yaml +++ b/charts/netdata/templates/persistentvolumeclaim.yaml @@ -4,6 +4,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: {{ template "netdata.name" . }}-parent-database + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} @@ -26,6 +27,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: {{ template "netdata.name" . }}-parent-alarms + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} @@ -48,6 +50,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: {{ template "netdata.name" . }}-k8s-state-varlib + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} diff --git a/charts/netdata/templates/role.yml b/charts/netdata/templates/role.yml index d2798029..4e504e6c 100644 --- a/charts/netdata/templates/role.yml +++ b/charts/netdata/templates/role.yml @@ -4,6 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: {{ template "netdata.fullname" . }}-restarter + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} diff --git a/charts/netdata/templates/rolebinding.yaml b/charts/netdata/templates/rolebinding.yaml index c58da749..2400c2ad 100644 --- a/charts/netdata/templates/rolebinding.yaml +++ b/charts/netdata/templates/rolebinding.yaml @@ -4,6 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: {{ template "netdata.fullname" . }}-restarter + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} diff --git a/charts/netdata/templates/secrets.yaml b/charts/netdata/templates/secrets.yaml index f72e9146..0fc3500a 100644 --- a/charts/netdata/templates/secrets.yaml +++ b/charts/netdata/templates/secrets.yaml @@ -5,6 +5,7 @@ apiVersion: v1 kind: Secret metadata: name: netdata-conf-parent + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} @@ -22,6 +23,7 @@ apiVersion: v1 kind: Secret metadata: name: netdata-conf-child + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} @@ -39,6 +41,7 @@ apiVersion: v1 kind: Secret metadata: name: netdata-conf-k8s-state + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} diff --git a/charts/netdata/templates/service.yaml b/charts/netdata/templates/service.yaml index 3172a3af..a240a4e6 100644 --- a/charts/netdata/templates/service.yaml +++ b/charts/netdata/templates/service.yaml @@ -4,6 +4,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "netdata.name" . }} + namespace: {{ .Release.Namespace }} labels: app: {{ template "netdata.name" . }} chart: {{ template "netdata.chart" . }} diff --git a/charts/netdata/templates/serviceaccount.yaml b/charts/netdata/templates/serviceaccount.yaml index accd919e..c00c598b 100644 --- a/charts/netdata/templates/serviceaccount.yaml +++ b/charts/netdata/templates/serviceaccount.yaml @@ -9,6 +9,7 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} name: {{ .Values.serviceAccount.name }} + namespace: {{ .Release.Namespace }} {{- end -}} {{- if and .Values.serviceAccount.create (include "netdata.restarter.enabled" .) }} @@ -22,4 +23,5 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} name: {{ .Values.serviceAccount.name }}-restarter + namespace: {{ .Release.Namespace }} {{- end -}}