@openshift-assisted/ui-lib 2.36.4 → 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.
Files changed (166) hide show
  1. package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts +2 -0
  2. package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts.map +1 -1
  3. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts +2 -1
  4. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts.map +1 -1
  5. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts +3 -5
  6. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts.map +1 -1
  7. package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts +1 -0
  8. package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
  9. package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts +1 -1
  10. package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts.map +1 -1
  11. package/build/@types/cim/components/InfraEnv/EnvironmentDetails.d.ts.map +1 -1
  12. package/build/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts +4 -0
  13. package/build/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts.map +1 -1
  14. package/build/@types/cim/components/InfraEnv/OpenshiftVersionDropdown.d.ts +7 -0
  15. package/build/@types/cim/components/InfraEnv/OpenshiftVersionDropdown.d.ts.map +1 -0
  16. package/build/@types/cim/components/common/CpuArchitectureDropdown.d.ts +2 -1
  17. package/build/@types/cim/components/common/CpuArchitectureDropdown.d.ts.map +1 -1
  18. package/build/@types/cim/components/helpers/versions.d.ts +2 -2
  19. package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
  20. package/build/@types/cim/types/k8s/agent-service-config.d.ts +7 -0
  21. package/build/@types/cim/types/k8s/agent-service-config.d.ts.map +1 -1
  22. package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts +1 -0
  23. package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts.map +1 -1
  24. package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
  25. package/build/@types/common/components/clusterWizard/types.d.ts +1 -0
  26. package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
  27. package/build/@types/common/components/hosts/HostStatus.d.ts.map +1 -1
  28. package/build/@types/common/components/hosts/HostValidationGroups.d.ts +2 -1
  29. package/build/@types/common/components/hosts/HostValidationGroups.d.ts.map +1 -1
  30. package/build/@types/common/config/constants.d.ts +35 -0
  31. package/build/@types/common/config/constants.d.ts.map +1 -1
  32. package/build/@types/common/config/docs_links.d.ts +5 -0
  33. package/build/@types/common/config/docs_links.d.ts.map +1 -1
  34. package/build/@types/common/types/clusters.d.ts +2 -0
  35. package/build/@types/common/types/clusters.d.ts.map +1 -1
  36. package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts +9 -0
  37. package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -0
  38. package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
  39. package/build/@types/ocm/components/clusterConfiguration/operators/CnvCheckbox.d.ts.map +1 -1
  40. package/build/@types/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.d.ts.map +1 -1
  41. package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.d.ts +4 -0
  42. package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.d.ts.map +1 -0
  43. package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.d.ts +4 -0
  44. package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.d.ts.map +1 -0
  45. package/build/@types/ocm/components/clusterConfiguration/operators/OscCheckbox.d.ts +4 -0
  46. package/build/@types/ocm/components/clusterConfiguration/operators/OscCheckbox.d.ts.map +1 -0
  47. package/build/@types/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.d.ts.map +1 -1
  48. package/build/@types/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.d.ts.map +1 -1
  49. package/build/@types/ocm/components/clusterDetail/ClusterDetailsButtonGroup.d.ts.map +1 -1
  50. package/build/@types/ocm/components/clusterWizard/Operators.d.ts.map +1 -1
  51. package/build/@types/ocm/components/clusterWizard/OperatorsStep.d.ts.map +1 -1
  52. package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts +1 -1
  53. package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts.map +1 -1
  54. package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts +2 -0
  55. package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts.map +1 -1
  56. package/build/@types/ocm/services/ClusterDetailsService.d.ts.map +1 -1
  57. package/build/@types/ocm/services/OperatorsService.d.ts.map +1 -1
  58. package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -0
  59. package/build/@types/ocm/store/slices/current-cluster/slice.d.ts.map +1 -1
  60. package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js +7 -6
  61. package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js.map +1 -1
  62. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js +19 -4
  63. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +1 -1
  64. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js +4 -5
  65. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +1 -1
  66. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +2 -2
  67. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
  68. package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js +10 -7
  69. package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js.map +1 -1
  70. package/build/cjs/cim/components/InfraEnv/InfraEnvFormPage.js +4 -1
  71. package/build/cjs/cim/components/InfraEnv/InfraEnvFormPage.js.map +1 -1
  72. package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js +35 -0
  73. package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js.map +1 -0
  74. package/build/cjs/cim/components/common/CpuArchitectureDropdown.js +23 -7
  75. package/build/cjs/cim/components/common/CpuArchitectureDropdown.js.map +1 -1
  76. package/build/cjs/cim/components/helpers/versions.js +6 -1
  77. package/build/cjs/cim/components/helpers/versions.js.map +1 -1
  78. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +2 -1
  79. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
  80. package/build/cjs/common/components/hosts/HostStatus.js +1 -1
  81. package/build/cjs/common/components/hosts/HostStatus.js.map +1 -1
  82. package/build/cjs/common/components/hosts/HostValidationGroups.js +27 -5
  83. package/build/cjs/common/components/hosts/HostValidationGroups.js.map +1 -1
  84. package/build/cjs/common/components/hosts/utils.js +1 -1
  85. package/build/cjs/common/components/hosts/utils.js.map +1 -1
  86. package/build/cjs/common/components/ui/formik/LabelField.css +5 -0
  87. package/build/cjs/common/config/constants.js +49 -1
  88. package/build/cjs/common/config/constants.js.map +1 -1
  89. package/build/cjs/common/config/docs_links.js +7 -1
  90. package/build/cjs/common/config/docs_links.js.map +1 -1
  91. package/build/cjs/common/types/clusters.js.map +1 -1
  92. package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +67 -0
  93. package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -0
  94. package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +5 -5
  95. package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
  96. package/build/cjs/ocm/components/clusterConfiguration/operators/CnvCheckbox.js +3 -0
  97. package/build/cjs/ocm/components/clusterConfiguration/operators/CnvCheckbox.js.map +1 -1
  98. package/build/cjs/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.js +3 -1
  99. package/build/cjs/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.js.map +1 -1
  100. package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.js +48 -0
  101. package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.js.map +1 -0
  102. package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.js +30 -0
  103. package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.js.map +1 -0
  104. package/build/cjs/ocm/components/clusterConfiguration/operators/OscCheckbox.js +47 -0
  105. package/build/cjs/ocm/components/clusterConfiguration/operators/OscCheckbox.js.map +1 -0
  106. package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js +0 -2
  107. package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js.map +1 -1
  108. package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.js +7 -2
  109. package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.js.map +1 -1
  110. package/build/cjs/ocm/components/clusterDetail/ClusterDetailsButtonGroup.js +8 -6
  111. package/build/cjs/ocm/components/clusterDetail/ClusterDetailsButtonGroup.js.map +1 -1
  112. package/build/cjs/ocm/components/clusterWizard/Operators.js +2 -0
  113. package/build/cjs/ocm/components/clusterWizard/Operators.js.map +1 -1
  114. package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js +6 -1
  115. package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js.map +1 -1
  116. package/build/cjs/ocm/components/clusterWizard/wizardTransition.js +8 -1
  117. package/build/cjs/ocm/components/clusterWizard/wizardTransition.js.map +1 -1
  118. package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +51 -1
  119. package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js.map +1 -1
  120. package/build/cjs/ocm/services/ClusterDetailsService.js +2 -1
  121. package/build/cjs/ocm/services/ClusterDetailsService.js.map +1 -1
  122. package/build/cjs/ocm/services/OperatorsService.js +12 -4
  123. package/build/cjs/ocm/services/OperatorsService.js.map +1 -1
  124. package/lib/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.tsx +17 -3
  125. package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.tsx +30 -4
  126. package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.tsx +9 -9
  127. package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +3 -2
  128. package/lib/cim/components/InfraEnv/EnvironmentDetails.tsx +10 -0
  129. package/lib/cim/components/InfraEnv/InfraEnvFormPage.tsx +8 -0
  130. package/lib/cim/components/InfraEnv/OpenshiftVersionDropdown.tsx +72 -0
  131. package/lib/cim/components/common/CpuArchitectureDropdown.tsx +47 -27
  132. package/lib/cim/components/helpers/versions.ts +12 -0
  133. package/lib/cim/types/k8s/agent-service-config.ts +8 -0
  134. package/lib/cim/types/k8s/infra-env-k8s-resource.ts +1 -0
  135. package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +1 -0
  136. package/lib/common/components/clusterWizard/types.ts +1 -0
  137. package/lib/common/components/hosts/HostStatus.tsx +1 -2
  138. package/lib/common/components/hosts/HostValidationGroups.tsx +52 -5
  139. package/lib/common/components/hosts/utils.ts +1 -1
  140. package/lib/common/components/ui/formik/LabelField.css +5 -0
  141. package/lib/common/config/constants.ts +48 -0
  142. package/lib/common/config/docs_links.ts +16 -0
  143. package/lib/common/types/clusters.ts +2 -0
  144. package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +142 -0
  145. package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +11 -9
  146. package/lib/ocm/components/clusterConfiguration/operators/CnvCheckbox.tsx +7 -1
  147. package/lib/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.tsx +2 -1
  148. package/lib/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.tsx +80 -0
  149. package/lib/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.tsx +36 -0
  150. package/lib/ocm/components/clusterConfiguration/operators/OscCheckbox.tsx +88 -0
  151. package/lib/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.ts +0 -2
  152. package/lib/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.ts +0 -1
  153. package/lib/ocm/components/clusterDetail/ClusterDetailsButtonGroup.tsx +14 -10
  154. package/lib/ocm/components/clusterWizard/Operators.tsx +4 -0
  155. package/lib/ocm/components/clusterWizard/OperatorsStep.tsx +8 -1
  156. package/lib/ocm/components/clusterWizard/_wizardTransition.test.ts +35 -0
  157. package/lib/ocm/components/clusterWizard/wizardTransition.ts +8 -1
  158. package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +62 -0
  159. package/lib/ocm/services/ClusterDetailsService.ts +2 -1
  160. package/lib/ocm/services/OperatorsService.tsx +19 -5
  161. package/package.json +3 -3
  162. package/build/@types/ocm/components/clusterConfiguration/OcmSNOControlGroup.d.ts +0 -10
  163. package/build/@types/ocm/components/clusterConfiguration/OcmSNOControlGroup.d.ts.map +0 -1
  164. package/build/cjs/ocm/components/clusterConfiguration/OcmSNOControlGroup.js +0 -20
  165. package/build/cjs/ocm/components/clusterConfiguration/OcmSNOControlGroup.js.map +0 -1
  166. package/lib/ocm/components/clusterConfiguration/OcmSNOControlGroup.tsx +0 -62
