From 51500189373bed42af94446236af853cf5bfea4a Mon Sep 17 00:00:00 2001 From: "n.fraison" Date: Thu, 23 Sep 2021 18:36:46 +0200 Subject: [PATCH] ceph: add missing rights rook-ceph-purge-osd account The purge osd job need to read and update persistentvolumeclaims While the job doesn't failed with osd and deployments well deleted The associated pvc is not deleted by the job as it failed to read it Signed-off-by: n.fraison --- cluster/charts/rook-ceph-cluster/templates/role.yaml | 2 +- cluster/charts/rook-ceph/templates/role.yaml | 2 +- cluster/examples/kubernetes/ceph/common-second-cluster.yaml | 2 +- cluster/examples/kubernetes/ceph/common.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cluster/charts/rook-ceph-cluster/templates/role.yaml b/cluster/charts/rook-ceph-cluster/templates/role.yaml index 36719cab5..af88cd8fb 100644 --- a/cluster/charts/rook-ceph-cluster/templates/role.yaml +++ b/cluster/charts/rook-ceph-cluster/templates/role.yaml @@ -82,7 +82,7 @@ rules: verbs: ["get", "list", "delete" ] - apiGroups: [""] resources: ["persistentvolumeclaims"] - verbs: ["delete"] + verbs: ["get", "update", "delete"] {{- if .Values.monitoring.enabled }} --- diff --git a/cluster/charts/rook-ceph/templates/role.yaml b/cluster/charts/rook-ceph/templates/role.yaml index 70f899c5d..c27c11cd5 100644 --- a/cluster/charts/rook-ceph/templates/role.yaml +++ b/cluster/charts/rook-ceph/templates/role.yaml @@ -188,5 +188,5 @@ rules: verbs: ["get", "list", "delete" ] - apiGroups: [""] resources: ["persistentvolumeclaims"] - verbs: ["delete"] + verbs: ["get", "update", "delete"] {{- end }} diff --git a/cluster/examples/kubernetes/ceph/common-second-cluster.yaml b/cluster/examples/kubernetes/ceph/common-second-cluster.yaml index cbe12e533..e88e42303 100644 --- a/cluster/examples/kubernetes/ceph/common-second-cluster.yaml +++ b/cluster/examples/kubernetes/ceph/common-second-cluster.yaml @@ -145,7 +145,7 @@ rules: verbs: ["get", "list", "delete"] - apiGroups: [""] resources: ["persistentvolumeclaims"] - verbs: ["delete"] + verbs: ["get", "update", "delete"] --- # Allow the osd purge job to run in this namespace kind: RoleBinding diff --git a/cluster/examples/kubernetes/ceph/common.yaml b/cluster/examples/kubernetes/ceph/common.yaml index 51ae1d858..2ad639857 100644 --- a/cluster/examples/kubernetes/ceph/common.yaml +++ b/cluster/examples/kubernetes/ceph/common.yaml @@ -1195,7 +1195,7 @@ rules: verbs: ["get", "list", "delete"] - apiGroups: [""] resources: ["persistentvolumeclaims"] - verbs: ["delete"] + verbs: ["get", "update", "delete"] --- # Allow the osd purge job to run in this namespace kind: RoleBinding