From 208e28c76308651834f19259a731e738dd5514e7 Mon Sep 17 00:00:00 2001 From: Ruslan Khizhnyak Date: Wed, 25 Dec 2024 02:54:21 +0300 Subject: [PATCH] Add namespace declaration to manifests --- charts/zabbix/templates/cronjob-hanodes-autoclean.yaml | 1 + charts/zabbix/templates/daemonset-zabbix-agent.yaml | 1 + charts/zabbix/templates/deployment-webdriver.yaml | 1 + .../zabbix/templates/deployment-zabbix-java-gateway.yaml | 1 + charts/zabbix/templates/deployment-zabbix-server.yaml | 1 + charts/zabbix/templates/deployment-zabbix-web.yaml | 1 + charts/zabbix/templates/deployment-zabbix-webservice.yaml | 1 + charts/zabbix/templates/ingress.yaml | 1 + charts/zabbix/templates/job-create-upgrade-db.yaml | 1 + charts/zabbix/templates/role-ha-helper.yaml | 1 + charts/zabbix/templates/rolebinding-ha-helper.yaml | 1 + charts/zabbix/templates/secret-db-access.yaml | 1 + charts/zabbix/templates/service.yaml | 8 ++++++++ charts/zabbix/templates/serviceaccount-ha-helper.yaml | 1 + charts/zabbix/templates/serviceaccount.yaml | 1 + charts/zabbix/templates/statefulset-postgresql.yaml | 1 + charts/zabbix/templates/statefulset-zabbix-proxy.yaml | 1 + charts/zabbix/templates/tests/test-server-connection.yaml | 1 + charts/zabbix/templates/tests/test-web-connection.yaml | 1 + 19 files changed, 26 insertions(+) diff --git a/charts/zabbix/templates/cronjob-hanodes-autoclean.yaml b/charts/zabbix/templates/cronjob-hanodes-autoclean.yaml index 285095e..b4a547b 100644 --- a/charts/zabbix/templates/cronjob-hanodes-autoclean.yaml +++ b/charts/zabbix/templates/cronjob-hanodes-autoclean.yaml @@ -3,6 +3,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: {{ template "zabbix.fullname" . }}-nodesclean + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} {{- if .Values.zabbixServer.haNodesAutoClean.cronjobLabels }} diff --git a/charts/zabbix/templates/daemonset-zabbix-agent.yaml b/charts/zabbix/templates/daemonset-zabbix-agent.yaml index 3dcb688..7c959cc 100644 --- a/charts/zabbix/templates/daemonset-zabbix-agent.yaml +++ b/charts/zabbix/templates/daemonset-zabbix-agent.yaml @@ -3,6 +3,7 @@ apiVersion: apps/v1 kind: DaemonSet metadata: name: {{ template "zabbix.fullname" . }}-zabbix-agent + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: agent diff --git a/charts/zabbix/templates/deployment-webdriver.yaml b/charts/zabbix/templates/deployment-webdriver.yaml index 497288d..91c5691 100644 --- a/charts/zabbix/templates/deployment-webdriver.yaml +++ b/charts/zabbix/templates/deployment-webdriver.yaml @@ -3,6 +3,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "zabbix.fullname" . }}-{{ .Values.zabbixBrowserMonitoring.webdriver.name }} + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: webdriver diff --git a/charts/zabbix/templates/deployment-zabbix-java-gateway.yaml b/charts/zabbix/templates/deployment-zabbix-java-gateway.yaml index 10d39ec..8fbe896 100644 --- a/charts/zabbix/templates/deployment-zabbix-java-gateway.yaml +++ b/charts/zabbix/templates/deployment-zabbix-java-gateway.yaml @@ -3,6 +3,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "zabbix.fullname" . }}-{{ .Values.zabbixJavaGateway.ZBX_JAVAGATEWAY }} + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: java-gateway diff --git a/charts/zabbix/templates/deployment-zabbix-server.yaml b/charts/zabbix/templates/deployment-zabbix-server.yaml index bee2811..b5a5c74 100644 --- a/charts/zabbix/templates/deployment-zabbix-server.yaml +++ b/charts/zabbix/templates/deployment-zabbix-server.yaml @@ -4,6 +4,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "zabbix.fullname" . }}-zabbix-server + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: server diff --git a/charts/zabbix/templates/deployment-zabbix-web.yaml b/charts/zabbix/templates/deployment-zabbix-web.yaml index 5fba1e8..972a03d 100644 --- a/charts/zabbix/templates/deployment-zabbix-web.yaml +++ b/charts/zabbix/templates/deployment-zabbix-web.yaml @@ -3,6 +3,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "zabbix.fullname" . }}-zabbix-web + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: web diff --git a/charts/zabbix/templates/deployment-zabbix-webservice.yaml b/charts/zabbix/templates/deployment-zabbix-webservice.yaml index 19d6921..6419f9e 100644 --- a/charts/zabbix/templates/deployment-zabbix-webservice.yaml +++ b/charts/zabbix/templates/deployment-zabbix-webservice.yaml @@ -3,6 +3,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "zabbix.fullname" . }}-zabbix-webservice + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: webservice diff --git a/charts/zabbix/templates/ingress.yaml b/charts/zabbix/templates/ingress.yaml index a643d5b..5063031 100644 --- a/charts/zabbix/templates/ingress.yaml +++ b/charts/zabbix/templates/ingress.yaml @@ -10,6 +10,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }} + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: web diff --git a/charts/zabbix/templates/job-create-upgrade-db.yaml b/charts/zabbix/templates/job-create-upgrade-db.yaml index 21a1a8b..ea6ab47 100644 --- a/charts/zabbix/templates/job-create-upgrade-db.yaml +++ b/charts/zabbix/templates/job-create-upgrade-db.yaml @@ -6,6 +6,7 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ template "zabbix.fullname" . }}-create-upgrade-db + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: create-upgrade-db diff --git a/charts/zabbix/templates/role-ha-helper.yaml b/charts/zabbix/templates/role-ha-helper.yaml index 7309e5a..7e8112d 100644 --- a/charts/zabbix/templates/role-ha-helper.yaml +++ b/charts/zabbix/templates/role-ha-helper.yaml @@ -4,6 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: {{ template "zabbix.fullname" . }}-ha-helper + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} {{- if .Values.zabbixServer.zabbixServerHA.role.annotations }} diff --git a/charts/zabbix/templates/rolebinding-ha-helper.yaml b/charts/zabbix/templates/rolebinding-ha-helper.yaml index 04ad600..6c9aa24 100644 --- a/charts/zabbix/templates/rolebinding-ha-helper.yaml +++ b/charts/zabbix/templates/rolebinding-ha-helper.yaml @@ -4,6 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: {{ template "zabbix.fullname" . }}-ha-helper + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} {{- if .Values.zabbixServer.zabbixServerHA.roleBinding.annotations }} diff --git a/charts/zabbix/templates/secret-db-access.yaml b/charts/zabbix/templates/secret-db-access.yaml index 6995433..65aa082 100644 --- a/charts/zabbix/templates/secret-db-access.yaml +++ b/charts/zabbix/templates/secret-db-access.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ template "zabbix.fullname" . }}-db-access + namespace: {{ .Release.Namespace }} annotations: "helm.sh/resource-policy": keep labels: diff --git a/charts/zabbix/templates/service.yaml b/charts/zabbix/templates/service.yaml index a7077bc..4e0ecc0 100644 --- a/charts/zabbix/templates/service.yaml +++ b/charts/zabbix/templates/service.yaml @@ -4,6 +4,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "zabbix.fullname" . }}-zabbix-server + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: server @@ -63,6 +64,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "zabbix.fullname" . }}-zabbix-agent + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: agent @@ -115,6 +117,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "zabbix.fullname" . }}-zabbix-web + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: web @@ -167,6 +170,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "zabbix.fullname" . }}-zabbix-webservice + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: webservice @@ -198,6 +202,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "zabbix.fullname" . }}-zabbix-proxy + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: proxy @@ -250,6 +255,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "zabbix.fullname" . }}-postgresql + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: postgresql @@ -281,6 +287,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "zabbix.fullname" . }}-java-gateway + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: java-gateway @@ -333,6 +340,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "zabbix.fullname" . }}-{{ .Values.zabbixBrowserMonitoring.webdriver.name }} + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: webdriver diff --git a/charts/zabbix/templates/serviceaccount-ha-helper.yaml b/charts/zabbix/templates/serviceaccount-ha-helper.yaml index 3a7959b..f404701 100644 --- a/charts/zabbix/templates/serviceaccount-ha-helper.yaml +++ b/charts/zabbix/templates/serviceaccount-ha-helper.yaml @@ -4,6 +4,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ template "zabbix.fullname" . }}-ha-helper + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} {{- if .Values.zabbixServer.zabbixServerHA.serviceAccount.annotations }} diff --git a/charts/zabbix/templates/serviceaccount.yaml b/charts/zabbix/templates/serviceaccount.yaml index 8b9dd76..326df20 100644 --- a/charts/zabbix/templates/serviceaccount.yaml +++ b/charts/zabbix/templates/serviceaccount.yaml @@ -8,6 +8,7 @@ imagePullSecrets: automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} metadata: name: {{ template "zabbix.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/charts/zabbix/templates/statefulset-postgresql.yaml b/charts/zabbix/templates/statefulset-postgresql.yaml index 654ed34..89d3c6b 100644 --- a/charts/zabbix/templates/statefulset-postgresql.yaml +++ b/charts/zabbix/templates/statefulset-postgresql.yaml @@ -4,6 +4,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ template "zabbix.fullname" . }}-postgresql + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: postgresql diff --git a/charts/zabbix/templates/statefulset-zabbix-proxy.yaml b/charts/zabbix/templates/statefulset-zabbix-proxy.yaml index 4b5cb76..8874e5b 100644 --- a/charts/zabbix/templates/statefulset-zabbix-proxy.yaml +++ b/charts/zabbix/templates/statefulset-zabbix-proxy.yaml @@ -4,6 +4,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ template "zabbix.fullname" . }}-zabbix-proxy + namespace: {{ .Release.Namespace }} labels: {{- include "zabbix.labels" . | nindent 4 }} app.kubernetes.io/component: proxy diff --git a/charts/zabbix/templates/tests/test-server-connection.yaml b/charts/zabbix/templates/tests/test-server-connection.yaml index 1489de6..10003a5 100644 --- a/charts/zabbix/templates/tests/test-server-connection.yaml +++ b/charts/zabbix/templates/tests/test-server-connection.yaml @@ -3,6 +3,7 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ template "zabbix.fullname" . }}-test-server-connection + namespace: {{ .Release.Namespace }} labels: app: {{ template "zabbix.fullname" . }}-test-server-connection app.kubernetes.io/name: test-server-connection diff --git a/charts/zabbix/templates/tests/test-web-connection.yaml b/charts/zabbix/templates/tests/test-web-connection.yaml index aa9891d..45fa2bf 100644 --- a/charts/zabbix/templates/tests/test-web-connection.yaml +++ b/charts/zabbix/templates/tests/test-web-connection.yaml @@ -3,6 +3,7 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ template "zabbix.fullname" . }}-test-web-connection + namespace: {{ .Release.Namespace }} labels: app: {{ template "zabbix.fullname" . }}-test-web-connection app.kubernetes.io/name: test-web-connection