diff --git a/deploy/charts/library/templates/_cluster-role.tpl b/deploy/charts/library/templates/_cluster-role.tpl index fd79b7ce908e..3d13e12a142b 100644 --- a/deploy/charts/library/templates/_cluster-role.tpl +++ b/deploy/charts/library/templates/_cluster-role.tpl @@ -148,4 +148,14 @@ rules: - apiGroups: [""] resources: ["persistentvolumeclaims"] verbs: ["get", "update", "delete", "list"] +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: rook-ceph-default + namespace: {{ .Release.Namespace }} # namespace:cluster +rules: + - apiGroups: [""] + resources: [""] + verbs: [""] {{- end }} diff --git a/deploy/charts/library/templates/_cluster-rolebinding.tpl b/deploy/charts/library/templates/_cluster-rolebinding.tpl index dc5e05f29daf..01281929bd6a 100644 --- a/deploy/charts/library/templates/_cluster-rolebinding.tpl +++ b/deploy/charts/library/templates/_cluster-rolebinding.tpl @@ -105,4 +105,18 @@ subjects: - kind: ServiceAccount name: rook-ceph-purge-osd namespace: {{ .Release.Namespace }} # namespace:cluster +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: rook-ceph-default + namespace: {{ .Release.Namespace }} # namespace:cluster +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: rook-ceph-default +subjects: + - kind: ServiceAccount + name: rook-ceph-default + namespace: {{ .Release.Namespace }} # namespace:cluster {{- end }} diff --git a/deploy/examples/common.yaml b/deploy/examples/common.yaml index ed523e8cb051..a9a1067b00e2 100644 --- a/deploy/examples/common.yaml +++ b/deploy/examples/common.yaml @@ -790,6 +790,16 @@ rules: - update - delete --- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: rook-ceph-default + namespace: rook-ceph # namespace:cluster +rules: + - apiGroups: [""] + resources: [""] + verbs: [""] +--- # Aspects of ceph-mgr that operate within the cluster's namespace kind: Role apiVersion: rbac.authorization.k8s.io/v1 @@ -1052,6 +1062,20 @@ subjects: name: rook-ceph-cmd-reporter namespace: rook-ceph # namespace:cluster --- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: rook-ceph-default + namespace: rook-ceph # namespace:cluster +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: rook-ceph-default +subjects: + - kind: ServiceAccount + name: rook-ceph-default + namespace: rook-ceph # namespace:cluster +--- # Allow the ceph mgr to access resources scoped to the CephCluster namespace necessary for mgr modules kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1