Skip to content

Commit

Permalink
[patch] need to check for nfs-client now (#1252)
Browse files Browse the repository at this point in the history
  • Loading branch information
twhart authored Sep 18, 2024
1 parent b685fee commit 1bd92c2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions image/cli/mascli/functions/internal/install_config_storage_classes
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

0 comments on commit 1bd92c2

Please sign in to comment.