From d0d59081499b2f3213b09bc64acd33b967f0a0f9 Mon Sep 17 00:00:00 2001 From: Thomas Petit Date: Wed, 12 Jul 2023 13:42:27 +0200 Subject: [PATCH 1/4] Allow perconapgclusters/finalizers in role Allow perconapgclusters/finalizers to ensure block deletion permissions are granted. This will otherwise cause a apply failure when the operator tries to instantiate a CR on OpenShift 4.10+ (tested) --- charts/pg-operator/templates/role.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/pg-operator/templates/role.yaml b/charts/pg-operator/templates/role.yaml index 38acd9f0..27993b43 100644 --- a/charts/pg-operator/templates/role.yaml +++ b/charts/pg-operator/templates/role.yaml @@ -116,6 +116,7 @@ rules: - pgv2.percona.com resources: - perconapgclusters + - perconapgclusters/finalizers verbs: - create - get From 1ade445008cd5c3c1609c8bcf04695ab964980ac Mon Sep 17 00:00:00 2001 From: Thomas Petit Date: Wed, 12 Jul 2023 13:59:01 +0200 Subject: [PATCH 2/4] Bump Chart.yaml --- charts/pg-operator/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/pg-operator/Chart.yaml b/charts/pg-operator/Chart.yaml index bc98434f..7e2055bb 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 v2 version of Percona Operator for PostgreSQL.' type: application -version: 2.2.0 +version: 2.2.1 appVersion: 2.2.0 home: https://docs.percona.com/percona-operator-for-postgresql/2.0/ maintainers: From 68a685f3eaddca5ab9e71d2953456f379425e260 Mon Sep 17 00:00:00 2001 From: Thomas Petit Date: Sat, 22 Jul 2023 21:08:39 +0200 Subject: [PATCH 3/4] Restrict role permissions for finalizers --- charts/pg-operator/templates/role.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/charts/pg-operator/templates/role.yaml b/charts/pg-operator/templates/role.yaml index 27993b43..21a4cacf 100644 --- a/charts/pg-operator/templates/role.yaml +++ b/charts/pg-operator/templates/role.yaml @@ -116,7 +116,6 @@ rules: - pgv2.percona.com resources: - perconapgclusters - - perconapgclusters/finalizers verbs: - create - get @@ -124,6 +123,12 @@ rules: - patch - update - watch +- apiGroups: + - pgv2.percona.com + resources: + - perconapgclusters/finalizers + verbs: + - update - apiGroups: - policy resources: From f8a58bc144a2cae06653dee1068437d7b3c91da0 Mon Sep 17 00:00:00 2001 From: Thomas Petit Date: Sat, 22 Jul 2023 21:08:56 +0200 Subject: [PATCH 4/4] Bump chart version --- charts/pg-operator/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/pg-operator/Chart.yaml b/charts/pg-operator/Chart.yaml index d9e4d8f3..bc59141d 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.2.1 +version: 2.2.2 appVersion: 2.2.0 home: https://docs.percona.com/percona-operator-for-postgresql/2.0/ maintainers: