@openshift-assisted/ui-lib 2.52.1 → 2.53.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/ClusterDeploymentWizard.d.ts +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/NetworkConfiguration.d.ts +1 -1
- package/build/@types/cim/components/ClusterDeployment/NetworkConfiguration.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/customManifests/ClusterDeploymentCustomManifestsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/networkConfigurationValidation.d.ts +1 -1
- package/build/@types/cim/components/ClusterDeployment/networkConfigurationValidation.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/networking/NetworkTypeDropdown.d.ts +5 -0
- package/build/@types/cim/components/ClusterDeployment/networking/NetworkTypeDropdown.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/review/ClusterDeploymentReviewStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/types.d.ts +0 -1
- package/build/@types/cim/components/ClusterDeployment/types.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/use-networking-formik.d.ts +4 -4
- package/build/@types/cim/components/ClusterDeployment/use-networking-formik.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts.map +1 -1
- package/build/@types/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/clusterDeployment.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/components/helpers/versions.test.d.ts +2 -0
- package/build/@types/cim/components/helpers/versions.test.d.ts.map +1 -0
- package/build/@types/cim/components/modals/CimConfiguration/CimConfigurationModal.d.ts.map +1 -1
- package/build/@types/cim/components/modals/CimConfiguration/persist.d.ts +14 -17
- package/build/@types/cim/components/modals/CimConfiguration/persist.d.ts.map +1 -1
- package/build/@types/cim/hooks/index.d.ts +1 -0
- package/build/@types/cim/hooks/index.d.ts.map +1 -1
- package/build/@types/cim/hooks/useAgents.d.ts +4 -0
- package/build/@types/cim/hooks/useAgents.d.ts.map +1 -0
- package/build/@types/cim/types/k8s/agent-cluster-install.d.ts +1 -1
- package/build/@types/cim/types/k8s/agent-cluster-install.d.ts.map +1 -1
- package/build/@types/common/components/clusterDetail/ClusterCredentials.d.ts.map +1 -1
- package/build/@types/common/components/clusterDetail/ConsoleModal.d.ts +0 -5
- package/build/@types/common/components/clusterDetail/ConsoleModal.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/customManifests/CustomManifestsAlert.d.ts +6 -0
- package/build/@types/common/components/clusterWizard/customManifests/CustomManifestsAlert.d.ts.map +1 -0
- package/build/@types/common/components/clusterWizard/customManifests/index.d.ts +2 -0
- package/build/@types/common/components/clusterWizard/customManifests/index.d.ts.map +1 -0
- package/build/@types/common/components/clusterWizard/index.d.ts +2 -0
- package/build/@types/common/components/clusterWizard/index.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.d.ts +2 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.d.ts +2 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/ThirdPartyCNIBanner.d.ts +3 -0
- package/build/@types/common/components/clusterWizard/networkingSteps/ThirdPartyCNIBanner.d.ts.map +1 -0
- package/build/@types/common/components/clusterWizard/networkingSteps/index.d.ts +1 -0
- package/build/@types/common/components/clusterWizard/networkingSteps/index.d.ts.map +1 -1
- package/build/@types/common/components/clusters/PullSecret.d.ts +0 -1
- package/build/@types/common/components/clusters/PullSecret.d.ts.map +1 -1
- package/build/@types/common/components/hosts/HostsTable.d.ts.map +1 -1
- package/build/@types/common/components/ui/WizardFooter.d.ts +1 -0
- package/build/@types/common/components/ui/WizardFooter.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/utils.d.ts +1 -0
- package/build/@types/common/components/ui/formik/utils.d.ts.map +1 -1
- package/build/@types/common/config/constants.d.ts +2 -2
- package/build/@types/common/config/constants.d.ts.map +1 -1
- package/build/@types/common/types/networkType.d.ts +2 -1
- package/build/@types/common/types/networkType.d.ts.map +1 -1
- package/build/@types/common/validationSchemas/networkingValidation.d.ts +10 -0
- package/build/@types/common/validationSchemas/networkingValidation.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkTypeDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/review/ReviewSummary.d.ts.map +1 -1
- package/build/@types/ocm/components/{clusterDetail/ClusterProperties.d.ts → clusterConfiguration/review/utils.d.ts} +1 -8
- package/build/@types/ocm/components/clusterConfiguration/review/utils.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/review/utils.test.d.ts +2 -0
- package/build/@types/ocm/components/clusterConfiguration/review/utils.test.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/data/nmstateTypes.d.ts +1 -0
- package/build/@types/ocm/components/clusterConfiguration/staticIp/data/nmstateTypes.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.d.ts +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterDetail/ClusterDetailsButtonGroup.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterDetail/index.d.ts +0 -1
- package/build/@types/ocm/components/clusterDetail/index.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterDetailsForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/HostDiscovery.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/AssistedInstallerHeader.d.ts +5 -1
- package/build/@types/ocm/components/clusters/AssistedInstallerHeader.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/ClustersTable.d.ts.map +1 -1
- package/build/@types/ocm/components/hosts/HostsTableEmptyState.d.ts.map +1 -1
- package/build/@types/ocm/hooks/useClusterCustomManifests.d.ts.map +1 -1
- package/build/@types/ocm/hooks/useLateBinding.d.ts.map +1 -1
- package/build/@types/ocm/hooks/useUISettings.d.ts.map +1 -1
- package/build/@types/ocm/services/ClusterDetailsService.d.ts +2 -1
- package/build/@types/ocm/services/ClusterDetailsService.d.ts.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js +9 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/NetworkConfiguration.js +46 -7
- package/build/cjs/cim/components/ClusterDeployment/NetworkConfiguration.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/customManifests/ClusterDeploymentCustomManifestsStep.js +22 -21
- package/build/cjs/cim/components/ClusterDeployment/customManifests/ClusterDeploymentCustomManifestsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js +25 -9
- package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/networking/NetworkTypeDropdown.js +35 -0
- package/build/cjs/cim/components/ClusterDeployment/networking/NetworkTypeDropdown.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/review/ClusterDeploymentReviewStep.js +4 -4
- package/build/cjs/cim/components/ClusterDeployment/review/ClusterDeploymentReviewStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js +13 -18
- package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/wizardTransition.js +5 -1
- package/build/cjs/cim/components/ClusterDeployment/wizardTransition.js.map +1 -1
- package/build/cjs/cim/components/Hypershift/modals/NodePoolForm.js +1 -1
- package/build/cjs/cim/components/Hypershift/modals/NodePoolForm.js.map +1 -1
- package/build/cjs/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.js +1 -4
- package/build/cjs/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.js.map +1 -1
- package/build/cjs/cim/components/helpers/clusterDeployment.js +14 -10
- package/build/cjs/cim/components/helpers/clusterDeployment.js.map +1 -1
- package/build/cjs/cim/components/helpers/versions.js +39 -28
- package/build/cjs/cim/components/helpers/versions.js.map +1 -1
- package/build/cjs/cim/components/helpers/versions.test.js +423 -0
- package/build/cjs/cim/components/helpers/versions.test.js.map +1 -0
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationModal.js +39 -16
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationModal.js.map +1 -1
- package/build/cjs/cim/components/modals/CimConfiguration/persist.js +96 -136
- package/build/cjs/cim/components/modals/CimConfiguration/persist.js.map +1 -1
- package/build/cjs/cim/hooks/index.js +1 -0
- package/build/cjs/cim/hooks/index.js.map +1 -1
- package/build/cjs/cim/hooks/useAgents.js +13 -0
- package/build/cjs/cim/hooks/useAgents.js.map +1 -0
- package/build/cjs/common/components/clusterDetail/ClusterCredentials.js +10 -9
- package/build/cjs/common/components/clusterDetail/ClusterCredentials.js.map +1 -1
- package/build/cjs/common/components/clusterDetail/ConsoleModal.js +1 -10
- package/build/cjs/common/components/clusterDetail/ConsoleModal.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/customManifests/CustomManifestsAlert.js +32 -0
- package/build/cjs/common/components/clusterWizard/customManifests/CustomManifestsAlert.js.map +1 -0
- package/build/cjs/common/components/clusterWizard/customManifests/index.js +5 -0
- package/build/cjs/common/components/clusterWizard/customManifests/index.js.map +1 -0
- package/build/cjs/common/components/clusterWizard/index.js +2 -0
- package/build/cjs/common/components/clusterWizard/index.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js +8 -2
- package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.js +2 -2
- package/build/cjs/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.js +29 -19
- package/build/cjs/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/ThirdPartyCNIBanner.js +20 -0
- package/build/cjs/common/components/clusterWizard/networkingSteps/ThirdPartyCNIBanner.js.map +1 -0
- package/build/cjs/common/components/clusterWizard/networkingSteps/index.js +1 -0
- package/build/cjs/common/components/clusterWizard/networkingSteps/index.js.map +1 -1
- package/build/cjs/common/components/clusters/PullSecret.js +17 -19
- package/build/cjs/common/components/clusters/PullSecret.js.map +1 -1
- package/build/cjs/common/components/hosts/HostsTable.js +2 -1
- package/build/cjs/common/components/hosts/HostsTable.js.map +1 -1
- package/build/cjs/common/components/ui/WizardFooter.js +6 -1
- package/build/cjs/common/components/ui/WizardFooter.js.map +1 -1
- package/build/cjs/common/components/ui/formik/utils.js +5 -1
- package/build/cjs/common/components/ui/formik/utils.js.map +1 -1
- package/build/cjs/common/config/constants.js +13 -2
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/common/types/networkType.js +9 -8
- package/build/cjs/common/types/networkType.js.map +1 -1
- package/build/cjs/common/validationSchemas/networkingValidation.js +19 -1
- package/build/cjs/common/validationSchemas/networkingValidation.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +4 -1
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.js +1 -20
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js +7 -6
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkTypeDropdown.js +6 -9
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkTypeDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js +4 -4
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewClusterDetailTable.js +2 -2
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewClusterDetailTable.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.js +6 -5
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewSummary.js +5 -2
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewSummary.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/utils.js +57 -0
- package/build/cjs/ocm/components/clusterConfiguration/review/utils.js.map +1 -0
- package/build/cjs/ocm/components/{clusterDetail/ClusterProperties.test.js → clusterConfiguration/review/utils.test.js} +13 -13
- package/build/cjs/ocm/components/clusterConfiguration/review/utils.test.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js +2 -2
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/nmstateTypes.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.js +3 -7
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterDetailsButtonGroup.js +8 -2
- package/build/cjs/ocm/components/clusterDetail/ClusterDetailsButtonGroup.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/index.js +1 -3
- package/build/cjs/ocm/components/clusterDetail/index.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js +10 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/HostDiscovery.js +4 -1
- package/build/cjs/ocm/components/clusterWizard/HostDiscovery.js.map +1 -1
- package/build/cjs/ocm/components/clusters/AssistedInstallerHeader.js +2 -2
- package/build/cjs/ocm/components/clusters/AssistedInstallerHeader.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClusterPage.js +1 -1
- package/build/cjs/ocm/components/clusters/ClusterPage.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClustersTable.js +3 -2
- package/build/cjs/ocm/components/clusters/ClustersTable.js.map +1 -1
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +1 -1
- package/build/cjs/ocm/components/hosts/HostsTableEmptyState.js +2 -1
- package/build/cjs/ocm/components/hosts/HostsTableEmptyState.js.map +1 -1
- package/build/cjs/ocm/hooks/useClusterCustomManifests.js +3 -15
- package/build/cjs/ocm/hooks/useClusterCustomManifests.js.map +1 -1
- package/build/cjs/ocm/hooks/useLateBinding.js +41 -26
- package/build/cjs/ocm/hooks/useLateBinding.js.map +1 -1
- package/build/cjs/ocm/hooks/usePullSecret.js +2 -2
- package/build/cjs/ocm/hooks/useUISettings.js +1 -1
- package/build/cjs/ocm/hooks/useUISettings.js.map +1 -1
- package/build/cjs/ocm/services/ClusterDetailsService.js +4 -2
- package/build/cjs/ocm/services/ClusterDetailsService.js.map +1 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizard.tsx +10 -2
- package/lib/cim/components/ClusterDeployment/NetworkConfiguration.tsx +55 -6
- package/lib/cim/components/ClusterDeployment/customManifests/ClusterDeploymentCustomManifestsStep.tsx +18 -2
- package/lib/cim/components/ClusterDeployment/networkConfigurationValidation.ts +22 -8
- package/lib/cim/components/ClusterDeployment/networking/NetworkTypeDropdown.tsx +81 -0
- package/lib/cim/components/ClusterDeployment/review/ClusterDeploymentReviewStep.tsx +18 -14
- package/lib/cim/components/ClusterDeployment/types.ts +0 -1
- package/lib/cim/components/ClusterDeployment/use-networking-formik.ts +14 -22
- package/lib/cim/components/ClusterDeployment/wizardTransition.ts +5 -1
- package/lib/cim/components/Hypershift/modals/NodePoolForm.tsx +2 -2
- package/lib/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.tsx +2 -5
- package/lib/cim/components/helpers/clusterDeployment.ts +9 -4
- package/lib/cim/components/helpers/versions.test.ts +465 -0
- package/lib/cim/components/helpers/versions.ts +37 -31
- package/lib/cim/components/modals/CimConfiguration/CimConfigurationModal.tsx +45 -18
- package/lib/cim/components/modals/CimConfiguration/persist.ts +97 -199
- package/lib/cim/hooks/index.tsx +1 -0
- package/lib/cim/hooks/useAgents.tsx +15 -0
- package/lib/cim/types/k8s/agent-cluster-install.ts +1 -1
- package/lib/common/components/clusterDetail/ClusterCredentials.tsx +49 -53
- package/lib/common/components/clusterDetail/ConsoleModal.tsx +0 -35
- package/lib/common/components/clusterWizard/customManifests/CustomManifestsAlert.tsx +39 -0
- package/lib/common/components/clusterWizard/customManifests/index.tsx +1 -0
- package/lib/common/components/clusterWizard/index.ts +2 -0
- package/lib/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.tsx +8 -1
- package/lib/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.tsx +2 -2
- package/lib/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.tsx +36 -26
- package/lib/common/components/clusterWizard/networkingSteps/ThirdPartyCNIBanner.tsx +28 -0
- package/lib/common/components/clusterWizard/networkingSteps/index.ts +1 -0
- package/lib/common/components/clusters/PullSecret.tsx +28 -38
- package/lib/common/components/hosts/HostsTable.tsx +2 -0
- package/lib/common/components/ui/WizardFooter.tsx +10 -0
- package/lib/common/components/ui/formik/utils.ts +6 -0
- package/lib/common/config/constants.ts +14 -1
- package/lib/common/types/networkType.ts +9 -8
- package/lib/common/validationSchemas/networkingValidation.tsx +39 -1
- package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +6 -3
- package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +7 -6
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.tsx +10 -45
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +11 -9
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkTypeDropdown.tsx +7 -24
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.ts +6 -5
- package/lib/ocm/components/clusterConfiguration/review/ReviewClusterDetailTable.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.tsx +10 -4
- package/lib/ocm/components/clusterConfiguration/review/ReviewSummary.tsx +9 -2
- package/lib/ocm/components/{clusterDetail/ClusterProperties.test.ts → clusterConfiguration/review/utils.test.ts} +1 -1
- package/lib/ocm/components/clusterConfiguration/review/utils.tsx +61 -0
- package/lib/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.ts +2 -0
- package/lib/ocm/components/clusterConfiguration/staticIp/data/nmstateTypes.ts +1 -0
- package/lib/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.ts +2 -0
- package/lib/ocm/components/clusterDetail/ClusterDetailsButtonGroup.tsx +27 -2
- package/lib/ocm/components/clusterDetail/index.ts +0 -1
- package/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx +10 -1
- package/lib/ocm/components/clusterWizard/HostDiscovery.tsx +4 -0
- package/lib/ocm/components/clusters/AssistedInstallerHeader.tsx +6 -2
- package/lib/ocm/components/clusters/ClusterPage.tsx +1 -1
- package/lib/ocm/components/clusters/ClustersTable.tsx +59 -49
- package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +1 -1
- package/lib/ocm/components/hosts/HostsTableEmptyState.tsx +2 -0
- package/lib/ocm/hooks/useClusterCustomManifests.ts +3 -0
- package/lib/ocm/hooks/useLateBinding.ts +45 -24
- package/lib/ocm/hooks/usePullSecret.ts +2 -2
- package/lib/ocm/hooks/useUISettings.ts +3 -1
- package/lib/ocm/services/ClusterDetailsService.ts +6 -0
- package/package.json +9 -9
- package/build/@types/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.d.ts +0 -7
- package/build/@types/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.d.ts +0 -8
- package/build/@types/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterDetail/ClusterProperties.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterDetail/ClusterProperties.test.d.ts +0 -2
- package/build/@types/ocm/components/clusterDetail/ClusterProperties.test.d.ts.map +0 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.js +0 -33
- package/build/cjs/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.js.map +0 -1
- package/build/cjs/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.js +0 -40
- package/build/cjs/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.js.map +0 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterProperties.js +0 -77
- package/build/cjs/ocm/components/clusterDetail/ClusterProperties.js.map +0 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterProperties.test.js.map +0 -1
- package/lib/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.tsx +0 -74
- package/lib/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.tsx +0 -69
- package/lib/ocm/components/clusterDetail/ClusterProperties.tsx +0 -169
|
@@ -7,44 +7,52 @@ import {
|
|
|
7
7
|
OsImage,
|
|
8
8
|
} from '../../types';
|
|
9
9
|
import { CpuArchitecture, OpenshiftVersionOptionType } from '../../../common';
|
|
10
|
-
import { OpenshiftVersion } from '@openshift-assisted/types/assisted-installer-service';
|
|
11
10
|
import { getComparableVersionInt } from '../../../common/utils';
|
|
12
11
|
|
|
13
|
-
export const
|
|
14
|
-
const match =
|
|
12
|
+
export const getVersionFromReleaseString = (value = '') => {
|
|
13
|
+
const match = /(\d+\.\d+(?:\.\d+)?(?:-\w+)?)/gm.exec(value);
|
|
15
14
|
if (match && match.length > 1 && match[1]) {
|
|
16
15
|
return match[1];
|
|
17
16
|
}
|
|
18
17
|
};
|
|
19
18
|
|
|
20
|
-
const
|
|
21
|
-
|
|
19
|
+
export const getVersionFromClusterImageSet = (clusterImageSet?: ClusterImageSetK8sResource) => {
|
|
20
|
+
return (
|
|
21
|
+
getVersionFromReleaseString(clusterImageSet?.metadata?.labels?.['releaseTag']) ||
|
|
22
|
+
getVersionFromReleaseString(clusterImageSet?.spec?.releaseImage) ||
|
|
23
|
+
clusterImageSet?.metadata?.name ||
|
|
24
|
+
''
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const getCPUArchFromReleaseString = (value = '') => {
|
|
29
|
+
const match = /(?:\d+\.)+\d+-(x86-64|[\w_]+)/gm.exec(value);
|
|
22
30
|
if (match && match.length > 1 && match[1]) {
|
|
23
31
|
return match[1];
|
|
24
32
|
}
|
|
25
33
|
};
|
|
26
34
|
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (channel.startsWith('fast')) {
|
|
36
|
-
return 'beta'; // TODO(mlibra): Is this correct?
|
|
37
|
-
}
|
|
35
|
+
const getCPUArchFromClusterImageSet = (clusterImageSet?: ClusterImageSetK8sResource) => {
|
|
36
|
+
const cpuArch =
|
|
37
|
+
clusterImageSet?.metadata?.labels?.architecture ||
|
|
38
|
+
getCPUArchFromReleaseString(clusterImageSet?.metadata?.labels?.['releaseTag']) ||
|
|
39
|
+
getCPUArchFromReleaseString(clusterImageSet?.spec?.releaseImage) ||
|
|
40
|
+
getCPUArchFromReleaseString(clusterImageSet?.metadata?.name) ||
|
|
41
|
+
'';
|
|
38
42
|
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
switch (cpuArch) {
|
|
44
|
+
case CpuArchitecture.x86:
|
|
45
|
+
case CpuArchitecture.ARM:
|
|
46
|
+
case CpuArchitecture.s390x:
|
|
47
|
+
case CpuArchitecture.MULTI:
|
|
48
|
+
return cpuArch as CpuArchitecture;
|
|
49
|
+
case 'x86-64':
|
|
50
|
+
return CpuArchitecture.x86;
|
|
51
|
+
default:
|
|
52
|
+
return undefined;
|
|
41
53
|
}
|
|
42
|
-
|
|
43
|
-
return 'beta';
|
|
44
54
|
};
|
|
45
55
|
|
|
46
|
-
export const supportedNutanixPlatforms = ['x86_64', 'x86-64'];
|
|
47
|
-
|
|
48
56
|
export const isValidImageSet = (
|
|
49
57
|
cis: ClusterImageSetK8sResource,
|
|
50
58
|
architectures?: string[],
|
|
@@ -71,20 +79,16 @@ const extractMajorMinor = (version: string): string => {
|
|
|
71
79
|
const toVersionOption = (
|
|
72
80
|
clusterImageSet: ClusterImageSetK8sResource,
|
|
73
81
|
): OpenshiftVersionOptionType => {
|
|
74
|
-
const version =
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
'';
|
|
78
|
-
const cpuArch = getCPUArchFromReleaseImage(clusterImageSet.spec?.releaseImage);
|
|
82
|
+
const version = getVersionFromClusterImageSet(clusterImageSet);
|
|
83
|
+
const cpuArch = getCPUArchFromClusterImageSet(clusterImageSet);
|
|
84
|
+
|
|
79
85
|
return {
|
|
80
86
|
label: `OpenShift ${version}`,
|
|
81
87
|
version,
|
|
82
88
|
value: clusterImageSet.metadata?.name as string,
|
|
83
89
|
default: false,
|
|
84
|
-
//
|
|
85
|
-
|
|
86
|
-
supportLevel: 'production',
|
|
87
|
-
cpuArchitectures: cpuArch ? [cpuArch as CpuArchitecture] : undefined,
|
|
90
|
+
supportLevel: 'production', // ACM doesn't have feature support levels
|
|
91
|
+
cpuArchitectures: cpuArch ? [cpuArch] : undefined,
|
|
88
92
|
};
|
|
89
93
|
};
|
|
90
94
|
|
|
@@ -101,6 +105,8 @@ const hasMatchingOsImage = (
|
|
|
101
105
|
return osImageVersions.includes(extractMajorMinor(version.version));
|
|
102
106
|
};
|
|
103
107
|
|
|
108
|
+
const supportedNutanixPlatforms = ['x86_64', 'x86-64'];
|
|
109
|
+
|
|
104
110
|
export const getOCPVersions = (
|
|
105
111
|
clusterImageSets: ClusterImageSetK8sResource[],
|
|
106
112
|
isNutanix?: boolean,
|
|
@@ -20,12 +20,18 @@ import parseUrl from 'parse-url';
|
|
|
20
20
|
import { useTranslation } from '../../../../common/hooks/use-translation-wrapper';
|
|
21
21
|
import { getStorageSizeGiB } from '../../helpers';
|
|
22
22
|
import { AlertPayload } from '../../../../common';
|
|
23
|
+
import { getErrorMessage } from '../../../../common/utils';
|
|
23
24
|
|
|
24
25
|
import { CimConfigurationModalProps, CimConfigurationValues } from './types';
|
|
25
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
patchProvisioning,
|
|
28
|
+
createAgentServiceConfig,
|
|
29
|
+
editAgentServiceConfig,
|
|
30
|
+
configureIngressLoadBalancer,
|
|
31
|
+
} from './persist';
|
|
26
32
|
import { CimConfigDisconnectedAlert } from './CimConfigDisconnectedAlert';
|
|
27
33
|
import { MIN_DB_VOL_SIZE, MIN_FS_VOL_SIZE, MIN_IMG_VOL_SIZE } from './constants';
|
|
28
|
-
import { isCIMConfigProgressing } from './utils';
|
|
34
|
+
import { isCIMConfigProgressing, LOCAL_STORAGE_ID_LAST_UPDATE_TIMESTAMP } from './utils';
|
|
29
35
|
import { resetCimConfigProgressAlertSuccessStatus } from './CimConfigProgressAlert';
|
|
30
36
|
import { CimConfigurationFormFields } from './CimConfigurationFormFields';
|
|
31
37
|
|
|
@@ -52,24 +58,45 @@ export const CimConfigurationModal: React.FC<CimConfigurationModalProps> = ({
|
|
|
52
58
|
helpers.setSubmitting(true);
|
|
53
59
|
resetCimConfigProgressAlertSuccessStatus();
|
|
54
60
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
try {
|
|
62
|
+
if (['none', 'baremetal', 'openstack', 'vsphere'].includes(platform.toLocaleLowerCase())) {
|
|
63
|
+
try {
|
|
64
|
+
await patchProvisioning();
|
|
65
|
+
} catch (e) {
|
|
66
|
+
setError({
|
|
67
|
+
title: t('ai:Failed to configure provisioning to enable registering hosts via BMC.'),
|
|
68
|
+
message: getErrorMessage(e),
|
|
69
|
+
variant: AlertVariant.warning,
|
|
70
|
+
});
|
|
71
|
+
setConfigureLoadBalancerInitial(values.configureLoadBalancer);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (isEdit && agentServiceConfig) {
|
|
77
|
+
await editAgentServiceConfig({
|
|
78
|
+
t,
|
|
79
|
+
agentServiceConfig,
|
|
80
|
+
values,
|
|
81
|
+
});
|
|
82
|
+
} else {
|
|
83
|
+
await createAgentServiceConfig({ t, values });
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
window.localStorage.setItem(LOCAL_STORAGE_ID_LAST_UPDATE_TIMESTAMP, new Date().toISOString());
|
|
87
|
+
|
|
88
|
+
if (values.configureLoadBalancer) {
|
|
89
|
+
await configureIngressLoadBalancer({ t });
|
|
90
|
+
}
|
|
91
|
+
|
|
69
92
|
onClose();
|
|
70
|
-
}
|
|
71
|
-
|
|
93
|
+
} catch (err) {
|
|
94
|
+
setError({
|
|
95
|
+
title: t('ai:Failed to save configuration'),
|
|
96
|
+
message: getErrorMessage(err),
|
|
97
|
+
});
|
|
72
98
|
setConfigureLoadBalancerInitial(values.configureLoadBalancer);
|
|
99
|
+
} finally {
|
|
73
100
|
helpers.setSubmitting(false);
|
|
74
101
|
}
|
|
75
102
|
};
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
k8sListItems,
|
|
5
5
|
k8sPatch,
|
|
6
6
|
K8sResourceCommon,
|
|
7
|
+
Patch,
|
|
7
8
|
} from '@openshift-console/dynamic-plugin-sdk';
|
|
8
|
-
import { AlertVariant } from '@patternfly/react-core';
|
|
9
9
|
import { TFunction } from 'i18next';
|
|
10
10
|
import { getErrorMessage } from '../../../../common/utils';
|
|
11
11
|
|
|
@@ -13,42 +13,21 @@ import {
|
|
|
13
13
|
AgentServiceConfigK8sResource,
|
|
14
14
|
AgentServiceConfigModel,
|
|
15
15
|
IngressControllerModel,
|
|
16
|
-
K8sPatch,
|
|
17
16
|
ProvisioningModel,
|
|
18
17
|
RouteK8sResource,
|
|
19
18
|
RouteModel,
|
|
20
19
|
} from '../../../types';
|
|
21
|
-
import { LOCAL_STORAGE_ID_LAST_UPDATE_TIMESTAMP } from './utils';
|
|
22
20
|
import { appendPatch } from '../../../utils';
|
|
23
|
-
|
|
24
|
-
export type SetErrorFuncType = ({
|
|
25
|
-
title,
|
|
26
|
-
message,
|
|
27
|
-
variant,
|
|
28
|
-
}: {
|
|
29
|
-
title: string;
|
|
30
|
-
message?: string;
|
|
31
|
-
variant?: AlertVariant;
|
|
32
|
-
}) => void;
|
|
21
|
+
import { CimConfigurationValues } from './types';
|
|
33
22
|
|
|
34
23
|
const ASSISTED_IMAGE_SERVICE_ROUTE_PREFIX = 'assisted-image-service-multicluster-engine';
|
|
35
24
|
|
|
36
|
-
|
|
37
|
-
// Find assisted-image-service's one and parse domain from there.
|
|
38
|
-
const getAssistedImageServiceRoute = async (
|
|
39
|
-
t: TFunction,
|
|
40
|
-
setError: SetErrorFuncType,
|
|
41
|
-
): Promise<RouteK8sResource | undefined> => {
|
|
25
|
+
const getAssistedImageServiceRoute = async (t: TFunction): Promise<RouteK8sResource> => {
|
|
42
26
|
let allRoutes: RouteK8sResource[] = [];
|
|
43
27
|
try {
|
|
44
28
|
allRoutes = await k8sListItems({ model: RouteModel, queryParams: {} });
|
|
45
29
|
} catch (e) {
|
|
46
|
-
|
|
47
|
-
setError({
|
|
48
|
-
title: t('ai:Failed to save configuration'),
|
|
49
|
-
message: t('ai:Can not query routes.'),
|
|
50
|
-
});
|
|
51
|
-
return undefined;
|
|
30
|
+
throw new Error(`${t('ai:Failed to save configuration')}: ${getErrorMessage(e)}`);
|
|
52
31
|
}
|
|
53
32
|
|
|
54
33
|
const assistedImageServiceRoute = allRoutes?.find(
|
|
@@ -56,54 +35,41 @@ const getAssistedImageServiceRoute = async (
|
|
|
56
35
|
);
|
|
57
36
|
|
|
58
37
|
if (!assistedImageServiceRoute?.spec?.host) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
38
|
+
throw new Error(
|
|
39
|
+
`${t('ai:Failed to save configuration')}: ${t(
|
|
40
|
+
'ai:Can not find host of the assisted-image-service route',
|
|
41
|
+
)}`,
|
|
42
|
+
);
|
|
64
43
|
}
|
|
65
44
|
|
|
66
45
|
return assistedImageServiceRoute;
|
|
67
46
|
};
|
|
68
47
|
|
|
69
|
-
|
|
70
|
-
const getClusterDomain = (
|
|
71
|
-
t: TFunction,
|
|
72
|
-
setError: SetErrorFuncType,
|
|
73
|
-
assistedImageServiceRoute: RouteK8sResource,
|
|
74
|
-
): string | undefined => {
|
|
48
|
+
const getClusterDomain = (t: TFunction, assistedImageServiceRoute: RouteK8sResource) => {
|
|
75
49
|
const prefix = `${ASSISTED_IMAGE_SERVICE_ROUTE_PREFIX}.`;
|
|
76
50
|
const host: string = assistedImageServiceRoute.spec?.host || '';
|
|
77
51
|
const appsDomain = host.substring(host.indexOf(prefix) + prefix.length);
|
|
78
52
|
|
|
79
|
-
// the appsDomain can be prefixed either by "apps." or "nlb-apps." so search for first dot
|
|
80
53
|
const domain = appsDomain.substring(appsDomain.indexOf('.') + 1);
|
|
81
54
|
|
|
82
55
|
if (!domain) {
|
|
83
|
-
|
|
84
|
-
// console.error('Can not find domain in assistedImageServiceRoute: ', assistedImageServiceRoute);
|
|
85
|
-
setError({
|
|
86
|
-
title: t('ai:Can not find cluster domain.'),
|
|
87
|
-
});
|
|
56
|
+
throw new Error(t('ai:Can not find cluster domain.'));
|
|
88
57
|
}
|
|
89
58
|
|
|
90
59
|
return domain;
|
|
91
60
|
};
|
|
92
61
|
|
|
93
|
-
// Keep this function in sync with getClusterDomain()
|
|
94
62
|
const patchAssistedImageServiceRoute = async (
|
|
95
63
|
t: TFunction,
|
|
96
|
-
setError: SetErrorFuncType,
|
|
97
|
-
|
|
98
64
|
assistedImageServiceRoute: RouteK8sResource,
|
|
99
65
|
domain: string,
|
|
100
|
-
)
|
|
66
|
+
) => {
|
|
101
67
|
const newHost = `${ASSISTED_IMAGE_SERVICE_ROUTE_PREFIX}.nlb-apps.${domain}`;
|
|
102
68
|
|
|
103
69
|
const labels = assistedImageServiceRoute.metadata?.labels || {};
|
|
104
70
|
labels['router-type'] = 'nlb';
|
|
105
71
|
|
|
106
|
-
const patches = [
|
|
72
|
+
const patches: Patch[] = [
|
|
107
73
|
{
|
|
108
74
|
op: 'replace',
|
|
109
75
|
path: '/spec/host',
|
|
@@ -123,38 +89,28 @@ const patchAssistedImageServiceRoute = async (
|
|
|
123
89
|
data: patches,
|
|
124
90
|
});
|
|
125
91
|
} catch (e) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
92
|
+
throw new Error(
|
|
93
|
+
`${t('ai:Failed to patch assisted-image-service route for new domain.')}: ${getErrorMessage(
|
|
94
|
+
e,
|
|
95
|
+
)}`,
|
|
96
|
+
);
|
|
131
97
|
}
|
|
132
|
-
|
|
133
|
-
return true;
|
|
134
98
|
};
|
|
135
99
|
|
|
136
|
-
export
|
|
100
|
+
export async function isIngressController() {
|
|
137
101
|
try {
|
|
138
102
|
await k8sGet({
|
|
139
103
|
name: 'ingress-controller-with-nlb',
|
|
140
104
|
ns: 'openshift-ingress-operator',
|
|
141
105
|
model: IngressControllerModel,
|
|
142
106
|
});
|
|
143
|
-
|
|
144
107
|
return true;
|
|
145
108
|
} catch {
|
|
146
109
|
return false;
|
|
147
110
|
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
const createIngressController = async (
|
|
151
|
-
t: TFunction,
|
|
152
|
-
setError: SetErrorFuncType,
|
|
153
|
-
|
|
154
|
-
domain: string,
|
|
155
|
-
): Promise<boolean> => {
|
|
156
|
-
// Assumption: the IngressController resource is not present - ensured at higher level
|
|
111
|
+
}
|
|
157
112
|
|
|
113
|
+
const createIngressController = async (t: TFunction, domain: string) => {
|
|
158
114
|
const ingressController = {
|
|
159
115
|
apiVersion: 'operator.openshift.io/v1',
|
|
160
116
|
kind: 'IngressController',
|
|
@@ -186,71 +142,45 @@ const createIngressController = async (
|
|
|
186
142
|
|
|
187
143
|
try {
|
|
188
144
|
await k8sCreate({ model: IngressControllerModel, data: ingressController });
|
|
189
|
-
return true;
|
|
190
145
|
} catch (e) {
|
|
191
|
-
|
|
192
|
-
setError({
|
|
193
|
-
title: t('ai:Failed to create IngressController'),
|
|
194
|
-
});
|
|
146
|
+
throw new Error(`${t('ai:Failed to create IngressController')}: ${getErrorMessage(e)}`);
|
|
195
147
|
}
|
|
196
|
-
|
|
197
|
-
return false;
|
|
198
148
|
};
|
|
199
149
|
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
})
|
|
207
|
-
try {
|
|
208
|
-
const provisioning = await k8sGet<
|
|
209
|
-
K8sResourceCommon & { spec?: { watchAllNamespaces?: boolean } }
|
|
210
|
-
>({
|
|
211
|
-
model: ProvisioningModel,
|
|
212
|
-
name: 'provisioning-configuration',
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
const patches = [
|
|
216
|
-
{
|
|
217
|
-
op: provisioning.spec?.watchAllNamespaces ? 'replace' : 'add',
|
|
218
|
-
path: '/spec/watchAllNamespaces',
|
|
219
|
-
value: true,
|
|
220
|
-
},
|
|
221
|
-
];
|
|
150
|
+
export const patchProvisioning = async () => {
|
|
151
|
+
const provisioning = await k8sGet<
|
|
152
|
+
K8sResourceCommon & { spec?: { watchAllNamespaces?: boolean } }
|
|
153
|
+
>({
|
|
154
|
+
model: ProvisioningModel,
|
|
155
|
+
name: 'provisioning-configuration',
|
|
156
|
+
});
|
|
222
157
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
resource: provisioning,
|
|
226
|
-
data: patches,
|
|
227
|
-
});
|
|
228
|
-
} catch (e) {
|
|
229
|
-
// console.error('Failed to patch provisioning-configuration: ', e);
|
|
230
|
-
setError({
|
|
231
|
-
title: t('ai:Failed to configure provisioning to enable registering hosts via BMC.'),
|
|
232
|
-
message: getErrorMessage(e),
|
|
233
|
-
variant: AlertVariant.warning,
|
|
234
|
-
});
|
|
158
|
+
if (provisioning.spec?.watchAllNamespaces) {
|
|
159
|
+
return;
|
|
235
160
|
}
|
|
161
|
+
|
|
162
|
+
const patches = [
|
|
163
|
+
{
|
|
164
|
+
op: provisioning.spec?.watchAllNamespaces === false ? 'replace' : 'add',
|
|
165
|
+
path: '/spec/watchAllNamespaces',
|
|
166
|
+
value: true,
|
|
167
|
+
},
|
|
168
|
+
];
|
|
169
|
+
|
|
170
|
+
await k8sPatch({
|
|
171
|
+
model: ProvisioningModel,
|
|
172
|
+
resource: provisioning,
|
|
173
|
+
data: patches,
|
|
174
|
+
});
|
|
236
175
|
};
|
|
237
176
|
|
|
238
|
-
const createAgentServiceConfig = async ({
|
|
177
|
+
export const createAgentServiceConfig = async ({
|
|
239
178
|
t,
|
|
240
|
-
|
|
241
|
-
dbVolSizeGiB,
|
|
242
|
-
fsVolSizeGiB,
|
|
243
|
-
imgVolSizeGiB,
|
|
244
|
-
ciscoIntersightURL,
|
|
179
|
+
values,
|
|
245
180
|
}: {
|
|
246
181
|
t: TFunction;
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
dbVolSizeGiB: number;
|
|
250
|
-
fsVolSizeGiB: number;
|
|
251
|
-
imgVolSizeGiB: number;
|
|
252
|
-
ciscoIntersightURL?: string;
|
|
253
|
-
}): Promise<boolean> => {
|
|
182
|
+
values: CimConfigurationValues;
|
|
183
|
+
}) => {
|
|
254
184
|
try {
|
|
255
185
|
const agentServiceConfig = {
|
|
256
186
|
apiVersion: 'agent-install.openshift.io/v1beta1',
|
|
@@ -264,7 +194,7 @@ const createAgentServiceConfig = async ({
|
|
|
264
194
|
accessModes: ['ReadWriteOnce'],
|
|
265
195
|
resources: {
|
|
266
196
|
requests: {
|
|
267
|
-
storage: `${
|
|
197
|
+
storage: `${values.dbVolSize}Gi`,
|
|
268
198
|
},
|
|
269
199
|
},
|
|
270
200
|
},
|
|
@@ -272,7 +202,7 @@ const createAgentServiceConfig = async ({
|
|
|
272
202
|
accessModes: ['ReadWriteOnce'],
|
|
273
203
|
resources: {
|
|
274
204
|
requests: {
|
|
275
|
-
storage: `${
|
|
205
|
+
storage: `${values.fsVolSize}Gi`,
|
|
276
206
|
},
|
|
277
207
|
},
|
|
278
208
|
},
|
|
@@ -280,17 +210,17 @@ const createAgentServiceConfig = async ({
|
|
|
280
210
|
accessModes: ['ReadWriteOnce'],
|
|
281
211
|
resources: {
|
|
282
212
|
requests: {
|
|
283
|
-
storage: `${
|
|
213
|
+
storage: `${values.imgVolSize}Gi`,
|
|
284
214
|
},
|
|
285
215
|
},
|
|
286
216
|
},
|
|
287
217
|
},
|
|
288
218
|
};
|
|
289
219
|
|
|
290
|
-
if (ciscoIntersightURL) {
|
|
220
|
+
if (values.ciscoIntersightURL) {
|
|
291
221
|
agentServiceConfig.metadata = {
|
|
292
222
|
...agentServiceConfig.metadata,
|
|
293
|
-
annotations: { ciscoIntersightURL },
|
|
223
|
+
annotations: { ciscoIntersightURL: values.ciscoIntersightURL },
|
|
294
224
|
};
|
|
295
225
|
}
|
|
296
226
|
|
|
@@ -298,99 +228,67 @@ const createAgentServiceConfig = async ({
|
|
|
298
228
|
model: AgentServiceConfigModel,
|
|
299
229
|
data: agentServiceConfig,
|
|
300
230
|
});
|
|
301
|
-
|
|
302
|
-
return true;
|
|
303
231
|
} catch (e) {
|
|
304
|
-
|
|
305
|
-
title: t('ai:Failed to create AgentServiceConfig'),
|
|
306
|
-
message: getErrorMessage(e),
|
|
307
|
-
});
|
|
308
|
-
return false;
|
|
232
|
+
throw new Error(`${t('ai:Failed to create AgentServiceConfig')}: ${getErrorMessage(e)}`);
|
|
309
233
|
}
|
|
310
234
|
};
|
|
311
235
|
|
|
312
|
-
|
|
313
|
-
export const onEnableCIM = async ({
|
|
236
|
+
export const editAgentServiceConfig = async ({
|
|
314
237
|
t,
|
|
315
|
-
setError,
|
|
316
|
-
|
|
317
238
|
agentServiceConfig,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
dbVolSizeGiB,
|
|
321
|
-
fsVolSizeGiB,
|
|
322
|
-
imgVolSizeGiB,
|
|
323
|
-
|
|
324
|
-
configureLoadBalancer,
|
|
325
|
-
ciscoIntersightURL,
|
|
239
|
+
values,
|
|
326
240
|
}: {
|
|
327
241
|
t: TFunction;
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
agentServiceConfig?: AgentServiceConfigK8sResource;
|
|
331
|
-
platform: string;
|
|
332
|
-
|
|
333
|
-
dbVolSizeGiB: number;
|
|
334
|
-
fsVolSizeGiB: number;
|
|
335
|
-
imgVolSizeGiB: number;
|
|
336
|
-
|
|
337
|
-
configureLoadBalancer: boolean;
|
|
338
|
-
ciscoIntersightURL?: string;
|
|
242
|
+
agentServiceConfig: AgentServiceConfigK8sResource;
|
|
243
|
+
values: CimConfigurationValues;
|
|
339
244
|
}) => {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
} else {
|
|
358
|
-
const patches = [] as K8sPatch;
|
|
245
|
+
const patches: Patch[] = [];
|
|
246
|
+
|
|
247
|
+
if (
|
|
248
|
+
agentServiceConfig.metadata?.annotations?.['ciscoIntersightURL'] &&
|
|
249
|
+
!values.ciscoIntersightURL
|
|
250
|
+
) {
|
|
251
|
+
patches.push({
|
|
252
|
+
op: 'remove',
|
|
253
|
+
path: '/metadata/annotations/ciscoIntersightURL',
|
|
254
|
+
});
|
|
255
|
+
} else if (!agentServiceConfig.metadata?.annotations && values.ciscoIntersightURL) {
|
|
256
|
+
patches.push({
|
|
257
|
+
op: 'add',
|
|
258
|
+
path: '/metadata/annotations',
|
|
259
|
+
value: { ciscoIntersightURL: values.ciscoIntersightURL },
|
|
260
|
+
});
|
|
261
|
+
} else if (values.ciscoIntersightURL) {
|
|
359
262
|
appendPatch(
|
|
360
263
|
patches,
|
|
361
264
|
'/metadata/annotations/ciscoIntersightURL',
|
|
362
|
-
ciscoIntersightURL,
|
|
265
|
+
values.ciscoIntersightURL,
|
|
363
266
|
agentServiceConfig.metadata?.annotations?.['ciscoIntersightURL'],
|
|
364
267
|
);
|
|
365
|
-
await k8sPatch({ model: AgentServiceConfigModel, resource: agentServiceConfig, data: patches });
|
|
366
268
|
}
|
|
367
269
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
if (configureLoadBalancer) {
|
|
372
|
-
// Recently No to Yes only (since we do not delete the ingress controller)
|
|
373
|
-
if (await isIngressController()) {
|
|
374
|
-
return true /* Not an error */;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
const assistedImageServiceRoute = await getAssistedImageServiceRoute(t, setError);
|
|
378
|
-
if (!assistedImageServiceRoute) {
|
|
379
|
-
return false;
|
|
380
|
-
}
|
|
270
|
+
if (patches.length === 0) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
381
273
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
274
|
+
try {
|
|
275
|
+
await k8sPatch({
|
|
276
|
+
model: AgentServiceConfigModel,
|
|
277
|
+
resource: agentServiceConfig,
|
|
278
|
+
data: patches,
|
|
279
|
+
});
|
|
280
|
+
} catch (e) {
|
|
281
|
+
throw new Error(`${t('ai:Failed to save configuration')}: ${getErrorMessage(e)}`);
|
|
282
|
+
}
|
|
283
|
+
};
|
|
386
284
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
) {
|
|
391
|
-
return false;
|
|
392
|
-
}
|
|
285
|
+
export const configureIngressLoadBalancer = async ({ t }: { t: TFunction }) => {
|
|
286
|
+
if (await isIngressController()) {
|
|
287
|
+
return;
|
|
393
288
|
}
|
|
394
289
|
|
|
395
|
-
|
|
290
|
+
const assistedImageServiceRoute = await getAssistedImageServiceRoute(t);
|
|
291
|
+
const domain = getClusterDomain(t, assistedImageServiceRoute);
|
|
292
|
+
await createIngressController(t, domain);
|
|
293
|
+
await patchAssistedImageServiceRoute(t, assistedImageServiceRoute, domain);
|
|
396
294
|
};
|
package/lib/cim/hooks/index.tsx
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useK8sWatchResource } from './useK8sWatchResource';
|
|
2
|
+
import { AgentK8sResource } from '../types';
|
|
3
|
+
import { K8sWatchHookProps } from './types';
|
|
4
|
+
|
|
5
|
+
export const useAgents = (props: K8sWatchHookProps) =>
|
|
6
|
+
useK8sWatchResource<AgentK8sResource[]>(
|
|
7
|
+
{
|
|
8
|
+
groupVersionKind: {
|
|
9
|
+
group: 'agent-install.openshift.io',
|
|
10
|
+
kind: 'Agent',
|
|
11
|
+
version: 'v1beta1',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
props,
|
|
15
|
+
);
|
|
@@ -56,7 +56,7 @@ export type AgentClusterInstallK8sResource = K8sResourceCommon & {
|
|
|
56
56
|
cidr: string;
|
|
57
57
|
}[];
|
|
58
58
|
userManagedNetworking?: boolean;
|
|
59
|
-
networkType?: 'OpenShiftSDN' | 'OVNKubernetes';
|
|
59
|
+
networkType?: 'OpenShiftSDN' | 'OVNKubernetes' | 'CiscoACI' | 'Cilium' | 'Calico' | 'None';
|
|
60
60
|
};
|
|
61
61
|
holdInstallation?: boolean;
|
|
62
62
|
platformType: string;
|