Skip to content

Commit

Permalink
Merge pull request #2530 from leelavg/disable-csi-driver
Browse files Browse the repository at this point in the history
use ROOK_CSI_DISABLE_DRIVER for disabling CSI in provider mode
  • Loading branch information
openshift-merge-bot[bot] authored Mar 26, 2024
2 parents 68d51ca + 694bf3d commit 493179c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,7 @@ func (r *OCSInitializationReconciler) ensureOcsOperatorConfigExists(initialData
allowConsumers := slices.ContainsFunc(r.clusters.GetInternalStorageClusters(), func(sc ocsv1.StorageCluster) bool {
return sc.Spec.AllowRemoteStorageConsumers
})
if allowConsumers {
ocsOperatorConfigData[util.CsiEnableCephFSKey] = "false"
ocsOperatorConfigData[util.CsiEnableRBDKey] = "false"
} else {
ocsOperatorConfigData[util.CsiEnableCephFSKey] = "true"
ocsOperatorConfigData[util.CsiEnableRBDKey] = "true"
}
ocsOperatorConfigData[util.DisableCSIDriverKey] = strconv.FormatBool(allowConsumers)

if !reflect.DeepEqual(ocsOperatorConfig.Data, ocsOperatorConfigData) {
r.Log.Info("Updating ocs-operator-config configmap")
Expand Down
3 changes: 1 addition & 2 deletions controllers/util/k8sutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ const (
TopologyDomainLabelsKey = "CSI_TOPOLOGY_DOMAIN_LABELS"
EnableNFSKey = "ROOK_CSI_ENABLE_NFS"
CsiRemoveHolderPodsKey = "CSI_REMOVE_HOLDER_PODS"
CsiEnableCephFSKey = "ROOK_CSI_ENABLE_CEPHFS"
CsiEnableRBDKey = "ROOK_CSI_ENABLE_RBD"
DisableCSIDriverKey = "ROOK_CSI_DISABLE_DRIVER"

// This is the name for the OwnerUID FieldIndex
OwnerUIDIndexName = "ownerUID"
Expand Down
2 changes: 1 addition & 1 deletion hack/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ UX_BACKEND_OAUTH_FULL_IMAGE_NAME="${UX_BACKEND_OAUTH_FULL_IMAGE_NAME:-${DEFAULT_
CSI_ADDONS_CATALOG_FULL_IMAGE_NAME="quay.io/ocs-dev/csi-addons-catalog:v0.7.0"
OCS_CLIENT_BUNDLE_FULL_IMAGE_NAME="quay.io/ocs-dev/ocs-client-operator-bundle:v4.15.0"
NOOBAA_BUNDLE_FULL_IMAGE_NAME="quay.io/noobaa/noobaa-operator-bundle:master-20231217"
ROOK_BUNDLE_FULL_IMAGE_NAME="quay.io/ocs-dev/rook-ceph-operator-bundle:master-5afe4a0"
ROOK_BUNDLE_FULL_IMAGE_NAME="quay.io/ocs-dev/rook-ceph-operator-bundle:master-50334e894"

OCS_OPERATOR_INSTALL="${OCS_OPERATOR_INSTALL:-false}"
OCS_CLUSTER_UNINSTALL="${OCS_CLUSTER_UNINSTALL:-false}"
Expand Down
3 changes: 1 addition & 2 deletions hack/install-rook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ data:
CSI_TOPOLOGY_DOMAIN_LABELS: "test"
ROOK_CSI_ENABLE_NFS: "false"
CSI_REMOVE_HOLDER_PODS: "true"
ROOK_CSI_ENABLE_CEPHFS: "true"
ROOK_CSI_ENABLE_RBD: "true"
ROOK_CSI_DISABLE_DRIVER: "false"
EOF

"$OPERATOR_SDK" run bundle "$ROOK_BUNDLE_FULL_IMAGE_NAME" --timeout=10m --security-context-config restricted -n "$INSTALL_NAMESPACE"
Expand Down

0 comments on commit 493179c

Please sign in to comment.