diff --git a/charts/pg-db/Chart.yaml b/charts/pg-db/Chart.yaml index 5910e710..88f2a776 100644 --- a/charts/pg-db/Chart.yaml +++ b/charts/pg-db/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: pg-db description: 'A Helm chart to deploy the PostgreSQL database with the Percona Operator for PostgreSQL' type: application -version: 2.3.17 +version: 2.3.18 appVersion: 2.3.1 home: https://docs.percona.com/percona-operator-for-postgresql/2.0/ maintainers: diff --git a/charts/pg-db/templates/cluster.yaml b/charts/pg-db/templates/cluster.yaml index d9c70a4c..2c239a4f 100644 --- a/charts/pg-db/templates/cluster.yaml +++ b/charts/pg-db/templates/cluster.yaml @@ -14,6 +14,7 @@ metadata: finalizers: {{ .Values.finalizers | toYaml | indent 4 }} name: {{ include "pg-database.fullname" . }} + namespace: {{ .Release.Namespace }} spec: crVersion: {{ .Values.crVersion }} image: {{ include "pg-database.postgres-image" . }} diff --git a/charts/pg-operator/Chart.yaml b/charts/pg-operator/Chart.yaml index e43d56b1..ea01a36e 100644 --- a/charts/pg-operator/Chart.yaml +++ b/charts/pg-operator/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: pg-operator description: 'A Helm chart to deploy the Percona Operator for PostgreSQL' type: application -version: 2.3.4 +version: 2.3.5 appVersion: 2.3.1 home: https://docs.percona.com/percona-operator-for-postgresql/2.0/ maintainers: diff --git a/charts/pg-operator/templates/deployment.yaml b/charts/pg-operator/templates/deployment.yaml index d658e4e0..2f8ef214 100644 --- a/charts/pg-operator/templates/deployment.yaml +++ b/charts/pg-operator/templates/deployment.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "postgres-operator.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{ include "postgres-operator.labels" . | indent 4 }} pgv2.percona.com/control-plane: postgres-operator diff --git a/charts/pg-operator/templates/role-binding.yaml b/charts/pg-operator/templates/role-binding.yaml index 6f5e55c1..034e393a 100644 --- a/charts/pg-operator/templates/role-binding.yaml +++ b/charts/pg-operator/templates/role-binding.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "postgres-operator.fullname" . }} + namespace: {{ .Release.Namespace }} --- {{- if or .Values.watchNamespace .Values.watchAllNamespaces }} kind: ClusterRoleBinding @@ -11,9 +12,9 @@ kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: {{ include "postgres-operator.fullname" . }} - {{- if .Values.watchNamespace }} - namespace: {{ .Values.watchNamespace }} - {{- end }} +{{- if not (or .Values.watchNamespace .Values.watchAllNamespaces) }} + namespace: {{ .Release.Namespace }} +{{- end }} labels: {{ include "postgres-operator.labels" . | indent 4 }} subjects: @@ -29,4 +30,4 @@ roleRef: kind: Role {{- end }} name: {{ include "postgres-operator.fullname" . }} - apiGroup: rbac.authorization.k8s.io \ No newline at end of file + apiGroup: rbac.authorization.k8s.io diff --git a/charts/pg-operator/templates/role.yaml b/charts/pg-operator/templates/role.yaml index 68772664..0a268a51 100644 --- a/charts/pg-operator/templates/role.yaml +++ b/charts/pg-operator/templates/role.yaml @@ -6,6 +6,9 @@ kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: name: {{ include "postgres-operator.fullname" . }} +{{- if not (or .Values.watchNamespace .Values.watchAllNamespaces) }} + namespace: {{ .Release.Namespace }} +{{- end }} labels: {{ include "postgres-operator.labels" . | indent 4 }} rules: