diff --git a/dell-csi-helm-installer/verify-csi-unity.sh b/dell-csi-helm-installer/verify-csi-unity.sh index 2a52874..f250816 100644 --- a/dell-csi-helm-installer/verify-csi-unity.sh +++ b/dell-csi-helm-installer/verify-csi-unity.sh @@ -15,14 +15,18 @@ function verify-csi-unity() { verify_namespace "${NS}" verify_required_secrets "${RELEASE}-creds" verify_optional_secrets "${RELEASE}-certs" - verify_alpha_snap_resources + snapshot_value=$(is_snapshot_enabled) + if [ "$snapshot_value" == "true" ]; then + verify_alpha_snap_resources + fi verify_unity_protocol_installation - verify_snap_requirements + if [ "$snapshot_value" == "true" ]; then + verify_snap_requirements + fi verify_helm_3 verify_helm_values_version "${DRIVER_VERSION}" } - function verify_unity_protocol_installation() { if [ ${NODE_VERIFY} -eq 0 ]; then return diff --git a/dell-csi-helm-installer/verify.sh b/dell-csi-helm-installer/verify.sh index 1249aea..682628b 100755 --- a/dell-csi-helm-installer/verify.sh +++ b/dell-csi-helm-installer/verify.sh @@ -41,6 +41,10 @@ function source-verify-driver() { fi } +function is_snapshot_enabled() { +snapshot_enabled=$(sed -n '/snapshot:/,/resizer:/p' "$VALUES" | grep -v '^\s*#' | grep "enabled:" | awk '{print $2}') +} + # # verify-driver will call the proper method to verify a specific driver