diff --git a/packages/odf/components/create-storage-system/create-storage-system-steps/backing-storage-step/backing-storage-step.tsx b/packages/odf/components/create-storage-system/create-storage-system-steps/backing-storage-step/backing-storage-step.tsx index 5cf11d8bb..08d8d9c32 100644 --- a/packages/odf/components/create-storage-system/create-storage-system-steps/backing-storage-step/backing-storage-step.tsx +++ b/packages/odf/components/create-storage-system/create-storage-system-steps/backing-storage-step/backing-storage-step.tsx @@ -3,6 +3,7 @@ import { STORAGE_CLUSTER_SYSTEM_KIND, NO_PROVISIONER, } from '@odf/core/constants'; +import { PROVIDER_MODE } from '@odf/core/features'; import { useSafeK8sGet } from '@odf/core/hooks'; import { useODFNamespaceSelector } from '@odf/core/redux'; import { scResource } from '@odf/core/resources'; @@ -25,6 +26,7 @@ import { } from '@odf/shared/types'; import { useCustomTranslation } from '@odf/shared/useCustomTranslationHook'; import { isDefaultClass, getODFCsv, getGVKLabel } from '@odf/shared/utils'; +import { useFlag } from '@openshift-console/dynamic-plugin-sdk'; import * as _ from 'lodash-es'; import { Form, @@ -213,6 +215,7 @@ export const BackingStorage: React.FC = ({ const isFullDeployment = deployment === DeploymentType.FULL; const isProviderMode = deployment === DeploymentType.PROVIDER_MODE; + const isProviderModePresent = useFlag(PROVIDER_MODE) && hasInternal; const isNonRHCSExternalType = type === BackingStorageType.EXTERNAL && externalStorage !== StorageClusterModel.kind; @@ -269,7 +272,7 @@ export const BackingStorage: React.FC = ({ * Allow pre selecting the "external connection" option instead of the "existing" option * if an OCS Storage System is already created. */ - if (hasOCS && allowedExternalStorage.length) { + if (hasOCS && allowedExternalStorage.length && !isProviderModePresent) { dispatch({ type: 'backingStorage/setType', payload: BackingStorageType.EXTERNAL, @@ -384,7 +387,11 @@ export const BackingStorage: React.FC = ({ value={BackingStorageType.EXTERNAL} isChecked={type === BackingStorageType.EXTERNAL} onChange={(event, _unused) => onRadioSelect(_unused, event)} - isDisabled={allowedExternalStorage.length === 0 || isProviderMode} + isDisabled={ + allowedExternalStorage.length === 0 || + isProviderMode || + isProviderModePresent + } body={ showExternalStorageSelection && (