From 7de388ce92ef186e760304cafb024bb4d19f3c33 Mon Sep 17 00:00:00 2001 From: Travis Nielsen Date: Thu, 12 Mar 2020 16:44:48 -0600 Subject: [PATCH] ceph: grant access to the mgr to delete pods The Ceph mgr modules need access to restart the daemon pods when the configuration changes for the daemons. Signed-off-by: Travis Nielsen --- cluster/charts/rook-ceph/templates/role.yaml | 1 + cluster/examples/kubernetes/ceph/common.yaml | 1 + .../ceph/upgrade-from-v1.2-apply.yaml | 35 +++++++++++++++++++ tests/framework/installer/ceph_manifests.go | 1 + 4 files changed, 38 insertions(+) diff --git a/cluster/charts/rook-ceph/templates/role.yaml b/cluster/charts/rook-ceph/templates/role.yaml index a649c761d..0f70ef665 100644 --- a/cluster/charts/rook-ceph/templates/role.yaml +++ b/cluster/charts/rook-ceph/templates/role.yaml @@ -63,6 +63,7 @@ rules: - get - list - watch + - delete - apiGroups: - batch resources: diff --git a/cluster/examples/kubernetes/ceph/common.yaml b/cluster/examples/kubernetes/ceph/common.yaml index e3ac2ea87..50cb28195 100644 --- a/cluster/examples/kubernetes/ceph/common.yaml +++ b/cluster/examples/kubernetes/ceph/common.yaml @@ -1026,6 +1026,7 @@ rules: - get - list - watch + - delete - apiGroups: - batch resources: diff --git a/cluster/examples/kubernetes/ceph/upgrade-from-v1.2-apply.yaml b/cluster/examples/kubernetes/ceph/upgrade-from-v1.2-apply.yaml index 71cb35b64..96ae2569b 100644 --- a/cluster/examples/kubernetes/ceph/upgrade-from-v1.2-apply.yaml +++ b/cluster/examples/kubernetes/ceph/upgrade-from-v1.2-apply.yaml @@ -76,3 +76,38 @@ rules: - apiGroups: [""] resources: ["persistentvolumeclaims/status"] verbs: ["update", "patch"] +--- +# Aspects of ceph-mgr that operate within the cluster's namespace +kind: Role +apiVersion: rbac.authorization.k8s.io/v1beta1 +metadata: + name: rook-ceph-mgr + namespace: rook-ceph +rules: +- apiGroups: + - "" + resources: + - pods + - services + verbs: + - get + - list + - watch + - delete +- apiGroups: + - batch + resources: + - jobs + verbs: + - get + - list + - watch + - create + - update + - delete +- apiGroups: + - ceph.rook.io + resources: + - "*" + verbs: + - "*" diff --git a/tests/framework/installer/ceph_manifests.go b/tests/framework/installer/ceph_manifests.go index 7dba7382a..2dce03a86 100644 --- a/tests/framework/installer/ceph_manifests.go +++ b/tests/framework/installer/ceph_manifests.go @@ -1559,6 +1559,7 @@ rules: - get - list - watch + - delete - apiGroups: - batch resources: