Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch] need to check for nfs-client now #1252

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ function install_config_storage_classes() {
fi
fi

if [[ "$STORAGE_CLASS_RWX" == "" ]]; then
oc get storageclass nfs-client &>> $LOGFILE
if [[ $? == "0" ]]; then
echo -e "${COLOR_GREEN}Storage provider auto-detected: OpenShift Container Storage${TEXT_RESET}"
echo "${TEXT_DIM} - Storage class (ReadWriteOnce): nfs-client"
echo "${TEXT_DIM} - Storage class (ReadWriteMany): nfs-client"
STORAGE_CLASS_PROVIDER=ocs
STORAGE_CLASS_RWO=nfs-client
STORAGE_CLASS_RWX=nfs-client
fi
fi

# 3. Azure
if [[ "$STORAGE_CLASS_RWX" == "" ]]; then
oc get storageclass managed-premium &>> $LOGFILE
Expand Down
8 changes: 8 additions & 0 deletions python/src/mas/cli/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,14 @@ def configStorageClasses(self):
self.storageClassProvider = "ocs"
self.params["storage_class_rwo"] = "ocs-storagecluster-ceph-rbd"
self.params["storage_class_rwx"] = "ocs-storagecluster-cephfs"
# OCS quick burn uses nfs-client now
elif getStorageClass(self.dynamicClient, "nfs-client") is not None:
print_formatted_text(HTML("<MediumSeaGreen>Storage provider auto-detected: OpenShift Container Storage</MediumSeaGreen>"))
print_formatted_text(HTML("<LightSlateGrey> - Storage class (ReadWriteOnce): nfs-client</LightSlateGrey>"))
print_formatted_text(HTML("<LightSlateGrey> - Storage class (ReadWriteMany): nfs-client</LightSlateGrey>"))
self.storageClassProvider = "ocs"
self.params["storage_class_rwo"] = "nfs-client"
self.params["storage_class_rwx"] = "nfs-client"
# 3. Azure
elif getStorageClass(self.dynamicClient, "managed-premium") is not None:
print_formatted_text(HTML("<MediumSeaGreen>Storage provider auto-detected: Azure Managed</MediumSeaGreen>"))
Expand Down