@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
|
@@ -7,11 +7,14 @@ import { ClusterImageSetK8sResource } from '../../types/k8s/cluster-image-set';
|
|
|
7
7
|
import ClusterDeploymentDetailsForm from './ClusterDeploymentDetailsForm';
|
|
8
8
|
import { useDetailsFormik } from './ClusterDeploymentDetailsStep';
|
|
9
9
|
import { ClusterDetailsFormFieldsProps } from './ClusterDetailsFormFields';
|
|
10
|
+
import { OsImage } from '../../types';
|
|
11
|
+
import { getOCPVersions } from '../helpers';
|
|
10
12
|
|
|
11
13
|
type DetailsFormBodyProps = {
|
|
12
14
|
clusterImages: ClusterImageSetK8sResource[];
|
|
13
15
|
onValuesChanged: (values: ClusterDetailsValues, initRender: boolean) => void;
|
|
14
16
|
extensionAfter: ClusterDetailsFormFieldsProps['extensionAfter'];
|
|
17
|
+
osImages?: OsImage[];
|
|
15
18
|
isNutanix?: boolean;
|
|
16
19
|
};
|
|
17
20
|
|
|
@@ -20,6 +23,7 @@ const DetailsFormBody: React.FC<DetailsFormBodyProps> = ({
|
|
|
20
23
|
clusterImages,
|
|
21
24
|
extensionAfter,
|
|
22
25
|
isNutanix,
|
|
26
|
+
osImages,
|
|
23
27
|
}) => {
|
|
24
28
|
const { values } = useFormikContext<ClusterDetailsValues>();
|
|
25
29
|
const initRenderRef = React.useRef(true);
|
|
@@ -33,6 +37,7 @@ const DetailsFormBody: React.FC<DetailsFormBodyProps> = ({
|
|
|
33
37
|
clusterImages={clusterImages}
|
|
34
38
|
extensionAfter={extensionAfter}
|
|
35
39
|
isNutanix={isNutanix}
|
|
40
|
+
osImages={osImages}
|
|
36
41
|
/>
|
|
37
42
|
);
|
|
38
43
|
};
|
|
@@ -46,13 +51,17 @@ const ACMClusterDeploymentDetailsStep: React.FC<ACMClusterDeploymentDetailsStepP
|
|
|
46
51
|
clusterImages,
|
|
47
52
|
formRef,
|
|
48
53
|
usedClusterNames,
|
|
54
|
+
osImages,
|
|
55
|
+
isNutanix,
|
|
49
56
|
...rest
|
|
50
57
|
}) => {
|
|
58
|
+
const ocpVersions = getOCPVersions(clusterImages, !!isNutanix, osImages);
|
|
59
|
+
|
|
51
60
|
const [initialValues, validationSchema] = useDetailsFormik({
|
|
52
|
-
|
|
61
|
+
ocpVersions,
|
|
53
62
|
usedClusterNames,
|
|
54
|
-
isNutanix: !!rest.isNutanix,
|
|
55
63
|
});
|
|
64
|
+
|
|
56
65
|
return (
|
|
57
66
|
<Formik
|
|
58
67
|
initialValues={initialValues}
|
|
@@ -60,7 +69,12 @@ const ACMClusterDeploymentDetailsStep: React.FC<ACMClusterDeploymentDetailsStepP
|
|
|
60
69
|
innerRef={formRef}
|
|
61
70
|
onSubmit={noop}
|
|
62
71
|
>
|
|
63
|
-
<DetailsFormBody
|
|
72
|
+
<DetailsFormBody
|
|
73
|
+
clusterImages={clusterImages}
|
|
74
|
+
osImages={osImages}
|
|
75
|
+
isNutanix={isNutanix}
|
|
76
|
+
{...rest}
|
|
77
|
+
/>
|
|
64
78
|
</Formik>
|
|
65
79
|
);
|
|
66
80
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Alert, Stack, StackItem } from '@patternfly/react-core';
|
|
3
|
-
import { AgentClusterInstallK8sResource, ClusterDeploymentK8sResource } from '../../types';
|
|
3
|
+
import { AgentClusterInstallK8sResource, ClusterDeploymentK8sResource, OsImage } from '../../types';
|
|
4
4
|
import { ClusterImageSetK8sResource } from '../../types/k8s/cluster-image-set';
|
|
5
5
|
import { getOCPVersions, getSelectedVersion } from '../helpers';
|
|
6
6
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
ClusterDetailsFormFields,
|
|
9
9
|
ClusterDetailsFormFieldsProps,
|
|
10
10
|
} from './ClusterDetailsFormFields';
|
|
11
|
+
import { useFormikContext } from 'formik';
|
|
12
|
+
import { ClusterDetailsValues, CpuArchitecture, SupportedCpuArchitecture } from '../../../common';
|
|
11
13
|
|
|
12
14
|
type ClusterDeploymentDetailsFormProps = {
|
|
13
15
|
clusterImages: ClusterImageSetK8sResource[];
|
|
@@ -15,6 +17,7 @@ type ClusterDeploymentDetailsFormProps = {
|
|
|
15
17
|
agentClusterInstall?: AgentClusterInstallK8sResource;
|
|
16
18
|
extensionAfter?: ClusterDetailsFormFieldsProps['extensionAfter'];
|
|
17
19
|
isNutanix?: boolean;
|
|
20
|
+
osImages?: OsImage[];
|
|
18
21
|
};
|
|
19
22
|
|
|
20
23
|
const ClusterDeploymentDetailsForm: React.FC<ClusterDeploymentDetailsFormProps> = ({
|
|
@@ -23,16 +26,38 @@ const ClusterDeploymentDetailsForm: React.FC<ClusterDeploymentDetailsFormProps>
|
|
|
23
26
|
clusterImages,
|
|
24
27
|
extensionAfter,
|
|
25
28
|
isNutanix,
|
|
29
|
+
osImages,
|
|
26
30
|
}) => {
|
|
31
|
+
const { t } = useTranslation();
|
|
27
32
|
const ocpVersions = React.useMemo(
|
|
28
|
-
() => getOCPVersions(clusterImages, isNutanix),
|
|
29
|
-
[clusterImages, isNutanix],
|
|
33
|
+
() => getOCPVersions(clusterImages, isNutanix, osImages),
|
|
34
|
+
[clusterImages, isNutanix, osImages],
|
|
30
35
|
);
|
|
36
|
+
|
|
31
37
|
const forceOpenshiftVersion = agentClusterInstall
|
|
32
38
|
? getSelectedVersion(clusterImages, agentClusterInstall)
|
|
33
39
|
: undefined;
|
|
34
40
|
const isEditFlow = !!clusterDeployment;
|
|
35
|
-
|
|
41
|
+
|
|
42
|
+
const { values } = useFormikContext<ClusterDetailsValues>();
|
|
43
|
+
|
|
44
|
+
const cpuArchitectures = React.useMemo(() => {
|
|
45
|
+
const cpuArchitectures = [CpuArchitecture.x86, CpuArchitecture.ARM, CpuArchitecture.s390x];
|
|
46
|
+
if (!osImages) {
|
|
47
|
+
return cpuArchitectures;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const openshiftVersion = ocpVersions
|
|
51
|
+
.find((ver) => ver.value === values.openshiftVersion)
|
|
52
|
+
?.version.split('.')
|
|
53
|
+
.slice(0, 2)
|
|
54
|
+
.join('.');
|
|
55
|
+
|
|
56
|
+
return osImages
|
|
57
|
+
.filter((osImage) => osImage.openshiftVersion === openshiftVersion)
|
|
58
|
+
.map((osImage) => osImage.cpuArchitecture as SupportedCpuArchitecture);
|
|
59
|
+
}, [osImages, ocpVersions, values.openshiftVersion]);
|
|
60
|
+
|
|
36
61
|
return (
|
|
37
62
|
<Stack hasGutter>
|
|
38
63
|
{isEditFlow && (
|
|
@@ -51,6 +76,7 @@ const ClusterDeploymentDetailsForm: React.FC<ClusterDeploymentDetailsFormProps>
|
|
|
51
76
|
forceOpenshiftVersion={forceOpenshiftVersion}
|
|
52
77
|
extensionAfter={extensionAfter}
|
|
53
78
|
isNutanix={isNutanix}
|
|
79
|
+
cpuArchitectures={cpuArchitectures}
|
|
54
80
|
/>
|
|
55
81
|
</StackItem>
|
|
56
82
|
</Stack>
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
ClusterDetailsValues,
|
|
12
12
|
useFeatureSupportLevel,
|
|
13
13
|
getRichTextValidation,
|
|
14
|
+
OpenshiftVersionOptionType,
|
|
14
15
|
} from '../../../common';
|
|
15
16
|
|
|
16
17
|
import { ClusterDeploymentDetailsStepProps, ClusterDeploymentDetailsValues } from './types';
|
|
@@ -25,35 +26,33 @@ import {
|
|
|
25
26
|
InfraEnvK8sResource,
|
|
26
27
|
} from '../../types';
|
|
27
28
|
import ClusterDeploymentDetailsForm from './ClusterDeploymentDetailsForm';
|
|
28
|
-
import { ClusterImageSetK8sResource } from '../../types/k8s/cluster-image-set';
|
|
29
29
|
import { isCIMFlow, getGridSpans } from './helpers';
|
|
30
30
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
31
31
|
|
|
32
32
|
type UseDetailsFormikArgs = {
|
|
33
|
-
clusterImages: ClusterImageSetK8sResource[];
|
|
34
33
|
usedClusterNames: string[];
|
|
34
|
+
ocpVersions: OpenshiftVersionOptionType[];
|
|
35
35
|
clusterDeployment?: ClusterDeploymentK8sResource;
|
|
36
36
|
agentClusterInstall?: AgentClusterInstallK8sResource;
|
|
37
37
|
agents?: AgentK8sResource[];
|
|
38
38
|
infraEnv?: InfraEnvK8sResource;
|
|
39
|
-
isNutanix: boolean;
|
|
40
39
|
};
|
|
41
40
|
|
|
42
41
|
export const useDetailsFormik = ({
|
|
43
42
|
clusterDeployment,
|
|
44
43
|
agentClusterInstall,
|
|
45
44
|
agents,
|
|
46
|
-
clusterImages,
|
|
47
45
|
usedClusterNames,
|
|
48
46
|
infraEnv,
|
|
49
|
-
|
|
47
|
+
ocpVersions,
|
|
50
48
|
}: UseDetailsFormikArgs): [
|
|
51
49
|
ClusterDetailsValues & { networkType: 'OpenShiftSDN' | 'OVNKubernetes' },
|
|
52
50
|
Lazy<{ baseDnsDomain: string }>,
|
|
53
51
|
] => {
|
|
54
52
|
const { t } = useTranslation();
|
|
55
53
|
const featureSupportLevels = useFeatureSupportLevel();
|
|
56
|
-
const
|
|
54
|
+
const isEdit = !!clusterDeployment || !!agentClusterInstall;
|
|
55
|
+
|
|
57
56
|
const cluster = React.useMemo(
|
|
58
57
|
() =>
|
|
59
58
|
clusterDeployment && agentClusterInstall
|
|
@@ -66,6 +65,7 @@ export const useDetailsFormik = ({
|
|
|
66
65
|
: undefined,
|
|
67
66
|
[agentClusterInstall, clusterDeployment, agents, infraEnv],
|
|
68
67
|
);
|
|
68
|
+
|
|
69
69
|
const initialValues = React.useMemo(
|
|
70
70
|
() => {
|
|
71
71
|
const initValues = getClusterDetailsInitialValues({
|
|
@@ -85,7 +85,6 @@ export const useDetailsFormik = ({
|
|
|
85
85
|
[], // eslint-disable-line react-hooks/exhaustive-deps
|
|
86
86
|
);
|
|
87
87
|
|
|
88
|
-
const isEdit = !!clusterDeployment || !!agentClusterInstall;
|
|
89
88
|
const validationSchema = React.useMemo(
|
|
90
89
|
() =>
|
|
91
90
|
getClusterDetailsValidationSchema({
|
|
@@ -117,14 +116,15 @@ const ClusterDeploymentDetailsStep: React.FC<ClusterDeploymentDetailsStepProps>
|
|
|
117
116
|
const { addAlert } = useAlerts();
|
|
118
117
|
const { setCurrentStepId } = React.useContext(ClusterDeploymentWizardContext);
|
|
119
118
|
const { t } = useTranslation();
|
|
119
|
+
const ocpVersions = getOCPVersions(clusterImages, isNutanix);
|
|
120
|
+
|
|
120
121
|
const [initialValues, validationSchema] = useDetailsFormik({
|
|
121
122
|
clusterDeployment,
|
|
123
|
+
ocpVersions,
|
|
122
124
|
agentClusterInstall,
|
|
123
125
|
agents,
|
|
124
|
-
clusterImages,
|
|
125
126
|
usedClusterNames,
|
|
126
127
|
infraEnv,
|
|
127
|
-
isNutanix,
|
|
128
128
|
});
|
|
129
129
|
const next = () =>
|
|
130
130
|
isCIMFlow(clusterDeployment)
|
|
@@ -16,13 +16,13 @@ import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
|
16
16
|
import CpuArchitectureDropdown from '../common/CpuArchitectureDropdown';
|
|
17
17
|
import { SNOControlGroup } from '../../../common';
|
|
18
18
|
import { getNetworkType } from '../helpers';
|
|
19
|
-
|
|
20
19
|
export type ClusterDetailsFormFieldsProps = {
|
|
21
20
|
isEditFlow: boolean;
|
|
22
21
|
forceOpenshiftVersion?: string;
|
|
23
22
|
extensionAfter?: { [key: string]: React.ReactElement };
|
|
24
23
|
versions: OpenshiftVersionOptionType[];
|
|
25
24
|
isNutanix?: boolean;
|
|
25
|
+
cpuArchitectures?: string[];
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
export const BaseDnsHelperText: React.FC<{ name?: string; baseDnsDomain?: string }> = ({
|
|
@@ -49,6 +49,7 @@ export const ClusterDetailsFormFields: React.FC<ClusterDetailsFormFieldsProps> =
|
|
|
49
49
|
forceOpenshiftVersion,
|
|
50
50
|
extensionAfter,
|
|
51
51
|
isNutanix,
|
|
52
|
+
cpuArchitectures,
|
|
52
53
|
}) => {
|
|
53
54
|
const { values, setFieldValue } = useFormikContext<ClusterDetailsValues>();
|
|
54
55
|
const { name, baseDnsDomain, highAvailabilityMode } = values;
|
|
@@ -112,7 +113,7 @@ export const ClusterDetailsFormFields: React.FC<ClusterDetailsFormFieldsProps> =
|
|
|
112
113
|
{!isNutanix && (
|
|
113
114
|
<>
|
|
114
115
|
<SNOControlGroup versions={versions} highAvailabilityMode={highAvailabilityMode} />
|
|
115
|
-
<CpuArchitectureDropdown isDisabled={isEditFlow} />
|
|
116
|
+
<CpuArchitectureDropdown isDisabled={isEditFlow} cpuArchitectures={cpuArchitectures} />
|
|
116
117
|
</>
|
|
117
118
|
)}
|
|
118
119
|
{extensionAfter?.['openshiftVersion'] && extensionAfter['openshiftVersion']}
|
|
@@ -169,6 +169,16 @@ const EnvironmentDetails: React.FC<EnvironmentDetailsProps> = ({
|
|
|
169
169
|
.label ?? CpuArchitecture.x86}
|
|
170
170
|
</DescriptionListDescription>
|
|
171
171
|
</DescriptionListGroup>
|
|
172
|
+
|
|
173
|
+
{infraEnv.spec?.osImageVersion && (
|
|
174
|
+
<DescriptionListGroup>
|
|
175
|
+
<DescriptionListTerm>{t('ai:OpenShift version')}</DescriptionListTerm>
|
|
176
|
+
<DescriptionListDescription>
|
|
177
|
+
{`OpenShift ${infraEnv.spec?.osImageVersion}`}
|
|
178
|
+
</DescriptionListDescription>
|
|
179
|
+
</DescriptionListGroup>
|
|
180
|
+
)}
|
|
181
|
+
|
|
172
182
|
<DescriptionListGroup>
|
|
173
183
|
<DescriptionListTerm>{t('ai:Labels')}</DescriptionListTerm>
|
|
174
184
|
<DescriptionListDescription>
|
|
@@ -49,6 +49,8 @@ import { getErrorMessage } from '../../../common/utils';
|
|
|
49
49
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
50
50
|
import { TFunction } from 'i18next';
|
|
51
51
|
import CpuArchitectureDropdown from '../common/CpuArchitectureDropdown';
|
|
52
|
+
import OpenshiftVersionDropdown from './OpenshiftVersionDropdown';
|
|
53
|
+
import { OsImage } from '../../types';
|
|
52
54
|
|
|
53
55
|
export type EnvironmentStepFormValues = {
|
|
54
56
|
name: string;
|
|
@@ -67,6 +69,7 @@ export type EnvironmentStepFormValues = {
|
|
|
67
69
|
>;
|
|
68
70
|
enableNtpSources: boolean;
|
|
69
71
|
additionalNtpSources: string;
|
|
72
|
+
osImageVersion?: string;
|
|
70
73
|
};
|
|
71
74
|
|
|
72
75
|
const validationSchema = (usedNames: string[], t: TFunction) =>
|
|
@@ -116,6 +119,7 @@ const initialValues: EnvironmentStepFormValues = {
|
|
|
116
119
|
cpuArchitecture: CpuArchitecture.x86,
|
|
117
120
|
enableNtpSources: false,
|
|
118
121
|
additionalNtpSources: '',
|
|
122
|
+
osImageVersion: '',
|
|
119
123
|
};
|
|
120
124
|
|
|
121
125
|
type InfraEnvFormProps = {
|
|
@@ -123,6 +127,7 @@ type InfraEnvFormProps = {
|
|
|
123
127
|
pullSecret?: string;
|
|
124
128
|
sshPublicKey?: string;
|
|
125
129
|
docVersion: string;
|
|
130
|
+
osImages?: OsImage[];
|
|
126
131
|
};
|
|
127
132
|
|
|
128
133
|
const InfraEnvForm: React.FC<InfraEnvFormProps> = ({
|
|
@@ -131,6 +136,7 @@ const InfraEnvForm: React.FC<InfraEnvFormProps> = ({
|
|
|
131
136
|
pullSecret,
|
|
132
137
|
sshPublicKey,
|
|
133
138
|
docVersion,
|
|
139
|
+
osImages,
|
|
134
140
|
}) => {
|
|
135
141
|
const { values, setFieldValue } = useFormikContext<EnvironmentStepFormValues>();
|
|
136
142
|
const { t } = useTranslation();
|
|
@@ -222,6 +228,7 @@ const InfraEnvForm: React.FC<InfraEnvFormProps> = ({
|
|
|
222
228
|
</Flex>
|
|
223
229
|
</FormGroup>
|
|
224
230
|
<CpuArchitectureDropdown />
|
|
231
|
+
{!!osImages && <OpenshiftVersionDropdown osImages={osImages} />}
|
|
225
232
|
<RichInputField
|
|
226
233
|
label={t('ai:Location')}
|
|
227
234
|
name="location"
|
|
@@ -276,6 +283,7 @@ type InfraEnvFormPageProps = InfraEnvFormProps & {
|
|
|
276
283
|
pullSecret?: string;
|
|
277
284
|
sshPublicKey?: string;
|
|
278
285
|
docVersion: string;
|
|
286
|
+
osImages?: OsImage[];
|
|
279
287
|
};
|
|
280
288
|
|
|
281
289
|
export const InfraEnvFormPage: React.FC<InfraEnvFormPageProps> = ({
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Dropdown, DropdownItem, DropdownToggle } from '@patternfly/react-core/deprecated';
|
|
3
|
+
import { FormGroup, Tooltip } from '@patternfly/react-core';
|
|
4
|
+
import { useField } from 'formik';
|
|
5
|
+
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
6
|
+
import { architectureData, getFieldId, SupportedCpuArchitecture } from '../../../common';
|
|
7
|
+
import { OsImage } from '../../types';
|
|
8
|
+
|
|
9
|
+
const OpenshiftVersionDropdown = ({ osImages }: { osImages: OsImage[] }) => {
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
const [{ name, value }, , { setValue }] = useField<string>('osImageVersion');
|
|
12
|
+
const [{ value: cpuArchitecture }] = useField<string>('cpuArchitecture');
|
|
13
|
+
const [osImageOpen, setOsImageOpen] = React.useState(false);
|
|
14
|
+
const fieldId = getFieldId(name, 'input');
|
|
15
|
+
|
|
16
|
+
const onOsImageSelect = (e?: React.SyntheticEvent<HTMLDivElement>) => {
|
|
17
|
+
const val = e?.currentTarget.id || '';
|
|
18
|
+
setValue(val);
|
|
19
|
+
setOsImageOpen(false);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const filteredImages = React.useMemo(
|
|
23
|
+
() => osImages.filter((image) => image.cpuArchitecture === cpuArchitecture),
|
|
24
|
+
[osImages, cpuArchitecture],
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
React.useEffect(() => {
|
|
28
|
+
if (filteredImages.length === 0 && value !== '') {
|
|
29
|
+
setValue('');
|
|
30
|
+
}
|
|
31
|
+
}, [filteredImages.length, setValue, t, value]);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<FormGroup isInline fieldId={fieldId} label={t('ai:OpenShift version')}>
|
|
35
|
+
<Tooltip
|
|
36
|
+
content={t(
|
|
37
|
+
'ai:No OpenShift images available for selected CPU architecture {{cpuArchitecture}}.',
|
|
38
|
+
architectureData[cpuArchitecture as SupportedCpuArchitecture].label,
|
|
39
|
+
)}
|
|
40
|
+
hidden={!!filteredImages.length}
|
|
41
|
+
>
|
|
42
|
+
<Dropdown
|
|
43
|
+
toggle={
|
|
44
|
+
<DropdownToggle
|
|
45
|
+
onToggle={() => setOsImageOpen(!osImageOpen)}
|
|
46
|
+
className="pf-u-w-100"
|
|
47
|
+
isDisabled={!filteredImages.length}
|
|
48
|
+
>
|
|
49
|
+
{value ? `OpenShift ${value}` : t('ai:No version selected')}
|
|
50
|
+
</DropdownToggle>
|
|
51
|
+
}
|
|
52
|
+
name="osImageVersion"
|
|
53
|
+
isOpen={osImageOpen}
|
|
54
|
+
onSelect={onOsImageSelect}
|
|
55
|
+
dropdownItems={[
|
|
56
|
+
<DropdownItem key={'NO_VALUE'} value={''}>
|
|
57
|
+
{t('ai:No version selected')}
|
|
58
|
+
</DropdownItem>,
|
|
59
|
+
...filteredImages.map((image) => (
|
|
60
|
+
<DropdownItem key={image.openshiftVersion} id={image.openshiftVersion}>
|
|
61
|
+
{`OpenShift ${image.openshiftVersion}`}
|
|
62
|
+
</DropdownItem>
|
|
63
|
+
)),
|
|
64
|
+
]}
|
|
65
|
+
className="pf-u-w-100"
|
|
66
|
+
/>
|
|
67
|
+
</Tooltip>
|
|
68
|
+
</FormGroup>
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export default OpenshiftVersionDropdown;
|
|
@@ -12,9 +12,35 @@ import {
|
|
|
12
12
|
import { useField } from 'formik';
|
|
13
13
|
import { useFormikHelpers } from '../../../common/hooks/useFormikHelpers';
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const allDropdownItems = {
|
|
16
|
+
[CpuArchitecture.x86]: (
|
|
17
|
+
<DropdownItem key={'x86_64'} id="x86_64" description={architectureData['x86_64'].description}>
|
|
18
|
+
{architectureData['x86_64'].label}
|
|
19
|
+
</DropdownItem>
|
|
20
|
+
),
|
|
21
|
+
[CpuArchitecture.ARM]: (
|
|
22
|
+
<DropdownItem key={'arm64'} id="arm64" description={architectureData['arm64'].description}>
|
|
23
|
+
{architectureData['arm64'].label}
|
|
24
|
+
</DropdownItem>
|
|
25
|
+
),
|
|
26
|
+
[CpuArchitecture.s390x]: (
|
|
27
|
+
<DropdownItem key={'s390x'} id="s390x" description={architectureData['s390x'].description}>
|
|
28
|
+
{architectureData['s390x'].label}
|
|
29
|
+
</DropdownItem>
|
|
30
|
+
),
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const CpuArchitectureDropdown = ({
|
|
34
|
+
isDisabled = false,
|
|
35
|
+
cpuArchitectures,
|
|
36
|
+
}: {
|
|
37
|
+
isDisabled?: boolean;
|
|
38
|
+
cpuArchitectures?: string[];
|
|
39
|
+
}) => {
|
|
16
40
|
const { t } = useTranslation();
|
|
17
|
-
const [{ name, value }, , { setValue }] = useField<SupportedCpuArchitecture>(
|
|
41
|
+
const [{ name, value }, , { setValue }] = useField<SupportedCpuArchitecture | ''>(
|
|
42
|
+
'cpuArchitecture',
|
|
43
|
+
);
|
|
18
44
|
const [cpuArchOpen, setCpuArchOpen] = React.useState(false);
|
|
19
45
|
const fieldId = getFieldId(name, 'input');
|
|
20
46
|
const { setValue: setUserManagedNetworking } = useFormikHelpers<boolean>('userManagedNetworking');
|
|
@@ -27,8 +53,24 @@ const CpuArchitectureDropdown = ({ isDisabled = false }: { isDisabled?: boolean
|
|
|
27
53
|
setCpuArchOpen(false);
|
|
28
54
|
};
|
|
29
55
|
|
|
56
|
+
const dropdownItems = React.useMemo(() => {
|
|
57
|
+
if (!cpuArchitectures) {
|
|
58
|
+
return Object.values(allDropdownItems);
|
|
59
|
+
} else {
|
|
60
|
+
return Object.entries(allDropdownItems)
|
|
61
|
+
.filter(([key, _]) => cpuArchitectures.includes(key))
|
|
62
|
+
.map(([_, val]) => val);
|
|
63
|
+
}
|
|
64
|
+
}, [cpuArchitectures]);
|
|
65
|
+
|
|
66
|
+
React.useEffect(() => {
|
|
67
|
+
if (!isDisabled && value !== '' && cpuArchitectures && !cpuArchitectures?.includes(value)) {
|
|
68
|
+
setValue('');
|
|
69
|
+
}
|
|
70
|
+
}, [cpuArchitectures, isDisabled, setValue, value]);
|
|
71
|
+
|
|
30
72
|
return !isDisabled ? (
|
|
31
|
-
<FormGroup isInline fieldId={fieldId} label={t('ai:CPU architecture')}
|
|
73
|
+
<FormGroup isInline fieldId={fieldId} label={t('ai:CPU architecture')} isRequired>
|
|
32
74
|
<Dropdown
|
|
33
75
|
toggle={
|
|
34
76
|
<DropdownToggle onToggle={() => setCpuArchOpen(!cpuArchOpen)} className="pf-u-w-100">
|
|
@@ -38,35 +80,13 @@ const CpuArchitectureDropdown = ({ isDisabled = false }: { isDisabled?: boolean
|
|
|
38
80
|
name="cpuArchitecture"
|
|
39
81
|
isOpen={cpuArchOpen}
|
|
40
82
|
onSelect={onCpuArchSelect}
|
|
41
|
-
dropdownItems={
|
|
42
|
-
<DropdownItem
|
|
43
|
-
key={'x86_64'}
|
|
44
|
-
id="x86_64"
|
|
45
|
-
description={architectureData['x86_64'].description}
|
|
46
|
-
>
|
|
47
|
-
{architectureData['x86_64'].label}
|
|
48
|
-
</DropdownItem>,
|
|
49
|
-
<DropdownItem
|
|
50
|
-
key={'arm64'}
|
|
51
|
-
id="arm64"
|
|
52
|
-
description={architectureData['arm64'].description}
|
|
53
|
-
>
|
|
54
|
-
{architectureData['arm64'].label}
|
|
55
|
-
</DropdownItem>,
|
|
56
|
-
<DropdownItem
|
|
57
|
-
key={'s390x'}
|
|
58
|
-
id="s390x"
|
|
59
|
-
description={architectureData['s390x'].description}
|
|
60
|
-
>
|
|
61
|
-
{architectureData['s390x'].label}
|
|
62
|
-
</DropdownItem>,
|
|
63
|
-
]}
|
|
83
|
+
dropdownItems={dropdownItems}
|
|
64
84
|
className="pf-u-w-100"
|
|
65
85
|
/>
|
|
66
86
|
</FormGroup>
|
|
67
87
|
) : (
|
|
68
88
|
<StaticField name={'cpuArchitecture'} label={t('ai:CPU architecture')} isRequired>
|
|
69
|
-
{architectureData[value].label}
|
|
89
|
+
{architectureData[value as SupportedCpuArchitecture].label}
|
|
70
90
|
</StaticField>
|
|
71
91
|
);
|
|
72
92
|
};
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
AgentClusterInstallK8sResource,
|
|
5
5
|
ClusterImageSetK8sResource,
|
|
6
6
|
ClusterVersionK8sResource,
|
|
7
|
+
OsImage,
|
|
7
8
|
} from '../../types';
|
|
8
9
|
import { OpenshiftVersionOptionType } from '../../../common';
|
|
9
10
|
import { OpenshiftVersion } from '@openshift-assisted/types/assisted-installer-service';
|
|
@@ -51,7 +52,12 @@ export const isValidImageSet = (cis: ClusterImageSetK8sResource, architectures?:
|
|
|
51
52
|
export const getOCPVersions = (
|
|
52
53
|
clusterImageSets: ClusterImageSetK8sResource[],
|
|
53
54
|
isNutanix?: boolean | undefined,
|
|
55
|
+
osImages?: OsImage[],
|
|
54
56
|
): OpenshiftVersionOptionType[] => {
|
|
57
|
+
const ocpImageVersions = Array.from(
|
|
58
|
+
new Set(osImages?.map((osImage) => osImage.openshiftVersion)),
|
|
59
|
+
);
|
|
60
|
+
|
|
55
61
|
const versions = clusterImageSets
|
|
56
62
|
.filter((clusterImageSet) =>
|
|
57
63
|
isValidImageSet(clusterImageSet, isNutanix ? supportedNutanixPlatforms : undefined),
|
|
@@ -67,6 +73,10 @@ export const getOCPVersions = (
|
|
|
67
73
|
supportLevel: 'production', // getSupportLevelFromChannel(clusterImageSet.metadata?.labels?.channel),
|
|
68
74
|
};
|
|
69
75
|
})
|
|
76
|
+
.filter((ocpVersion) => {
|
|
77
|
+
const ver = ocpVersion.version.split('.').slice(0, 2).join('.');
|
|
78
|
+
return !!ocpImageVersions.length ? ocpImageVersions.includes(ver) : true;
|
|
79
|
+
})
|
|
70
80
|
.sort(
|
|
71
81
|
(versionA, versionB) => /* descending */ -1 * versionA.label.localeCompare(versionB.label),
|
|
72
82
|
);
|
|
@@ -75,6 +85,7 @@ export const getOCPVersions = (
|
|
|
75
85
|
// make sure that the pre-selected one is the first-one after sorting
|
|
76
86
|
versions[0].default = true;
|
|
77
87
|
}
|
|
88
|
+
|
|
78
89
|
const deduped = uniqBy(versions, (v) => v.version);
|
|
79
90
|
return deduped;
|
|
80
91
|
};
|
|
@@ -86,6 +97,7 @@ export const getSelectedVersion = (
|
|
|
86
97
|
const selectedClusterImage = clusterImages.find(
|
|
87
98
|
(ci) => ci.metadata?.name === agentClusterInstall?.spec?.imageSetRef?.name,
|
|
88
99
|
);
|
|
100
|
+
|
|
89
101
|
return selectedClusterImage
|
|
90
102
|
? getOCPVersions([selectedClusterImage])?.[0]?.version
|
|
91
103
|
: agentClusterInstall?.spec?.imageSetRef?.name;
|
|
@@ -11,6 +11,13 @@ type StorageConfig = {
|
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
+
export type OsImage = {
|
|
15
|
+
cpuArchitecture: string;
|
|
16
|
+
openshiftVersion: string;
|
|
17
|
+
url: string;
|
|
18
|
+
version: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
14
21
|
export type AgentServiceConfigConditionType = 'DeploymentsHealthy' | 'ReconcileCompleted';
|
|
15
22
|
|
|
16
23
|
export type AgentServiceConfigK8sResource = K8sResourceCommon & {
|
|
@@ -18,6 +25,7 @@ export type AgentServiceConfigK8sResource = K8sResourceCommon & {
|
|
|
18
25
|
databaseStorage: StorageConfig;
|
|
19
26
|
filesystemStorage: StorageConfig;
|
|
20
27
|
imageStorage: StorageConfig;
|
|
28
|
+
osImages?: OsImage[];
|
|
21
29
|
};
|
|
22
30
|
status?: {
|
|
23
31
|
conditions?: StatusCondition<AgentServiceConfigConditionType>[];
|
|
@@ -24,6 +24,7 @@ export type InfraEnvK8sResource = K8sResourceCommon & {
|
|
|
24
24
|
nmStateConfigLabelSelector?: Selector;
|
|
25
25
|
additionalNTPSources?: string[];
|
|
26
26
|
cpuArchitecture?: 'x86_64' | 'arm64' | 's390x';
|
|
27
|
+
osImageVersion?: string;
|
|
27
28
|
};
|
|
28
29
|
status?: {
|
|
29
30
|
agentLabelSelector?: Selector;
|
|
@@ -81,6 +81,7 @@ export const getClusterDetailsInitialValues = ({
|
|
|
81
81
|
platform: cluster?.platform?.type || 'none',
|
|
82
82
|
customOpenshiftSelect: null,
|
|
83
83
|
userManagedNetworking: cluster?.userManagedNetworking || false,
|
|
84
|
+
controlPlaneCount: cluster?.controlPlaneCount?.toString() || '3',
|
|
84
85
|
};
|
|
85
86
|
};
|
|
86
87
|
|
|
@@ -34,6 +34,7 @@ export type ClusterDetailsValues = {
|
|
|
34
34
|
platform: PlatformType;
|
|
35
35
|
customOpenshiftSelect: OpenshiftVersionOptionType | null;
|
|
36
36
|
userManagedNetworking: boolean;
|
|
37
|
+
controlPlaneCount: string;
|
|
37
38
|
};
|
|
38
39
|
|
|
39
40
|
export type HostsValidationsProps<S extends string, V extends string[]> = {
|
|
@@ -57,7 +57,6 @@ const HostStatusPopoverContent: React.FC<HostStatusPopoverContentProps> = ({
|
|
|
57
57
|
const { host } = props;
|
|
58
58
|
const { status, statusInfo } = host;
|
|
59
59
|
const { t } = useTranslation();
|
|
60
|
-
|
|
61
60
|
if (['installing-in-progress'].includes(status)) {
|
|
62
61
|
return (
|
|
63
62
|
<TextContent>
|
|
@@ -141,7 +140,7 @@ const HostStatusPopoverContent: React.FC<HostStatusPopoverContentProps> = ({
|
|
|
141
140
|
<Text>{details}</Text>
|
|
142
141
|
</TextContent>
|
|
143
142
|
)}
|
|
144
|
-
<HostValidationGroups {...props} />
|
|
143
|
+
<HostValidationGroups openshiftVersion={openshiftVersion} {...props} />
|
|
145
144
|
</StackItem>
|
|
146
145
|
</Stack>
|
|
147
146
|
);
|