Skip to content

Commit

Permalink
[skip ci] Tidy up NFS Client handling
Browse files Browse the repository at this point in the history
  • Loading branch information
durera committed Sep 19, 2024
1 parent ba4e530 commit b38b245
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function install_config_storage_classes() {
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 -e "${COLOR_GREEN}Storage provider auto-detected: NFS Client${TEXT_RESET}"
echo "${TEXT_DIM} - Storage class (ReadWriteOnce): nfs-client"
echo "${TEXT_DIM} - Storage class (ReadWriteMany): nfs-client"
STORAGE_CLASS_PROVIDER=ocs
Expand Down
12 changes: 6 additions & 6 deletions python/src/mas/cli/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def configMongoDb(self) -> None:
def configSpecialCharacters(self):
self.printH1("Configure special characters for userID and username")
self.yesOrNo("Do you want to allow special characters for user IDs and usernames?", "mas_special_characters")

def configCP4D(self):
if self.getParam("mas_catalog_version") in ["v9-240625-amd64", "v9-240730-amd64", "v9-240827-amd64"]:
logger.debug(f"Using automatic CP4D product version: {self.getParam('cpd_product_version')}")
Expand Down Expand Up @@ -484,23 +484,23 @@ 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
# 3. NFS Client
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("<MediumSeaGreen>Storage provider auto-detected: NFS Client</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.storageClassProvider = "nfs"
self.params["storage_class_rwo"] = "nfs-client"
self.params["storage_class_rwx"] = "nfs-client"
# 3. Azure
# 4. Azure
elif getStorageClass(self.dynamicClient, "managed-premium") is not None:
print_formatted_text(HTML("<MediumSeaGreen>Storage provider auto-detected: Azure Managed</MediumSeaGreen>"))
print_formatted_text(HTML("<LightSlateGrey> - Storage class (ReadWriteOnce): managed-premium</LightSlateGrey>"))
print_formatted_text(HTML("<LightSlateGrey> - Storage class (ReadWriteMany): azurefiles-premium</LightSlateGrey>"))
self.storageClassProvider = "azure"
self.params["storage_class_rwo"] = "managed-premium"
self.params["storage_class_rwx"] = "azurefiles-premium"
# 4. AWS
# 5. AWS
elif getStorageClass(self.dynamicClient, "gp2") is not None:
print_formatted_text(HTML("<MediumSeaGreen>Storage provider auto-detected: AWS gp2</MediumSeaGreen>"))
print_formatted_text(HTML("<LightSlateGrey> - Storage class (ReadWriteOnce): gp2</LightSlateGrey>"))
Expand Down

0 comments on commit b38b245

Please sign in to comment.