@@ -1 +1 @@
1
- {"version":3,"file":"ClusterDetailsService.js","sourceRoot":"","sources":["../../../../lib/ocm/services/ClusterDetailsService.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;AACtB,4FAA4D;AAC5D,mCAKiB;AACjB,0FAAmG;AACnG,0CAA2C;AAC3C,qEAAqE;AAQrE,MAAM,4BAA4B,GAAG,CAAC,eAAuB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QAAQ,EAAE,CAAC;SAC1B;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,8BAA8B,CAAC,EAc9B;YAd8B,EAC7B,OAAO,EACP,QAAQ,EACR,eAAe,EACf,kBAAkB,OAUnB,EATI,IAAI,sBALsB,gEAM9B,CADQ;QAUP,MAAM,MAAM,GAAG,IAAA,uCAA8B,kBAC3C,OAAO,IACJ,IAAI,EACP,CAAC;QAEH,MAAM,eAAe,GAAG,QAAQ;YAC9B,CAAC,CAAC,iCAAiC,CAAC,QAAQ,CAAC;YAC7C,CAAC,CAAC,4BAA4B,CAAC,eAAe,CAAC,CAAC;QAElD,MAAM,6BAA6B,GAAG,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,mBAAmB;YACjE,CAAC,CAAC,qCAA6B,CAAC,MAAM;YACtC,CAAC,CAAC,qCAA6B,CAAC,IAAI,CAAC;QAEvC,uCACK,MAAM,KACT,eAAe;YACf,6BAA6B,EAC7B,iBAAiB,EAAE,CAAC,CAAC,kBAAkB,EACvC,cAAc,EAAE,IAAI,EACpB,eAAe,EAAE,KAAK,IACtB;IACJ,CAAC;CACF,CAAC;AAEF,kBAAe,qBAAqB,CAAC"}
@@ -23,6 +23,8 @@ const OperatorsService = {
23
23
  setOperator(common_1.OPERATOR_NAME_ODF, values.useOpenShiftDataFoundation);
24
24
  setOperator(common_1.OPERATOR_NAME_MCE, values.useMultiClusterEngine);
25
25
  setOperator(common_1.OPERATOR_NAME_MTV, values.useMigrationToolkitforVirtualization);
26
+ setOperator(common_1.OPERATOR_NAME_OPENSHIFT_AI, values.useOpenShiftAI);
27
+ setOperator(common_1.OPERATOR_NAME_OSC, values.useOsc);
26
28
  // TODO: remove following once the LSO option is exposed to the user
27
29
  if (!hasActiveOperators(values)) {
28
30
  setOperator(common_1.OPERATOR_NAME_LSO, false);
@@ -35,13 +37,19 @@ const OperatorsService = {
35
37
  * We need to synchronise them back to the form
36
38
  */
37
39
  syncOperators(uiOperators, updatedOperators) {
38
- // LVM operator can be automatically selected depending on Openshift version + other operators
39
- const prevInactive = (uiOperators === null || uiOperators === void 0 ? void 0 : uiOperators.find((op) => op.name === common_1.OPERATOR_NAME_LVM)) === undefined;
40
- const nowActive = (updatedOperators === null || updatedOperators === void 0 ? void 0 : updatedOperators.find((op) => op.name === common_1.OPERATOR_NAME_LVM)) !== undefined;
41
40
  const updates = {};
42
- if (prevInactive && nowActive) {
41
+ // LVM operator can be automatically selected depending on Openshift version + other operators
42
+ const lvmPrevInactive = (uiOperators === null || uiOperators === void 0 ? void 0 : uiOperators.find((op) => op.name === common_1.OPERATOR_NAME_LVM)) === undefined;
43
+ const lvmNowActive = (updatedOperators === null || updatedOperators === void 0 ? void 0 : updatedOperators.find((op) => op.name === common_1.OPERATOR_NAME_LVM)) !== undefined;
44
+ if (lvmPrevInactive && lvmNowActive) {
43
45
  updates.useOdfLogicalVolumeManager = true;
44
46
  }
47
+ // ODF operator will be automatically selected when the OpenShift AI operator is selected:
48
+ const odfPrevInactive = (uiOperators === null || uiOperators === void 0 ? void 0 : uiOperators.find((op) => op.name === common_1.OPERATOR_NAME_ODF)) === undefined;
49
+ const odfNowActive = (updatedOperators === null || updatedOperators === void 0 ? void 0 : updatedOperators.find((op) => op.name === common_1.OPERATOR_NAME_ODF)) !== undefined;
50
+ if (odfPrevInactive && odfNowActive) {
51
+ updates.useOpenShiftDataFoundation = true;
52
+ }
45
53
  return updates;
46
54
  },
47
55
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OperatorsService.js","sourceRoot":"","sources":["../../../../lib/ocm/services/OperatorsService.tsx"],"names":[],"mappings":";;AAAA,yCASsB;AACtB,wDAAgF;AAChF,8CAA6C;AAM7C,MAAM,kBAAkB,GAAG,CAAC,MAAuB,EAAE,EAAE;IACrD,OAAO,IAAA,eAAO,EAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;AACxE,C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EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,0BAAiB,CAAC,MAAK,SAAS,CAAC;QAC9E,IAAI,eAAe,IAAI,YAAY,EAAE;YACnC,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC;SAC3C;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAC;AACF,kBAAe,gBAAgB,CAAC"}
@@ -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
- clusterImages,
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 clusterImages={clusterImages} {...rest} />
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
- const { t } = useTranslation();
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
- isNutanix,
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 ocpVersions = getOCPVersions(clusterImages, isNutanix);
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 CpuArchitectureDropdown = ({ isDisabled = false }: { isDisabled?: boolean }) => {
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>('cpuArchitecture');
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')} required>
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[]> = {