@openshift-assisted/ui-lib 2.36.5 → 2.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts +2 -0
- package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts +2 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts +3 -5
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts +1 -0
- package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts +1 -1
- package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/EnvironmentDetails.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts +4 -0
- package/build/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/OpenshiftVersionDropdown.d.ts +7 -0
- package/build/@types/cim/components/InfraEnv/OpenshiftVersionDropdown.d.ts.map +1 -0
- package/build/@types/cim/components/common/CpuArchitectureDropdown.d.ts +2 -1
- package/build/@types/cim/components/common/CpuArchitectureDropdown.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/versions.d.ts +2 -2
- package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
- package/build/@types/cim/types/k8s/agent-service-config.d.ts +7 -0
- package/build/@types/cim/types/k8s/agent-service-config.d.ts.map +1 -1
- package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts +1 -0
- package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/types.d.ts +1 -0
- package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
- package/build/@types/common/components/hosts/HostStatus.d.ts.map +1 -1
- package/build/@types/common/components/hosts/HostValidationGroups.d.ts +2 -1
- package/build/@types/common/components/hosts/HostValidationGroups.d.ts.map +1 -1
- package/build/@types/common/config/constants.d.ts +35 -0
- package/build/@types/common/config/constants.d.ts.map +1 -1
- package/build/@types/common/config/docs_links.d.ts +5 -0
- package/build/@types/common/config/docs_links.d.ts.map +1 -1
- package/build/@types/common/types/clusters.d.ts +2 -0
- package/build/@types/common/types/clusters.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts +9 -0
- package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/CnvCheckbox.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.d.ts +4 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.d.ts +4 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/OscCheckbox.d.ts +4 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/OscCheckbox.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterDetail/ClusterDetailsButtonGroup.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/Operators.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/OperatorsStep.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts +1 -1
- package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts.map +1 -1
- package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts +2 -0
- package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts.map +1 -1
- package/build/@types/ocm/services/ClusterDetailsService.d.ts.map +1 -1
- package/build/@types/ocm/services/OperatorsService.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -0
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js +7 -6
- package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js +19 -4
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js +4 -5
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +2 -2
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js +10 -7
- package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvFormPage.js +4 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvFormPage.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js +35 -0
- package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js.map +1 -0
- package/build/cjs/cim/components/common/CpuArchitectureDropdown.js +23 -7
- package/build/cjs/cim/components/common/CpuArchitectureDropdown.js.map +1 -1
- package/build/cjs/cim/components/helpers/versions.js +6 -1
- package/build/cjs/cim/components/helpers/versions.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +2 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
- package/build/cjs/common/components/hosts/HostStatus.js +1 -1
- package/build/cjs/common/components/hosts/HostStatus.js.map +1 -1
- package/build/cjs/common/components/hosts/HostValidationGroups.js +27 -5
- package/build/cjs/common/components/hosts/HostValidationGroups.js.map +1 -1
- package/build/cjs/common/components/hosts/utils.js +1 -1
- package/build/cjs/common/components/hosts/utils.js.map +1 -1
- package/build/cjs/common/components/ui/formik/LabelField.css +5 -0
- package/build/cjs/common/config/constants.js +49 -1
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/common/config/docs_links.js +7 -1
- package/build/cjs/common/config/docs_links.js.map +1 -1
- package/build/cjs/common/types/clusters.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +67 -0
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +5 -5
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/CnvCheckbox.js +3 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/CnvCheckbox.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.js +3 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.js +48 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.js +30 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/OscCheckbox.js +47 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/OscCheckbox.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js +0 -2
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterDetailsButtonGroup.js +8 -6
- package/build/cjs/ocm/components/clusterDetail/ClusterDetailsButtonGroup.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/Operators.js +2 -0
- package/build/cjs/ocm/components/clusterWizard/Operators.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js +5 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/wizardTransition.js +8 -1
- package/build/cjs/ocm/components/clusterWizard/wizardTransition.js.map +1 -1
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +51 -1
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js.map +1 -1
- package/build/cjs/ocm/services/ClusterDetailsService.js +2 -1
- package/build/cjs/ocm/services/ClusterDetailsService.js.map +1 -1
- package/build/cjs/ocm/services/OperatorsService.js +12 -4
- package/build/cjs/ocm/services/OperatorsService.js.map +1 -1
- package/lib/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.tsx +17 -3
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.tsx +30 -4
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.tsx +9 -9
- package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +3 -2
- package/lib/cim/components/InfraEnv/EnvironmentDetails.tsx +10 -0
- package/lib/cim/components/InfraEnv/InfraEnvFormPage.tsx +8 -0
- package/lib/cim/components/InfraEnv/OpenshiftVersionDropdown.tsx +72 -0
- package/lib/cim/components/common/CpuArchitectureDropdown.tsx +47 -27
- package/lib/cim/components/helpers/versions.ts +12 -0
- package/lib/cim/types/k8s/agent-service-config.ts +8 -0
- package/lib/cim/types/k8s/infra-env-k8s-resource.ts +1 -0
- package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +1 -0
- package/lib/common/components/clusterWizard/types.ts +1 -0
- package/lib/common/components/hosts/HostStatus.tsx +1 -2
- package/lib/common/components/hosts/HostValidationGroups.tsx +52 -5
- package/lib/common/components/hosts/utils.ts +1 -1
- package/lib/common/components/ui/formik/LabelField.css +5 -0
- package/lib/common/config/constants.ts +48 -0
- package/lib/common/config/docs_links.ts +16 -0
- package/lib/common/types/clusters.ts +2 -0
- package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +142 -0
- package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +11 -9
- package/lib/ocm/components/clusterConfiguration/operators/CnvCheckbox.tsx +7 -1
- package/lib/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.tsx +2 -1
- package/lib/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.tsx +80 -0
- package/lib/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.tsx +36 -0
- package/lib/ocm/components/clusterConfiguration/operators/OscCheckbox.tsx +88 -0
- package/lib/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.ts +0 -2
- package/lib/ocm/components/clusterDetail/ClusterDetailsButtonGroup.tsx +14 -10
- package/lib/ocm/components/clusterWizard/Operators.tsx +4 -0
- package/lib/ocm/components/clusterWizard/OperatorsStep.tsx +5 -0
- package/lib/ocm/components/clusterWizard/_wizardTransition.test.ts +35 -0
- package/lib/ocm/components/clusterWizard/wizardTransition.ts +8 -1
- package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +62 -0
- package/lib/ocm/services/ClusterDetailsService.ts +2 -1
- package/lib/ocm/services/OperatorsService.tsx +19 -5
- package/package.json +3 -3
- package/build/@types/ocm/components/clusterConfiguration/OcmSNOControlGroup.d.ts +0 -10
- package/build/@types/ocm/components/clusterConfiguration/OcmSNOControlGroup.d.ts.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmSNOControlGroup.js +0 -20
- package/build/cjs/ocm/components/clusterConfiguration/OcmSNOControlGroup.js.map +0 -1
- package/lib/ocm/components/clusterConfiguration/OcmSNOControlGroup.tsx +0 -62
|
@@ -9,6 +9,7 @@ import { ExclamationTriangleIcon } from '@patternfly/react-icons/dist/js/icons/e
|
|
|
9
9
|
import { Host, HostValidationId } from '@openshift-assisted/types/assisted-installer-service';
|
|
10
10
|
import { Validation, ValidationsInfo } from '../../types/hosts';
|
|
11
11
|
import {
|
|
12
|
+
getMtuLink,
|
|
12
13
|
hostValidationFailureHints,
|
|
13
14
|
hostValidationGroupLabels,
|
|
14
15
|
hostValidationLabels,
|
|
@@ -19,6 +20,7 @@ import { useTranslation } from '../../hooks/use-translation-wrapper';
|
|
|
19
20
|
import { getKeys } from '../../utils';
|
|
20
21
|
|
|
21
22
|
import './HostValidationGroups.css';
|
|
23
|
+
import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
22
24
|
|
|
23
25
|
export type AdditionNtpSourcePropsType = {
|
|
24
26
|
AdditionalNTPSourcesDialogToggleComponent?: React.FC;
|
|
@@ -39,6 +41,7 @@ export type ValidationInfoActionProps = AdditionNtpSourcePropsType &
|
|
|
39
41
|
|
|
40
42
|
type HostValidationGroupsProps = ValidationInfoActionProps & {
|
|
41
43
|
validationsInfo: ValidationsInfo;
|
|
44
|
+
openshiftVersion?: string;
|
|
42
45
|
};
|
|
43
46
|
|
|
44
47
|
type ValidationGroupAlertProps = ValidationInfoActionProps & {
|
|
@@ -145,6 +148,34 @@ const ApiVipConnectivityAlert = ({
|
|
|
145
148
|
);
|
|
146
149
|
};
|
|
147
150
|
|
|
151
|
+
const MtuInfoLink = ({ docsVersion }: { docsVersion: string }) => {
|
|
152
|
+
const { t } = useTranslation();
|
|
153
|
+
return (
|
|
154
|
+
<a href={getMtuLink(docsVersion)} target="_blank" rel="noopener noreferrer">
|
|
155
|
+
{t('ai:Learn more about MTU (maximum transmission unit)')} <ExternalLinkAltIcon />.
|
|
156
|
+
</a>
|
|
157
|
+
);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const MtuSyncAlert = ({
|
|
161
|
+
variant,
|
|
162
|
+
validation,
|
|
163
|
+
docsVersion,
|
|
164
|
+
}: {
|
|
165
|
+
variant: AlertVariant;
|
|
166
|
+
validation: Validation;
|
|
167
|
+
docsVersion: string;
|
|
168
|
+
}) => {
|
|
169
|
+
const { t } = useTranslation();
|
|
170
|
+
return (
|
|
171
|
+
<Alert title={t('ai:MTU (maximum transmission unit) failure')} variant={variant} isInline>
|
|
172
|
+
{toSentence(validation.message)} {hostValidationFailureHints(t)[validation.id]}
|
|
173
|
+
<br />
|
|
174
|
+
{<MtuInfoLink docsVersion={docsVersion} />}
|
|
175
|
+
</Alert>
|
|
176
|
+
);
|
|
177
|
+
};
|
|
178
|
+
|
|
148
179
|
const ValidationGroupAlerts = ({
|
|
149
180
|
validations,
|
|
150
181
|
title,
|
|
@@ -153,7 +184,8 @@ const ValidationGroupAlerts = ({
|
|
|
153
184
|
AdditionalNTPSourcesDialogToggleComponent,
|
|
154
185
|
UpdateDay2ApiVipDialogToggleComponent,
|
|
155
186
|
host,
|
|
156
|
-
|
|
187
|
+
openshiftVersion,
|
|
188
|
+
}: ValidationGroupAlertProps & { openshiftVersion?: string }) => {
|
|
157
189
|
if (!validations.length) {
|
|
158
190
|
return null;
|
|
159
191
|
}
|
|
@@ -162,6 +194,7 @@ const ValidationGroupAlerts = ({
|
|
|
162
194
|
['hostname-valid']: undefined,
|
|
163
195
|
['ntp-synced']: undefined,
|
|
164
196
|
['ignition-downloadable']: undefined,
|
|
197
|
+
['mtu-valid']: undefined,
|
|
165
198
|
};
|
|
166
199
|
const alerts = [];
|
|
167
200
|
const validationsWithoutActions: Validation[] = [];
|
|
@@ -210,6 +243,16 @@ const ValidationGroupAlerts = ({
|
|
|
210
243
|
/>,
|
|
211
244
|
);
|
|
212
245
|
}
|
|
246
|
+
if (validationsWithActions['mtu-valid'] && AdditionalNTPSourcesDialogToggleComponent) {
|
|
247
|
+
alerts.push(
|
|
248
|
+
<MtuSyncAlert
|
|
249
|
+
validation={validationsWithActions['mtu-valid']}
|
|
250
|
+
variant={variant}
|
|
251
|
+
key="mtu-sync-alert"
|
|
252
|
+
docsVersion={openshiftVersion || '4.17'}
|
|
253
|
+
/>,
|
|
254
|
+
);
|
|
255
|
+
}
|
|
213
256
|
if (validationsWithoutActions.length > 0) {
|
|
214
257
|
alerts.push(
|
|
215
258
|
<ValidationsAlert
|
|
@@ -223,20 +266,22 @@ const ValidationGroupAlerts = ({
|
|
|
223
266
|
return <AlertGroup>{alerts}</AlertGroup>;
|
|
224
267
|
};
|
|
225
268
|
|
|
226
|
-
export const HostValidationGroups = ({
|
|
269
|
+
export const HostValidationGroups = ({
|
|
270
|
+
validationsInfo,
|
|
271
|
+
openshiftVersion,
|
|
272
|
+
...props
|
|
273
|
+
}: HostValidationGroupsProps) => {
|
|
227
274
|
const { t } = useTranslation();
|
|
228
275
|
return (
|
|
229
276
|
<>
|
|
230
277
|
{getKeys(validationsInfo).map((groupName) => {
|
|
231
278
|
const validations = validationsInfo[groupName] || [];
|
|
232
|
-
|
|
233
279
|
const pendingValidations = validations.filter(
|
|
234
280
|
(v) => v.status === 'pending' && v.id !== 'ntp-synced',
|
|
235
281
|
);
|
|
236
282
|
const failedValidations = validations.filter(
|
|
237
283
|
(v) => (v.status === 'failure' || v.status === 'error') && v.id !== 'ntp-synced',
|
|
238
284
|
);
|
|
239
|
-
|
|
240
285
|
const softValidations = validations.filter(
|
|
241
286
|
(v) => ['pending', 'failure', 'error'].includes(v.status) && v.id === 'ntp-synced',
|
|
242
287
|
);
|
|
@@ -261,7 +306,6 @@ export const HostValidationGroups = ({ validationsInfo, ...props }: HostValidati
|
|
|
261
306
|
</>
|
|
262
307
|
);
|
|
263
308
|
};
|
|
264
|
-
|
|
265
309
|
const groupLabel = hostValidationGroupLabels(t)[groupName] as string;
|
|
266
310
|
return (
|
|
267
311
|
<Fragment key={groupName}>
|
|
@@ -279,11 +323,13 @@ export const HostValidationGroups = ({ validationsInfo, ...props }: HostValidati
|
|
|
279
323
|
variant={AlertVariant.info}
|
|
280
324
|
title={t('ai:Pending validations:')}
|
|
281
325
|
validations={pendingValidations}
|
|
326
|
+
openshiftVersion={openshiftVersion}
|
|
282
327
|
{...props}
|
|
283
328
|
/>
|
|
284
329
|
<ValidationGroupAlerts
|
|
285
330
|
variant={AlertVariant.info}
|
|
286
331
|
validations={softValidations}
|
|
332
|
+
openshiftVersion={openshiftVersion}
|
|
287
333
|
title={''}
|
|
288
334
|
{...props}
|
|
289
335
|
/>
|
|
@@ -294,6 +340,7 @@ export const HostValidationGroups = ({ validationsInfo, ...props }: HostValidati
|
|
|
294
340
|
variant={AlertVariant.warning}
|
|
295
341
|
title={t('ai:Failed validations:')}
|
|
296
342
|
validations={failedValidations}
|
|
343
|
+
openshiftVersion={openshiftVersion}
|
|
297
344
|
{...props}
|
|
298
345
|
/>
|
|
299
346
|
</Fragment>
|
|
@@ -232,7 +232,7 @@ export const areOnlySoftValidationsFailing = (validationsInfo: HostValidationsIn
|
|
|
232
232
|
);
|
|
233
233
|
if (!failingValidationIds.length) return false;
|
|
234
234
|
for (const id of failingValidationIds) {
|
|
235
|
-
if (!['ntp-synced', 'container-images-available'].includes(id)) {
|
|
235
|
+
if (!['ntp-synced', 'container-images-available', 'mtu-valid'].includes(id)) {
|
|
236
236
|
return false;
|
|
237
237
|
}
|
|
238
238
|
}
|
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
border: 1px solid transparent;
|
|
7
7
|
outline: none;
|
|
8
8
|
width: 100%;
|
|
9
|
+
background-color: initial;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.label-field__input::placeholder {
|
|
13
|
+
color: var(--pf-v5-c-form-control--m-placeholder--Color);
|
|
9
14
|
}
|
|
10
15
|
|
|
11
16
|
.label-field .react-autosuggest__suggestions-list {
|
|
@@ -127,6 +127,16 @@ export const hostValidationLabels = (t: TFunction): { [key in HostValidationId]:
|
|
|
127
127
|
'no-ip-collisions-in-network': t('ai:No IP collisions in network'),
|
|
128
128
|
'mce-requirements-satisfied': t('ai:Multicluster engine requirements'),
|
|
129
129
|
'mtv-requirements-satisfied': t('ai:Migration toolkit for virtualization requirements'),
|
|
130
|
+
'no-iscsi-nic-belongs-to-machine-cidr': t('ai:iSCSI NIC belongs to machine CIDR'),
|
|
131
|
+
'node-feature-discovery-requirements-satisfied': t('ai:Node Feature Discovery requirements'),
|
|
132
|
+
'nvidia-gpu-requirements-satisfied': t('ai:NVIDIA GPU requirements'),
|
|
133
|
+
'pipelines-requirements-satisfied': t('ai:Pipelines requirements'),
|
|
134
|
+
'serverless-requirements-satisfied': t('ai:Serverless requirements'),
|
|
135
|
+
'servicemesh-requirements-satisfied': t('ai:Service Mesh requirements'),
|
|
136
|
+
'openshift-ai-requirements-satisfied': t('ai:OpenShift AI requirements'),
|
|
137
|
+
'osc-requirements-satisfied': t('ai:OpenShift sandboxed containers requirements'),
|
|
138
|
+
'mtu-valid': t('ai:MTU requirements'),
|
|
139
|
+
'authorino-requirements-satisfied': '',
|
|
130
140
|
});
|
|
131
141
|
|
|
132
142
|
export const hostValidationFailureHints = (
|
|
@@ -176,6 +186,16 @@ export const hostValidationFailureHints = (
|
|
|
176
186
|
'no-ip-collisions-in-network': '',
|
|
177
187
|
'mce-requirements-satisfied': '',
|
|
178
188
|
'mtv-requirements-satisfied': '',
|
|
189
|
+
'no-iscsi-nic-belongs-to-machine-cidr': '',
|
|
190
|
+
'node-feature-discovery-requirements-satisfied': '',
|
|
191
|
+
'nvidia-gpu-requirements-satisfied': '',
|
|
192
|
+
'pipelines-requirements-satisfied': '',
|
|
193
|
+
'serverless-requirements-satisfied': '',
|
|
194
|
+
'servicemesh-requirements-satisfied': '',
|
|
195
|
+
'openshift-ai-requirements-satisfied': '',
|
|
196
|
+
'osc-requirements-satisfied': '',
|
|
197
|
+
'authorino-requirements-satisfied': '',
|
|
198
|
+
'mtu-valid': '',
|
|
179
199
|
});
|
|
180
200
|
|
|
181
201
|
export const clusterValidationLabels = (
|
|
@@ -270,6 +290,13 @@ export const OPERATOR_NAME_LVM = 'lvm';
|
|
|
270
290
|
export const OPERATOR_NAME_LVMS = 'lvms';
|
|
271
291
|
export const OPERATOR_NAME_MCE = 'mce';
|
|
272
292
|
export const OPERATOR_NAME_MTV = 'mtv';
|
|
293
|
+
export const OPERATOR_NAME_NODE_FEATURE_DISCOVERY = 'node-feature-discovery';
|
|
294
|
+
export const OPERATOR_NAME_NVIDIA_GPU = 'nvidia-gpu';
|
|
295
|
+
export const OPERATOR_NAME_PIPELINES = 'pipelines';
|
|
296
|
+
export const OPERATOR_NAME_SERVICEMESH = 'servicemesh';
|
|
297
|
+
export const OPERATOR_NAME_SERVERLESS = 'serverless';
|
|
298
|
+
export const OPERATOR_NAME_OPENSHIFT_AI = 'openshift-ai';
|
|
299
|
+
export const OPERATOR_NAME_OSC = 'osc';
|
|
273
300
|
|
|
274
301
|
const OperatorNames = [
|
|
275
302
|
OPERATOR_NAME_CNV,
|
|
@@ -279,6 +306,13 @@ const OperatorNames = [
|
|
|
279
306
|
OPERATOR_NAME_LVMS,
|
|
280
307
|
OPERATOR_NAME_MCE,
|
|
281
308
|
OPERATOR_NAME_MTV,
|
|
309
|
+
OPERATOR_NAME_NODE_FEATURE_DISCOVERY,
|
|
310
|
+
OPERATOR_NAME_NVIDIA_GPU,
|
|
311
|
+
OPERATOR_NAME_PIPELINES,
|
|
312
|
+
OPERATOR_NAME_SERVICEMESH,
|
|
313
|
+
OPERATOR_NAME_SERVERLESS,
|
|
314
|
+
OPERATOR_NAME_OPENSHIFT_AI,
|
|
315
|
+
OPERATOR_NAME_OSC,
|
|
282
316
|
];
|
|
283
317
|
export const ExposedOperatorNames = [
|
|
284
318
|
OPERATOR_NAME_CNV,
|
|
@@ -287,6 +321,13 @@ export const ExposedOperatorNames = [
|
|
|
287
321
|
OPERATOR_NAME_LVMS,
|
|
288
322
|
OPERATOR_NAME_MCE,
|
|
289
323
|
OPERATOR_NAME_MTV,
|
|
324
|
+
OPERATOR_NAME_NODE_FEATURE_DISCOVERY,
|
|
325
|
+
OPERATOR_NAME_NVIDIA_GPU,
|
|
326
|
+
OPERATOR_NAME_PIPELINES,
|
|
327
|
+
OPERATOR_NAME_SERVICEMESH,
|
|
328
|
+
OPERATOR_NAME_SERVERLESS,
|
|
329
|
+
OPERATOR_NAME_OPENSHIFT_AI,
|
|
330
|
+
OPERATOR_NAME_OSC,
|
|
290
331
|
];
|
|
291
332
|
|
|
292
333
|
export type OperatorName = (typeof OperatorNames)[number];
|
|
@@ -322,6 +363,13 @@ export const operatorLabels = (
|
|
|
322
363
|
? t('ai:Logical Volume Manager Storage')
|
|
323
364
|
: t('ai:Logical Volume Manager'),
|
|
324
365
|
[OPERATOR_NAME_MCE]: t('ai:Multicluster engine'),
|
|
366
|
+
[OPERATOR_NAME_NODE_FEATURE_DISCOVERY]: t('ai:Node Feature Discovery'),
|
|
367
|
+
[OPERATOR_NAME_NVIDIA_GPU]: t('ai:NVIDIA GPU'),
|
|
368
|
+
[OPERATOR_NAME_PIPELINES]: t('ai:Pipelines'),
|
|
369
|
+
[OPERATOR_NAME_SERVICEMESH]: t('ai:Service Mesh'),
|
|
370
|
+
[OPERATOR_NAME_SERVERLESS]: t('ai:Serverless'),
|
|
371
|
+
[OPERATOR_NAME_OPENSHIFT_AI]: t('ai:OpenShift AI'),
|
|
372
|
+
[OPERATOR_NAME_OSC]: t('ai:OpenShift sandboxed containers'),
|
|
325
373
|
};
|
|
326
374
|
};
|
|
327
375
|
|
|
@@ -67,6 +67,12 @@ export const HOST_REQUIREMENTS_LINK = 'https://access.redhat.com/solutions/48856
|
|
|
67
67
|
export const ODF_REQUIREMENTS_LINK =
|
|
68
68
|
'https://docs.redhat.com/en/documentation/red_hat_openshift_data_foundation';
|
|
69
69
|
|
|
70
|
+
export const OPENSHIFT_AI_REQUIREMENTS_LINK =
|
|
71
|
+
'https://docs.redhat.com/en/documentation/red_hat_openshift_ai_cloud_service/1/html/installing_the_openshift_ai_cloud_service/requirements-for-openshift-ai_install#requirements-for-openshift-ai_install';
|
|
72
|
+
|
|
73
|
+
export const OSC_REQUIREMENTS_LINK =
|
|
74
|
+
'https://docs.redhat.com/en/documentation/openshift_sandboxed_containers/1.8/html/user_guide/deploying-osc-bare-metal#osc-resource-requirements_deploying-bare-metal';
|
|
75
|
+
|
|
70
76
|
export const CNV_LINK = 'https://cloud.redhat.com/learn/topics/virtualization/';
|
|
71
77
|
|
|
72
78
|
export const ODF_LINK = 'https://www.redhat.com/en/resources/openshift-data-foundation-datasheet';
|
|
@@ -98,3 +104,13 @@ export const getCiscoIntersightLink = (downloadIsoUrl: string) =>
|
|
|
98
104
|
|
|
99
105
|
export const MTV_LINK =
|
|
100
106
|
'https://docs.redhat.com/en/documentation/migration_toolkit_for_virtualization/2.7/';
|
|
107
|
+
|
|
108
|
+
export const OPENSHIFT_AI_LINK =
|
|
109
|
+
'https://www.redhat.com/en/technologies/cloud-computing/openshift/openshift-ai';
|
|
110
|
+
|
|
111
|
+
export const OSC_LINK = 'https://docs.redhat.com/en/documentation/openshift_sandboxed_containers';
|
|
112
|
+
|
|
113
|
+
export const getMtuLink = (ocpVersion?: string) =>
|
|
114
|
+
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getShortOpenshiftVersion(
|
|
115
|
+
ocpVersion,
|
|
116
|
+
)}/html/networking/changing-cluster-network-mtu#nw-cluster-mtu-change-about_changing-cluster-network-mtu`;
|
|
@@ -64,6 +64,8 @@ export type OperatorsValues = V2ClusterUpdateParams & {
|
|
|
64
64
|
useContainerNativeVirtualization: boolean;
|
|
65
65
|
useMultiClusterEngine: boolean;
|
|
66
66
|
useMigrationToolkitforVirtualization: boolean;
|
|
67
|
+
useOpenShiftAI: boolean;
|
|
68
|
+
useOsc: boolean;
|
|
67
69
|
};
|
|
68
70
|
|
|
69
71
|
export type SupportedPlatformType = Extract<PlatformType, 'vsphere' | 'nutanix' | 'external'>;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormGroup, Tooltip } from '@patternfly/react-core';
|
|
3
|
+
import { Dropdown, DropdownItem, DropdownToggle } from '@patternfly/react-core/deprecated';
|
|
4
|
+
import { useField } from 'formik';
|
|
5
|
+
import { getFieldId, PopoverIcon } from '../../../common';
|
|
6
|
+
import {
|
|
7
|
+
NewFeatureSupportLevelMap,
|
|
8
|
+
useNewFeatureSupportLevel,
|
|
9
|
+
} from '../../../common/components/newFeatureSupportLevels';
|
|
10
|
+
import OcmSNODisclaimer from './OcmSNODisclaimer';
|
|
11
|
+
|
|
12
|
+
const INPUT_NAME = 'controlPlaneCount';
|
|
13
|
+
const fieldId = getFieldId(INPUT_NAME, 'input');
|
|
14
|
+
const DEFAULT_VALUE = '3';
|
|
15
|
+
|
|
16
|
+
export const ControlPlaneNodesLabel = () => {
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
Number of control plane nodes{' '}
|
|
20
|
+
<PopoverIcon
|
|
21
|
+
bodyContent={
|
|
22
|
+
<>
|
|
23
|
+
Control plane nodes manage workloads, maintain cluster state, and ensure stability.
|
|
24
|
+
Using more than three nodes boosts fault tolerance and availability, reducing downtime
|
|
25
|
+
during failures.
|
|
26
|
+
</>
|
|
27
|
+
}
|
|
28
|
+
/>
|
|
29
|
+
</>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
interface ControlPlaneNodesOption {
|
|
34
|
+
value: string;
|
|
35
|
+
label: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface ControlPlaneNodesDropdownProps {
|
|
39
|
+
featureSupportLevelData?: NewFeatureSupportLevelMap | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const isDropdownItemEnabled = (
|
|
43
|
+
controlPlaneNodeCount: string,
|
|
44
|
+
isNonStandardControlPlaneEnabled: boolean,
|
|
45
|
+
): boolean => {
|
|
46
|
+
if (controlPlaneNodeCount === '4' || controlPlaneNodeCount === '5') {
|
|
47
|
+
return isNonStandardControlPlaneEnabled;
|
|
48
|
+
}
|
|
49
|
+
return true;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const ControlPlaneNodesDropdown: React.FC<ControlPlaneNodesDropdownProps> = ({
|
|
53
|
+
featureSupportLevelData,
|
|
54
|
+
}) => {
|
|
55
|
+
const [field, , { setValue }] = useField<string>(INPUT_NAME);
|
|
56
|
+
const [isOpen, setOpen] = React.useState<boolean>(false);
|
|
57
|
+
const newFeatureSupportLevelContext = useNewFeatureSupportLevel();
|
|
58
|
+
|
|
59
|
+
const snoSupportLevel = newFeatureSupportLevelContext.getFeatureSupportLevel(
|
|
60
|
+
'SNO',
|
|
61
|
+
featureSupportLevelData ?? undefined,
|
|
62
|
+
);
|
|
63
|
+
const snoExpansion = newFeatureSupportLevelContext.isFeatureSupported(
|
|
64
|
+
'SINGLE_NODE_EXPANSION',
|
|
65
|
+
featureSupportLevelData ?? undefined,
|
|
66
|
+
);
|
|
67
|
+
const isDisabled = newFeatureSupportLevelContext.isFeatureDisabled(
|
|
68
|
+
'SNO',
|
|
69
|
+
featureSupportLevelData ?? undefined,
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
const disabledReason =
|
|
73
|
+
'This option is not available with the current configurations. Make sure that OpenShift version is 4.18 or newer, CPU architecture is x86_64 and no external platform integration is selected.';
|
|
74
|
+
|
|
75
|
+
const isNonStandardControlPlaneEnabled = newFeatureSupportLevelContext.isFeatureSupported(
|
|
76
|
+
'NON_STANDARD_HA_CONTROL_PLANE',
|
|
77
|
+
featureSupportLevelData ?? undefined,
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
const options: ControlPlaneNodesOption[] = [
|
|
81
|
+
{ value: '1', label: '1 (Single Node OpenShift - not highly available cluster)' },
|
|
82
|
+
{ value: '3', label: '3 (highly available cluster)' },
|
|
83
|
+
{ value: '4', label: '4 (highly available cluster+)' },
|
|
84
|
+
{ value: '5', label: '5 (highly available cluster++)' },
|
|
85
|
+
];
|
|
86
|
+
|
|
87
|
+
React.useEffect(() => {
|
|
88
|
+
if (!field.value) {
|
|
89
|
+
setValue(DEFAULT_VALUE);
|
|
90
|
+
}
|
|
91
|
+
}, [field.value, setValue]);
|
|
92
|
+
|
|
93
|
+
const onSelect = (event?: React.SyntheticEvent<HTMLDivElement>): void => {
|
|
94
|
+
const selectedValue = event?.currentTarget.id as string;
|
|
95
|
+
setValue(selectedValue);
|
|
96
|
+
setOpen(false);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const dropdownItems = options.map(({ value, label }) => {
|
|
100
|
+
const isItemEnabled = isDropdownItemEnabled(value, isNonStandardControlPlaneEnabled);
|
|
101
|
+
return (
|
|
102
|
+
<DropdownItem key={value} id={value} isAriaDisabled={!isItemEnabled}>
|
|
103
|
+
<Tooltip hidden={isItemEnabled} content={disabledReason} position="top">
|
|
104
|
+
<div>{label}</div>
|
|
105
|
+
</Tooltip>
|
|
106
|
+
</DropdownItem>
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const toggle = (
|
|
111
|
+
<DropdownToggle onToggle={(_, val) => setOpen(val)}>
|
|
112
|
+
{options.find((opt) => opt.value === field.value)?.label || 'Select'}
|
|
113
|
+
</DropdownToggle>
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<>
|
|
118
|
+
<FormGroup
|
|
119
|
+
id={`form-control__${fieldId}`}
|
|
120
|
+
label={<ControlPlaneNodesLabel />}
|
|
121
|
+
fieldId={fieldId}
|
|
122
|
+
>
|
|
123
|
+
<Dropdown
|
|
124
|
+
id={fieldId}
|
|
125
|
+
isOpen={isOpen}
|
|
126
|
+
toggle={toggle}
|
|
127
|
+
dropdownItems={dropdownItems}
|
|
128
|
+
onSelect={onSelect}
|
|
129
|
+
/>
|
|
130
|
+
</FormGroup>
|
|
131
|
+
{field.value === '1' && (
|
|
132
|
+
<OcmSNODisclaimer
|
|
133
|
+
isDisabled={isDisabled}
|
|
134
|
+
snoSupportLevel={snoSupportLevel || 'supported'}
|
|
135
|
+
snoExpansionSupported={snoExpansion}
|
|
136
|
+
/>
|
|
137
|
+
)}
|
|
138
|
+
</>
|
|
139
|
+
);
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export default ControlPlaneNodesDropdown;
|
|
@@ -5,7 +5,6 @@ import { useFormikContext } from 'formik';
|
|
|
5
5
|
import { HostsNetworkConfigurationControlGroup } from './HostsNetworkConfigurationControlGroup';
|
|
6
6
|
import {
|
|
7
7
|
ClusterDetailsValues,
|
|
8
|
-
isSNO,
|
|
9
8
|
OpenshiftVersionOptionType,
|
|
10
9
|
PullSecret,
|
|
11
10
|
ocmClusterNameValidationMessages,
|
|
@@ -24,7 +23,6 @@ import OcmOpenShiftVersionSelect from './OcmOpenShiftVersionSelect';
|
|
|
24
23
|
import CustomManifestCheckbox from './CustomManifestCheckbox';
|
|
25
24
|
import CpuArchitectureDropdown from './CpuArchitectureDropdown';
|
|
26
25
|
import { OcmBaseDomainField } from './OcmBaseDomainField';
|
|
27
|
-
import OcmSNOControlGroup from './OcmSNOControlGroup';
|
|
28
26
|
import useSupportLevelsAPI from '../../hooks/useSupportLevelsAPI';
|
|
29
27
|
import { useOpenshiftVersionsContext } from '../clusterWizard/OpenshiftVersionsContext';
|
|
30
28
|
import { ExternalPlatformDropdown } from './platformIntegration/ExternalPlatformDropdown';
|
|
@@ -34,6 +32,7 @@ import { ExternalPlatformLabels } from './platformIntegration/constants';
|
|
|
34
32
|
import { ManagedDomain, PlatformType } from '@openshift-assisted/types/assisted-installer-service';
|
|
35
33
|
import { useClusterWizardContext } from '../clusterWizard/ClusterWizardContext';
|
|
36
34
|
import { useFeature } from '../../hooks/use-feature';
|
|
35
|
+
import ControlPlaneNodesDropdown, { ControlPlaneNodesLabel } from './ControlPlaneNodesDropdown';
|
|
37
36
|
|
|
38
37
|
export type OcmClusterDetailsFormFieldsProps = {
|
|
39
38
|
forceOpenshiftVersion?: string;
|
|
@@ -59,7 +58,7 @@ export const OcmClusterDetailsFormFields = ({
|
|
|
59
58
|
clusterId,
|
|
60
59
|
}: OcmClusterDetailsFormFieldsProps) => {
|
|
61
60
|
const { values, setFieldValue } = useFormikContext<ClusterDetailsValues>();
|
|
62
|
-
const {
|
|
61
|
+
const { useRedHatDnsService } = values;
|
|
63
62
|
const nameInputRef = React.useRef<HTMLInputElement>();
|
|
64
63
|
|
|
65
64
|
const { t } = useTranslation();
|
|
@@ -156,10 +155,6 @@ export const OcmClusterDetailsFormFields = ({
|
|
|
156
155
|
cpuArchitectures={cpuArchitectures}
|
|
157
156
|
/>
|
|
158
157
|
)}
|
|
159
|
-
<OcmSNOControlGroup
|
|
160
|
-
highAvailabilityMode={highAvailabilityMode}
|
|
161
|
-
featureSupportLevelData={featureSupportLevelData ?? undefined}
|
|
162
|
-
/>
|
|
163
158
|
|
|
164
159
|
{!isPullSecretSet && <PullSecret isOcm={isOcm} defaultPullSecret={defaultPullSecret} />}
|
|
165
160
|
|
|
@@ -176,10 +171,17 @@ export const OcmClusterDetailsFormFields = ({
|
|
|
176
171
|
onChange={handleExternalPartnerIntegrationsChange}
|
|
177
172
|
cpuArchitecture={values.cpuArchitecture as SupportedCpuArchitecture}
|
|
178
173
|
featureSupportLevelData={featureSupportLevelData}
|
|
179
|
-
isSNO={
|
|
174
|
+
isSNO={values.controlPlaneCount === '1'}
|
|
180
175
|
/>
|
|
181
176
|
)}
|
|
182
177
|
|
|
178
|
+
{clusterExists ? (
|
|
179
|
+
<StaticTextField name="controlPlaneCount" label={<ControlPlaneNodesLabel />}>
|
|
180
|
+
{values.controlPlaneCount}
|
|
181
|
+
</StaticTextField>
|
|
182
|
+
) : (
|
|
183
|
+
<ControlPlaneNodesDropdown featureSupportLevelData={featureSupportLevelData} />
|
|
184
|
+
)}
|
|
183
185
|
<CustomManifestCheckbox clusterId={clusterId || ''} isDisabled={platform === 'external'} />
|
|
184
186
|
|
|
185
187
|
{
|
|
@@ -195,7 +197,7 @@ export const OcmClusterDetailsFormFields = ({
|
|
|
195
197
|
<DiskEncryptionControlGroup
|
|
196
198
|
values={values}
|
|
197
199
|
isDisabled={isPullSecretSet}
|
|
198
|
-
isSNO={
|
|
200
|
+
isSNO={values.controlPlaneCount === '1'}
|
|
199
201
|
docVersion={openshiftVersion}
|
|
200
202
|
/>
|
|
201
203
|
</Form>
|
|
@@ -10,7 +10,10 @@ import {
|
|
|
10
10
|
PopoverIcon,
|
|
11
11
|
} from '../../../../common';
|
|
12
12
|
import CnvHostRequirements from './CnvHostRequirements';
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
getCnvDisabledWithMtvReason,
|
|
15
|
+
getCnvIncompatibleWithLvmReason,
|
|
16
|
+
} from '../../featureSupportLevels/featureStateUtils';
|
|
14
17
|
import { OcmCheckboxField } from '../../ui/OcmFormFields';
|
|
15
18
|
import { useNewFeatureSupportLevel } from '../../../../common/components/newFeatureSupportLevels';
|
|
16
19
|
import NewFeatureSupportLevelBadge from '../../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge';
|
|
@@ -83,6 +86,9 @@ const CnvCheckbox = ({
|
|
|
83
86
|
const lvmSupport = featureSupportLevel.getFeatureSupportLevel('LVM');
|
|
84
87
|
reason = getCnvIncompatibleWithLvmReason(values, lvmSupport);
|
|
85
88
|
}
|
|
89
|
+
if (!reason) {
|
|
90
|
+
reason = getCnvDisabledWithMtvReason(values);
|
|
91
|
+
}
|
|
86
92
|
setDisabledReason(reason);
|
|
87
93
|
}, [values, featureSupportLevel]);
|
|
88
94
|
|
|
@@ -55,8 +55,9 @@ const MtvCheckbox = ({ clusterId }: { clusterId: ClusterOperatorProps['clusterId
|
|
|
55
55
|
const fieldId = getFieldId(Mtv_FIELD_NAME, 'input');
|
|
56
56
|
const [disabledReason, setDisabledReason] = useState<string | undefined>();
|
|
57
57
|
|
|
58
|
-
const selectCNVOperator = (checked: boolean) =>
|
|
58
|
+
const selectCNVOperator = (checked: boolean) => {
|
|
59
59
|
setFieldValue('useContainerNativeVirtualization', checked);
|
|
60
|
+
};
|
|
60
61
|
|
|
61
62
|
React.useEffect(() => {
|
|
62
63
|
const disabledReason = featureSupportLevelContext.getFeatureDisabledReason('MTV');
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { FormGroup, HelperText, HelperTextItem, Tooltip } from '@patternfly/react-core';
|
|
3
|
+
import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
4
|
+
import { useFormikContext } from 'formik';
|
|
5
|
+
import { getFieldId, PopoverIcon, OPENSHIFT_AI_LINK, OperatorsValues } from '../../../../common';
|
|
6
|
+
import OpenShiftAIRequirements from './OpenShiftAIRequirements';
|
|
7
|
+
import { OcmCheckboxField } from '../../ui/OcmFormFields';
|
|
8
|
+
import { useNewFeatureSupportLevel } from '../../../../common/components/newFeatureSupportLevels';
|
|
9
|
+
import NewFeatureSupportLevelBadge from '../../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge';
|
|
10
|
+
import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service';
|
|
11
|
+
import { getOpenShiftAIIncompatibleWithLvmsReason } from '../../featureSupportLevels/featureStateUtils';
|
|
12
|
+
|
|
13
|
+
const OPENSHIFT_AI_FIELD_NAME = 'useOpenShiftAI';
|
|
14
|
+
|
|
15
|
+
type OpenShiftAILabelProps = {
|
|
16
|
+
disabledReason?: string;
|
|
17
|
+
supportLevel?: SupportLevel;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const OpenShiftAILabel = ({ disabledReason, supportLevel }: OpenShiftAILabelProps) => {
|
|
21
|
+
return (
|
|
22
|
+
<>
|
|
23
|
+
<Tooltip hidden={!disabledReason} content={disabledReason}>
|
|
24
|
+
<span>Install OpenShift AI bundle </span>
|
|
25
|
+
</Tooltip>
|
|
26
|
+
<PopoverIcon
|
|
27
|
+
component={'a'}
|
|
28
|
+
headerContent="Requirements and dependencies"
|
|
29
|
+
bodyContent={<OpenShiftAIRequirements />}
|
|
30
|
+
/>
|
|
31
|
+
<NewFeatureSupportLevelBadge featureId="OPENSHIFT_AI" supportLevel={supportLevel} />
|
|
32
|
+
</>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const OpenShiftAIHelperText = () => {
|
|
37
|
+
return (
|
|
38
|
+
<HelperText>
|
|
39
|
+
<HelperTextItem variant="indeterminate">
|
|
40
|
+
Train, serve, monitor and manage AI/ML models and applications.{' '}
|
|
41
|
+
<a href={OPENSHIFT_AI_LINK} target="_blank" rel="noopener noreferrer">
|
|
42
|
+
{'Learn more'} <ExternalLinkAltIcon />
|
|
43
|
+
</a>
|
|
44
|
+
</HelperTextItem>
|
|
45
|
+
</HelperText>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const OpenShiftAICheckbox = () => {
|
|
50
|
+
const featureSupportLevel = useNewFeatureSupportLevel();
|
|
51
|
+
const { values } = useFormikContext<OperatorsValues>();
|
|
52
|
+
const fieldId = getFieldId(OPENSHIFT_AI_FIELD_NAME, 'input');
|
|
53
|
+
const [disabledReason, setDisabledReason] = useState<string | undefined>();
|
|
54
|
+
|
|
55
|
+
React.useEffect(() => {
|
|
56
|
+
let disabledReason = featureSupportLevel.getFeatureDisabledReason('OPENSHIFT_AI');
|
|
57
|
+
if (!disabledReason) {
|
|
58
|
+
disabledReason = getOpenShiftAIIncompatibleWithLvmsReason(values);
|
|
59
|
+
}
|
|
60
|
+
setDisabledReason(disabledReason);
|
|
61
|
+
}, [values, featureSupportLevel]);
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<FormGroup isInline fieldId={fieldId}>
|
|
65
|
+
<OcmCheckboxField
|
|
66
|
+
name={OPENSHIFT_AI_FIELD_NAME}
|
|
67
|
+
label={
|
|
68
|
+
<OpenShiftAILabel
|
|
69
|
+
disabledReason={disabledReason}
|
|
70
|
+
supportLevel={featureSupportLevel.getFeatureSupportLevel('OPENSHIFT_AI')}
|
|
71
|
+
/>
|
|
72
|
+
}
|
|
73
|
+
isDisabled={!!disabledReason}
|
|
74
|
+
helperText={<OpenShiftAIHelperText />}
|
|
75
|
+
/>
|
|
76
|
+
</FormGroup>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export default OpenShiftAICheckbox;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { List, ListItem } from '@patternfly/react-core';
|
|
3
|
+
import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
4
|
+
import { OPENSHIFT_AI_REQUIREMENTS_LINK } from '../../../../common';
|
|
5
|
+
|
|
6
|
+
const OpenShiftAIRequirements = () => {
|
|
7
|
+
return (
|
|
8
|
+
<>
|
|
9
|
+
<List>
|
|
10
|
+
<ListItem>At least two worker nodes.</ListItem>
|
|
11
|
+
<ListItem>
|
|
12
|
+
Each worker node requires 32 additional GiB of memory and 8 additional CPUs.
|
|
13
|
+
</ListItem>
|
|
14
|
+
<ListItem>At least one supported GPU. Currently only NVIDIA GPUs are supported.</ListItem>
|
|
15
|
+
<ListItem>
|
|
16
|
+
Nodes that have NVIDIA GPUs installed need to have secure boot disabled.
|
|
17
|
+
</ListItem>
|
|
18
|
+
</List>
|
|
19
|
+
Bundle operators:
|
|
20
|
+
<List>
|
|
21
|
+
<ListItem>OpenShift Data Foundation</ListItem>
|
|
22
|
+
<ListItem>Node Feature Discovery</ListItem>
|
|
23
|
+
<ListItem>NVIDIA GPU</ListItem>
|
|
24
|
+
<ListItem>Pipelines</ListItem>
|
|
25
|
+
<ListItem>Service Mesh</ListItem>
|
|
26
|
+
<ListItem>Serverless</ListItem>
|
|
27
|
+
<ListItem>Authorino</ListItem>
|
|
28
|
+
</List>
|
|
29
|
+
<a href={OPENSHIFT_AI_REQUIREMENTS_LINK} target="_blank" rel="noopener noreferrer">
|
|
30
|
+
Learn more <ExternalLinkAltIcon />.
|
|
31
|
+
</a>
|
|
32
|
+
</>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default OpenShiftAIRequirements;
|