diff --git a/build/rbac/get-helm-rbac.sh b/build/rbac/get-helm-rbac.sh index 98e6b62be..b1b0fec1f 100755 --- a/build/rbac/get-helm-rbac.sh +++ b/build/rbac/get-helm-rbac.sh @@ -13,6 +13,7 @@ pushd "$SCRIPT_DIR" &>/dev/stderr options=( --namespace rook-ceph --set crds.enabled=false + --set csi.csiAddons.enabled=true ) if [[ -z "${DO_NOT_INCLUDE_POD_SECURITY_POLICY_RESOURCES}" ]]; then options+=(--set pspEnable=true) diff --git a/deploy/charts/rook-ceph/templates/role.yaml b/deploy/charts/rook-ceph/templates/role.yaml index 7182e71b1..88872ed76 100644 --- a/deploy/charts/rook-ceph/templates/role.yaml +++ b/deploy/charts/rook-ceph/templates/role.yaml @@ -61,7 +61,7 @@ rules: resources: ["leases"] verbs: ["get", "watch", "list", "delete", "update", "create"] --- -{{- if .Values.csi.csiAddons }} +{{- if and .Values.csi.csiAddons .Values.csi.csiAddons.enabled }} kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: @@ -88,7 +88,7 @@ rules: - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["get", "watch", "list", "delete", "update", "create"] - {{- if .Values.csi.csiAddons }} + {{- if and .Values.csi.csiAddons .Values.csi.csiAddons.enabled }} - apiGroups: ["csiaddons.openshift.io"] resources: ["csiaddonsnodes"] verbs: ["create"] diff --git a/deploy/charts/rook-ceph/templates/rolebinding.yaml b/deploy/charts/rook-ceph/templates/rolebinding.yaml index 5e5c4e6ce..619b00fd0 100644 --- a/deploy/charts/rook-ceph/templates/rolebinding.yaml +++ b/deploy/charts/rook-ceph/templates/rolebinding.yaml @@ -32,7 +32,7 @@ roleRef: name: cephfs-external-provisioner-cfg apiGroup: rbac.authorization.k8s.io --- -{{- if .Values.csi.csiAddons }} +{{- if and .Values.csi.csiAddons .Values.csi.csiAddons.enabled }} kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: