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

(feat): Add create local volume set #9600

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -176,6 +176,45 @@
"Zone": "Zone",
"Selected nodes table": "Selected nodes table",
"Connection details": "Connection details",
"LocalVolumeSet Name": "LocalVolumeSet Name",
"StorageClass Name": "StorageClass Name",
"Filter Disks By": "Filter Disks By",
"Disks on all nodes": "Disks on all nodes",
"{{nodes, number}} node": "{{nodes, number}} node",
"{{nodes, number}} node_plural": "{{nodes, number}} nodes",
"Disks on selected nodes": "Disks on selected nodes",
"Uses the available disks that match the selected filters only on selected nodes.": "Uses the available disks that match the selected filters only on selected nodes.",
"Disk Type": "Disk Type",
"Volume Mode": "Volume Mode",
"Disk Size": "Disk Size",
"Min": "Min",
"Max": "Max",
"Maximum Disks Limit": "Maximum Disks Limit",
"Disks limit will set the maximum number of PVs to create on a node. If the field is empty we will create PVs for all available disks on the matching nodes.": "Disks limit will set the maximum number of PVs to create on a node. If the field is empty we will create PVs for all available disks on the matching nodes.",
"All": "All",
"Uses the available disks that match the selected filters on all nodes selected in the previous step.": "Uses the available disks that match the selected filters on all nodes selected in the previous step.",
"A LocalVolumeSet allows you to filter a set of disks, group them and create a dedicated StorageClass to consume storage from them.": "A LocalVolumeSet allows you to filter a set of disks, group them and create a dedicated StorageClass to consume storage from them.",
"Local Storage Operator not installed": "Local Storage Operator not installed",
"Before we can create a StorageCluster, the Local Storage operator needs to be installed. When installation is finished come back to OpenShift Container Storage to create a StorageCluster.<1><0>Install</0></1>": "Before we can create a StorageCluster, the Local Storage operator needs to be installed. When installation is finished come back to OpenShift Container Storage to create a StorageCluster.<1><0>Install</0></1>",
"Minimum Node Requirement": "Minimum Node Requirement",
"A minimum of 3 nodes are required for the initial deployment. Only {{nodes}} node match to the selected filters. Please adjust the filters to include more nodes.": "A minimum of 3 nodes are required for the initial deployment. Only {{nodes}} node match to the selected filters. Please adjust the filters to include more nodes.",
"After the LocalVolumeSet and StorageClass are created you won't be able to go back to this step.": "After the LocalVolumeSet and StorageClass are created you won't be able to go back to this step.",
"Note:": "Note:",
"Create StorageClass": "Create StorageClass",
"Yes": "Yes",
"Are you sure you want to continue?": "Are you sure you want to continue?",
"Node": "Node",
"Model": "Model",
"Capacity": "Capacity",
"Selected Disks": "Selected Disks",
"Disk List": "Disk List",
"Selected Capacity": "Selected Capacity",
"{{nodes, number}} Node": "{{nodes, number}} Node",
"{{nodes, number}} Node_plural": "{{nodes, number}} Nodes",
"{{disks, number}} Disk": "{{disks, number}} Disk",
"{{disks, number}} Disk_plural": "{{disks, number}} Disks",
"Selected versus Available Capacity": "Selected versus Available Capacity",
"Out of {{capacity}}": "Out of {{capacity}}",
"StorageClass name": "StorageClass name",
"Backing storage": "Backing storage",
"StorageClass:": "StorageClass:",
Expand All @@ -192,6 +231,7 @@
"An error has occurred": "An error has occurred",
"Create StorageSystem": "Create StorageSystem",
"StorageSystem is an entity of OpenShift Data Foundation. It represents all of the required storage and compute resources.": "StorageSystem is an entity of OpenShift Data Foundation. It represents all of the required storage and compute resources.",
"Not found": "Not found",
"Details": "Details",
"Replicas": "Replicas",
"Inventory": "Inventory",
Expand Down Expand Up @@ -249,7 +289,6 @@
"Projects": "Projects",
"BucketClasses": "BucketClasses",
"Service type": "Service type",
"All": "All",
"Cluster-wide": "Cluster-wide",
"Any NON Object bucket claims that were created via an S3 client or via the NooBaa UI system.": "Any NON Object bucket claims that were created via an S3 client or via the NooBaa UI system.",
"Capacity breakdown": "Capacity breakdown",
Expand Down Expand Up @@ -333,8 +372,6 @@
"Recovery": "Recovery",
"Disk State": "Disk State",
"OpenShift Data Foundation status": "OpenShift Data Foundation status",
"Model": "Model",
"Capacity": "Capacity",
"Filesystem": "Filesystem",
"Disks List": "Disks List",
"Start Disk Replacement": "Start Disk Replacement",
Expand Down Expand Up @@ -459,25 +496,7 @@
"Object Bucket Details": "Object Bucket Details",
"Object Bucket Claim": "Object Bucket Claim",
"OBTableHeader": "OBTableHeader",
"Uses the available disks that match the selected filters on all nodes selected in the previous step.": "Uses the available disks that match the selected filters on all nodes selected in the previous step.",
"A Local Volume Set allows you to filter a set of disks, group them and create a dedicated StorageClass to consume storage from them.": "A Local Volume Set allows you to filter a set of disks, group them and create a dedicated StorageClass to consume storage from them.",
"Minimum Node Requirement": "Minimum Node Requirement",
"OpenShift Container Storage's StorageCluster requires a minimum of 3 nodes for the initial deployment. Only {{nodes}} node match to the selected filters. Please adjust the filters to include more nodes.": "OpenShift Container Storage's StorageCluster requires a minimum of 3 nodes for the initial deployment. Only {{nodes}} node match to the selected filters. Please adjust the filters to include more nodes.",
"After the LocalVolumeSet and StorageClass are created you won't be able to go back to this step.": "After the LocalVolumeSet and StorageClass are created you won't be able to go back to this step.",
"Note:": "Note:",
"Create StorageClass": "Create StorageClass",
"Yes": "Yes",
"Are you sure you want to continue?": "Are you sure you want to continue?",
"Node": "Node",
"Selected Disks": "Selected Disks",
"Disk List": "Disk List",
"Selected Capacity": "Selected Capacity",
"{{nodes, number}} Node": "{{nodes, number}} Node",
"{{nodes, number}} Node_plural": "{{nodes, number}} Nodes",
"{{disks, number}} Disk": "{{disks, number}} Disk",
"{{disks, number}} Disk_plural": "{{disks, number}} Disks",
"Selected versus Available Capacity": "Selected versus Available Capacity",
"Out of {{capacity}}": "Out of {{capacity}}",
"Review StorageCluster": "Review StorageCluster",
"Storage and nodes": "Storage and nodes",
"Arbiter zone:": "Arbiter zone:",
Expand All @@ -493,8 +512,6 @@
"Review and create": "Review and create",
"Internal - Attached devices": "Internal - Attached devices",
"Can be used on any platform where there are attached devices to the nodes, using the Local Storage Operator. The infrastructure StorageClass is provided by Local Storage Operator, on top of the attached drives.": "Can be used on any platform where there are attached devices to the nodes, using the Local Storage Operator. The infrastructure StorageClass is provided by Local Storage Operator, on top of the attached drives.",
"Local Storage Operator not installed": "Local Storage Operator not installed",
"Before we can create a StorageCluster, the Local Storage operator needs to be installed. When installation is finished come back to OpenShift Container Storage to create a StorageCluster.<1><0>Install</0></1>": "Before we can create a StorageCluster, the Local Storage operator needs to be installed. When installation is finished come back to OpenShift Container Storage to create a StorageCluster.<1><0>Install</0></1>",
"Node Table": "Node Table",
"StorageCluster exists": "StorageCluster exists",
"Back to operator page": "Back to operator page",
Expand Down
Expand Up @@ -6,6 +6,7 @@ import {
CreateStorageClass,
ConnectionDetails,
ReviewAndCreate,
CreateLocalVolumeSet,
} from './create-storage-system-steps';
import { WizardDispatch, WizardState } from './reducer';
import {
Expand Down Expand Up @@ -122,6 +123,13 @@ export const createSteps = (
name: StepsName(t)[Steps.CreateLocalVolumeSet],
canJumpTo: stepIdReached >= 2,
id: 2,
component: (
<CreateLocalVolumeSet
state={state.createLocalVolumeSet}
dispatch={dispatch}
storageClass={storageClass}
/>
),
},
{
canJumpTo: stepIdReached >= 3,
Expand Down
Expand Up @@ -18,6 +18,7 @@ import {
} from '../../../../constants/create-storage-system';
import { ErrorHandler } from '../../error-handler';
import { ExternalStorage } from '../../external-storage/types';
import { NO_PROVISIONER } from '../../../../constants';

const ExternalSystemSelection: React.FC<ExternalSystemSelectionProps> = ({
dispatch,
Expand Down Expand Up @@ -114,6 +115,8 @@ export const BackingStorage: React.FC<BackingStorageProps> = ({
},
);

const { type, externalStorage, deployment, isAdvancedOpen } = state;

React.useEffect(() => {
/*
Allow pre selecting the "external connection" option instead of the "existing" option
Expand All @@ -124,7 +127,17 @@ export const BackingStorage: React.FC<BackingStorageProps> = ({
}
}, [dispatch, allowedExternalStorage.length, hasOCS]);

const { type, externalStorage, deployment, isAdvancedOpen } = state;
React.useEffect(() => {
/*
Update storage class state when no storage class is used.
*/
if (type === BackingStorageType.LOCAL_DEVICES) {
dispatch({
type: 'wizard/setStorageClass',
payload: { name: '', provisioner: NO_PROVISIONER },
});
}
}, [dispatch, type]);

const showExternalStorageSelection =
type === BackingStorageType.EXTERNAL && allowedExternalStorage.length;
Expand Down
@@ -0,0 +1,51 @@
.odf-create-lvs__all-nodes-radio--padding {
padding-bottom: var(--pf-global--spacer--sm);
}

.odf-create-lvs__filter-volumes-text--margin {
margin: 0;
}

.odf-create-lvs__max-disk-limit-help-text--margin {
margin-top: 0;
}

.odf-create-lvs__node-selection-table--margin {
margin-top: 0;
}

.odf-create-lvs__disk-mode-dropdown--margin {
margin-bottom: var(--pf-global--spacer--md);
}

.odf-create-lvs__device-type-dropdown--margin {
margin-bottom: var(--pf-global--spacer--md);
}

.odf-create-lvs__disk-size-form-group--margin {
margin: var(--pf-global--spacer--lg) 0;
}

.odf-create-lvs__disk-size-form-group-div {
display: flex;
align-items: flex-end;
justify-content: space-between;
width: 22em;
}

.odf-create-lvs__disk-size-form-group-max-min-input {
display: flex;
flex-direction: column;
}

.odf-create-lvs__disk-input {
max-width: 100px;
}

.odf-create-lvs__select-nodes {
// overrides extra space added by `co-m-nav-title`
.co-m-nav-title {
padding: 0;
margin: 0;
}
}