@openshift-assisted/ui-lib 2.54.2 → 2.55.1
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/modals/CimConfiguration/CimStorageMissingAlert.d.ts.map +1 -1
- package/build/@types/cim/components/modals/CimConfiguration/constants.d.ts +1 -1
- package/build/@types/common/api/assisted-service/ClustersAPI.d.ts +2 -1
- package/build/@types/common/api/assisted-service/ClustersAPI.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/utils.d.ts +9 -1
- package/build/@types/common/components/clusterConfiguration/utils.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.d.ts.map +1 -1
- package/build/@types/common/components/operators/operatorSpecs.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/PullSecretField.d.ts +1 -0
- package/build/@types/common/components/ui/formik/PullSecretField.d.ts.map +1 -1
- package/build/@types/common/config/docs_links.d.ts.map +1 -1
- package/build/@types/common/types/clusters.d.ts +1 -1
- package/build/@types/common/types/clusters.d.ts.map +1 -1
- package/build/@types/ocm/components/Routes.d.ts +1 -1
- package/build/@types/ocm/components/Routes.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/customManifestsValidationSchema.d.ts +10 -2
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/customManifestsValidationSchema.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.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/utils.d.ts +1 -1
- package/build/@types/ocm/components/clusterConfiguration/review/utils.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterDetail/AssistedInstallerDetailCard.d.ts +1 -1
- package/build/@types/ocm/components/clusterDetail/AssistedInstallerDetailCard.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterWizardContext.d.ts +5 -0
- package/build/@types/ocm/components/clusterWizard/ClusterWizardContext.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterWizardContextProvider.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/NewClusterWizard.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/constants.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/disconnected/BasicStep.d.ts +1 -0
- package/build/@types/ocm/components/clusterWizard/disconnected/BasicStep.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.d.ts +4 -0
- package/build/@types/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterWizard/disconnected/ReviewStep.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/ui/Buttons/BackButton.d.ts +1 -1
- package/build/@types/ocm/components/ui/Buttons/BackButton.d.ts.map +1 -1
- package/build/@types/ocm/services/ClustersService.d.ts +2 -1
- package/build/@types/ocm/services/ClustersService.d.ts.map +1 -1
- package/build/@types/ocm/store/hooks.d.ts +1 -1
- package/build/@types/ocm/store/slices/clusters/selectors.d.ts +5 -61
- package/build/@types/ocm/store/slices/clusters/selectors.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/feature-flags/selectors.d.ts +2 -20
- package/build/@types/ocm/store/slices/feature-flags/selectors.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/infra-envs/selectors.d.ts +4 -21
- package/build/@types/ocm/store/slices/infra-envs/selectors.d.ts.map +1 -1
- package/build/cjs/cim/components/Agent/NoAgentsAlert.js +2 -2
- package/build/cjs/cim/components/Agent/NoAgentsAlert.js.map +1 -1
- package/build/cjs/cim/components/Agent/tableColumns.js +3 -3
- package/build/cjs/cim/components/Agent/tableColumns.js.map +1 -1
- package/build/cjs/cim/components/Hypershift/DetailsPage/NodePoolsTable.js +2 -2
- package/build/cjs/cim/components/Hypershift/DetailsPage/NodePoolsTable.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js +2 -2
- package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js.map +1 -1
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigProgressAlert.js +3 -3
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigProgressAlert.js.map +1 -1
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationFormFields.js +1 -1
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationFormFields.js.map +1 -1
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationModal.js +2 -2
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationModal.js.map +1 -1
- package/build/cjs/cim/components/modals/CimConfiguration/CimStorageMissingAlert.js +3 -3
- package/build/cjs/cim/components/modals/CimConfiguration/CimStorageMissingAlert.js.map +1 -1
- package/build/cjs/cim/components/modals/CimConfiguration/constants.js +1 -1
- package/build/cjs/cim/components/modals/MassDeleteAgentModal.js +2 -2
- package/build/cjs/cim/components/modals/MassDeleteAgentModal.js.map +1 -1
- package/build/cjs/common/api/assisted-service/ClustersAPI.js +3 -0
- package/build/cjs/common/api/assisted-service/ClustersAPI.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/utils.js +13 -1
- package/build/cjs/common/components/clusterConfiguration/utils.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/utils.test.js +36 -0
- package/build/cjs/common/components/clusterConfiguration/utils.test.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js +29 -31
- package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.js +19 -30
- package/build/cjs/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.js.map +1 -1
- package/build/cjs/common/components/operators/operatorSpecs.js +0 -3
- package/build/cjs/common/components/operators/operatorSpecs.js.map +1 -1
- package/build/cjs/common/components/ui/formik/PullSecretField.js +2 -2
- package/build/cjs/common/components/ui/formik/PullSecretField.js.map +1 -1
- package/build/cjs/common/config/docs_links.js +2 -2
- package/build/cjs/common/config/docs_links.js.map +1 -1
- package/build/cjs/common/validationSchemas/addressValidation.js +1 -1
- package/build/cjs/common/validationSchemas/addressValidation.js.map +1 -1
- package/build/cjs/ocm/components/Routes.js +8 -8
- package/build/cjs/ocm/components/Routes.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/customManifestsValidationSchema.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.js +68 -17
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js +50 -13
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.js +4 -2
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/utils.js +7 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/utils.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/utils.test.js +35 -0
- package/build/cjs/ocm/components/clusterConfiguration/review/utils.test.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/AssistedInstallerDetailCard.js +4 -4
- package/build/cjs/ocm/components/clusterDetail/AssistedInstallerDetailCard.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterDetail.js +4 -4
- package/build/cjs/ocm/components/clusterDetail/ClusterDetail.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +4 -4
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js +2 -2
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContext.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js +11 -2
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardFooter.js +2 -2
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardFooter.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/NewClusterWizard.js +3 -0
- package/build/cjs/ocm/components/clusterWizard/NewClusterWizard.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/Operators.js +4 -4
- package/build/cjs/ocm/components/clusterWizard/Operators.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/constants.js +1 -0
- package/build/cjs/ocm/components/clusterWizard/constants.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/disconnected/BasicStep.js +16 -22
- package/build/cjs/ocm/components/clusterWizard/disconnected/BasicStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.js +102 -0
- package/build/cjs/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.js.map +1 -0
- package/build/cjs/ocm/components/clusterWizard/disconnected/ReviewStep.js +10 -8
- package/build/cjs/ocm/components/clusterWizard/disconnected/ReviewStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/wizardTransition.js +3 -0
- package/build/cjs/ocm/components/clusterWizard/wizardTransition.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClusterBreadcrumbs.js +2 -2
- package/build/cjs/ocm/components/clusters/ClusterBreadcrumbs.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClusterPage.js +4 -4
- package/build/cjs/ocm/components/clusters/ClusterPage.js.map +1 -1
- package/build/cjs/ocm/components/clusters/Clusters.js +3 -3
- package/build/cjs/ocm/components/clusters/Clusters.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClustersListToolbar.js +3 -3
- package/build/cjs/ocm/components/clusters/ClustersListToolbar.js.map +1 -1
- package/build/cjs/ocm/components/ui/Buttons/BackButton.js +2 -2
- package/build/cjs/ocm/components/ui/Buttons/BackButton.js.map +1 -1
- package/build/cjs/ocm/services/ClustersService.js +3 -0
- package/build/cjs/ocm/services/ClustersService.js.map +1 -1
- package/build/cjs/ocm/store/slices/clusters/selectors.js +2 -2
- package/build/cjs/ocm/store/slices/clusters/selectors.js.map +1 -1
- package/build/cjs/ocm/store/slices/feature-flags/selectors.js.map +1 -1
- package/build/cjs/ocm/store/slices/infra-envs/selectors.js.map +1 -1
- package/lib/cim/components/Agent/NoAgentsAlert.tsx +1 -1
- package/lib/cim/components/Agent/tableColumns.tsx +1 -1
- package/lib/cim/components/Hypershift/DetailsPage/NodePoolsTable.tsx +1 -1
- package/lib/cim/components/InfraEnv/AddHostDropdown.tsx +1 -1
- package/lib/cim/components/modals/CimConfiguration/CimConfigProgressAlert.tsx +2 -2
- package/lib/cim/components/modals/CimConfiguration/CimConfigurationFormFields.tsx +1 -1
- package/lib/cim/components/modals/CimConfiguration/CimConfigurationModal.tsx +2 -2
- package/lib/cim/components/modals/CimConfiguration/CimStorageMissingAlert.tsx +5 -2
- package/lib/cim/components/modals/CimConfiguration/constants.ts +1 -1
- package/lib/cim/components/modals/MassDeleteAgentModal.tsx +1 -1
- package/lib/common/api/assisted-service/ClustersAPI.ts +8 -0
- package/lib/common/components/clusterConfiguration/utils.test.ts +43 -1
- package/lib/common/components/clusterConfiguration/utils.ts +13 -0
- package/lib/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.tsx +31 -57
- package/lib/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.tsx +33 -38
- package/lib/common/components/operators/operatorSpecs.tsx +0 -16
- package/lib/common/components/ui/formik/PullSecretField.tsx +5 -2
- package/lib/common/config/docs_links.ts +2 -2
- package/lib/common/types/clusters.ts +1 -1
- package/lib/common/validationSchemas/addressValidation.tsx +2 -2
- package/lib/ocm/components/Routes.tsx +2 -2
- package/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx +2 -2
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/customManifestsValidationSchema.tsx +2 -2
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.tsx +86 -22
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +2 -2
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.ts +57 -20
- package/lib/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.tsx +4 -2
- package/lib/ocm/components/clusterConfiguration/review/utils.test.ts +41 -0
- package/lib/ocm/components/clusterConfiguration/review/utils.tsx +5 -2
- package/lib/ocm/components/clusterDetail/AssistedInstallerDetailCard.tsx +1 -1
- package/lib/ocm/components/clusterDetail/ClusterDetail.tsx +3 -3
- package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +2 -2
- package/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx +1 -1
- package/lib/ocm/components/clusterWizard/ClusterWizardContext.tsx +5 -0
- package/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx +10 -1
- package/lib/ocm/components/clusterWizard/ClusterWizardFooter.tsx +1 -1
- package/lib/ocm/components/clusterWizard/NewClusterWizard.tsx +3 -0
- package/lib/ocm/components/clusterWizard/Operators.tsx +2 -2
- package/lib/ocm/components/clusterWizard/constants.ts +1 -0
- package/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx +31 -52
- package/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx +173 -0
- package/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx +11 -9
- package/lib/ocm/components/clusterWizard/wizardTransition.ts +4 -0
- package/lib/ocm/components/clusters/ClusterBreadcrumbs.tsx +1 -1
- package/lib/ocm/components/clusters/ClusterPage.tsx +1 -1
- package/lib/ocm/components/clusters/Clusters.tsx +2 -2
- package/lib/ocm/components/clusters/ClustersListToolbar.tsx +2 -2
- package/lib/ocm/components/ui/Buttons/BackButton.tsx +1 -1
- package/lib/ocm/services/ClustersService.ts +5 -0
- package/lib/ocm/store/slices/clusters/selectors.tsx +7 -5
- package/lib/ocm/store/slices/feature-flags/selectors.ts +5 -2
- package/lib/ocm/store/slices/infra-envs/selectors.ts +4 -2
- package/package.json +8 -8
|
@@ -118,7 +118,7 @@ export const CimConfigurationModal: React.FC<CimConfigurationModalProps> = ({
|
|
|
118
118
|
agentServiceConfig?.spec?.filesystemStorage?.resources?.requests?.storage,
|
|
119
119
|
),
|
|
120
120
|
imgVolSize: getStorageSizeGiB(
|
|
121
|
-
|
|
121
|
+
100,
|
|
122
122
|
agentServiceConfig?.spec?.imageStorage?.resources?.requests?.storage,
|
|
123
123
|
),
|
|
124
124
|
configureLoadBalancer: platform === 'AWS',
|
|
@@ -134,7 +134,7 @@ export const CimConfigurationModal: React.FC<CimConfigurationModalProps> = ({
|
|
|
134
134
|
.min(MIN_FS_VOL_SIZE, t('ai:Minimal value is 1Gi'))
|
|
135
135
|
.required(t('ai:Required field')),
|
|
136
136
|
imgVolSize: Yup.number()
|
|
137
|
-
.min(MIN_IMG_VOL_SIZE, t('ai:Minimal value is
|
|
137
|
+
.min(MIN_IMG_VOL_SIZE, t('ai:Minimal value is 50Gi'))
|
|
138
138
|
.required(t('ai:Required field')),
|
|
139
139
|
configureLoadBalancer: Yup.boolean(),
|
|
140
140
|
addCiscoIntersightURL: Yup.boolean(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useNavigate } from 'react-router
|
|
2
|
+
import { useNavigate } from 'react-router';
|
|
3
3
|
import { Alert, AlertActionLink, AlertVariant } from '@patternfly/react-core';
|
|
4
4
|
import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
5
5
|
|
|
@@ -20,7 +20,10 @@ export const CimStorageMissingAlert: React.FC<{
|
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
const actionLinks: React.ReactNode[] = [
|
|
23
|
-
<AlertActionLink
|
|
23
|
+
<AlertActionLink
|
|
24
|
+
key="install-storage-operator"
|
|
25
|
+
onClick={() => void navigate(storageOperatorUrl)}
|
|
26
|
+
>
|
|
24
27
|
{t('ai:Install storage operator')}
|
|
25
28
|
</AlertActionLink>,
|
|
26
29
|
<AlertActionLink
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { TFunction } from 'i18next';
|
|
3
3
|
import { Button, Flex, FlexItem, Icon, Popover } from '@patternfly/react-core';
|
|
4
4
|
import { InfoCircleIcon } from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
5
|
-
import { Link } from 'react-router
|
|
5
|
+
import { Link } from 'react-router';
|
|
6
6
|
|
|
7
7
|
import { Host } from '@openshift-assisted/types/assisted-installer-service';
|
|
8
8
|
import {
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
Cluster,
|
|
4
4
|
ClusterCreateParams,
|
|
5
5
|
ClusterDefaultConfig,
|
|
6
|
+
DisconnectedClusterCreateParams,
|
|
6
7
|
V2ClusterUpdateParams,
|
|
7
8
|
Credentials,
|
|
8
9
|
Host,
|
|
@@ -142,6 +143,13 @@ const ClustersAPI = {
|
|
|
142
143
|
);
|
|
143
144
|
},
|
|
144
145
|
|
|
146
|
+
registerDisconnected(params: DisconnectedClusterCreateParams) {
|
|
147
|
+
return client.post<Cluster, AxiosResponse<Cluster>, DisconnectedClusterCreateParams>(
|
|
148
|
+
`${ClustersAPI.makeBaseURI()}disconnected`,
|
|
149
|
+
params,
|
|
150
|
+
);
|
|
151
|
+
},
|
|
152
|
+
|
|
145
153
|
update(clusterId: Cluster['id'], params: V2ClusterUpdateParams) {
|
|
146
154
|
return client.patch<Cluster, AxiosResponse<Cluster>, V2ClusterUpdateParams>(
|
|
147
155
|
`${ClustersAPI.makeBaseURI(clusterId)}`,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { test, describe, expect } from 'vitest';
|
|
2
|
-
import { isDualStack } from './utils';
|
|
2
|
+
import { isDualStack, getIPv6FromDualstack } from './utils';
|
|
3
3
|
import {
|
|
4
4
|
MachineNetwork,
|
|
5
5
|
ClusterNetwork,
|
|
@@ -273,3 +273,45 @@ describe('isDualStack', () => {
|
|
|
273
273
|
});
|
|
274
274
|
});
|
|
275
275
|
});
|
|
276
|
+
|
|
277
|
+
describe('getIPv6FromDualstack', () => {
|
|
278
|
+
test('returns the IPv6 entry from a dualstack array', () => {
|
|
279
|
+
const networks = [
|
|
280
|
+
{ cidr: '10.128.0.0/14', hostPrefix: 23, clusterId: 'test' },
|
|
281
|
+
{ cidr: 'fd01::/48', hostPrefix: 64, clusterId: 'test' },
|
|
282
|
+
];
|
|
283
|
+
const result = getIPv6FromDualstack(networks);
|
|
284
|
+
expect(result).toEqual({ cidr: 'fd01::/48', hostPrefix: 64, clusterId: 'test' });
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
test('returns the IPv6 entry when IPv6 is first', () => {
|
|
288
|
+
const networks = [
|
|
289
|
+
{ cidr: 'fd01::/48', hostPrefix: 64, clusterId: 'test' },
|
|
290
|
+
{ cidr: '10.128.0.0/14', hostPrefix: 23, clusterId: 'test' },
|
|
291
|
+
];
|
|
292
|
+
const result = getIPv6FromDualstack(networks);
|
|
293
|
+
expect(result).toEqual({ cidr: 'fd01::/48', hostPrefix: 64, clusterId: 'test' });
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
test('returns undefined when no IPv6 entry is present', () => {
|
|
297
|
+
const networks = [{ cidr: '10.128.0.0/14', hostPrefix: 23, clusterId: 'test' }];
|
|
298
|
+
expect(getIPv6FromDualstack(networks)).toBeUndefined();
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
test('returns undefined for an empty array', () => {
|
|
302
|
+
expect(getIPv6FromDualstack([])).toBeUndefined();
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
test('returns undefined for undefined input', () => {
|
|
306
|
+
expect(getIPv6FromDualstack(undefined)).toBeUndefined();
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
test('works with service networks (no hostPrefix)', () => {
|
|
310
|
+
const networks = [
|
|
311
|
+
{ cidr: '172.30.0.0/16', clusterId: 'test' },
|
|
312
|
+
{ cidr: 'fd02::/112', clusterId: 'test' },
|
|
313
|
+
];
|
|
314
|
+
const result = getIPv6FromDualstack(networks);
|
|
315
|
+
expect(result).toEqual({ cidr: 'fd02::/112', clusterId: 'test' });
|
|
316
|
+
});
|
|
317
|
+
});
|
|
@@ -188,6 +188,19 @@ export const canBeDualStack = (subnets: HostSubnets) =>
|
|
|
188
188
|
subnets.some((subnet) => Address4.isValid(subnet.subnet)) &&
|
|
189
189
|
subnets.some((subnet) => Address6.isValid(subnet.subnet));
|
|
190
190
|
|
|
191
|
+
export const isPrimaryIPv6 = (machineNetworks: MachineNetwork[] | undefined): boolean => {
|
|
192
|
+
const cidr = machineNetworks?.[0]?.cidr;
|
|
193
|
+
return !!cidr && Address6.isValid(cidr);
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Find the IPv6 entry in a dualstack network array.
|
|
198
|
+
* Dualstack arrays contain one IPv4 and one IPv6 entry; this helper returns the IPv6 one.
|
|
199
|
+
*/
|
|
200
|
+
export const getIPv6FromDualstack = <T extends { cidr?: string }>(
|
|
201
|
+
networks: T[] | undefined,
|
|
202
|
+
): T | undefined => networks?.find((n) => n.cidr && Address6.isValid(n.cidr));
|
|
203
|
+
|
|
191
204
|
const areNetworksDualStack = (
|
|
192
205
|
networks: (MachineNetwork | ClusterNetwork | ServiceNetwork)[] | undefined,
|
|
193
206
|
openshiftVersion?: string,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Alert,
|
|
4
4
|
AlertActionLink,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
Stack,
|
|
9
9
|
StackItem,
|
|
10
10
|
} from '@patternfly/react-core';
|
|
11
|
-
import { FieldArray, useFormikContext
|
|
11
|
+
import { FieldArray, useFormikContext } from 'formik';
|
|
12
12
|
import { Address4, Address6 } from 'ip-address';
|
|
13
13
|
|
|
14
14
|
import { HostSubnet, NetworkConfigurationValues } from '../../../types';
|
|
@@ -17,39 +17,11 @@ import { isMajorMinorVersionEqualOrGreater } from '../../../utils';
|
|
|
17
17
|
import { useTranslation } from '../../../hooks/use-translation-wrapper';
|
|
18
18
|
import { SubnetsDropdown } from './SubnetsDropdown';
|
|
19
19
|
import { reorderNetworksForPrimary } from './reorderNetworks';
|
|
20
|
-
import {
|
|
21
|
-
Cluster,
|
|
22
|
-
Host,
|
|
23
|
-
MachineNetwork,
|
|
24
|
-
} from '@openshift-assisted/types/assisted-installer-service';
|
|
20
|
+
import { Cluster, Host } from '@openshift-assisted/types/assisted-installer-service';
|
|
25
21
|
|
|
26
22
|
const subnetSort = (subA: HostSubnet, subB: HostSubnet) =>
|
|
27
23
|
subA.humanized.localeCompare(subB.humanized);
|
|
28
24
|
|
|
29
|
-
const useAutoSelectDefaultMachineNetworks = (
|
|
30
|
-
autoSelectNetwork: boolean,
|
|
31
|
-
setFieldValue: FormikHelpers<NetworkConfigurationValues>['setFieldValue'],
|
|
32
|
-
cidrV4: MachineNetwork['cidr'],
|
|
33
|
-
cidrV6: MachineNetwork['cidr'],
|
|
34
|
-
clusterId: string,
|
|
35
|
-
isDualStack: boolean,
|
|
36
|
-
) => {
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
if (autoSelectNetwork) {
|
|
39
|
-
setFieldValue(
|
|
40
|
-
'machineNetworks',
|
|
41
|
-
isDualStack
|
|
42
|
-
? [
|
|
43
|
-
{ cidr: cidrV4, clusterId },
|
|
44
|
-
{ cidr: cidrV6, clusterId },
|
|
45
|
-
]
|
|
46
|
-
: [{ cidr: cidrV4, clusterId }],
|
|
47
|
-
false,
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
}, [autoSelectNetwork, cidrV4, cidrV6, clusterId, isDualStack, setFieldValue]);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
25
|
export interface AvailableSubnetsControlProps {
|
|
54
26
|
clusterId: Cluster['id'];
|
|
55
27
|
hostSubnets: HostSubnet[];
|
|
@@ -81,31 +53,24 @@ export const AvailableSubnetsControl = ({
|
|
|
81
53
|
const supportsIPv6Primary =
|
|
82
54
|
openshiftVersion && isMajorMinorVersionEqualOrGreater(openshiftVersion, '4.12');
|
|
83
55
|
|
|
84
|
-
const IPv4Subnets = hostSubnets
|
|
85
|
-
.filter((subnet) => Address4.isValid(subnet.subnet))
|
|
86
|
-
.sort(subnetSort);
|
|
87
|
-
const IPv6Subnets = hostSubnets
|
|
88
|
-
.filter((subnet) => Address6.isValid(subnet.subnet))
|
|
89
|
-
.sort(subnetSort);
|
|
90
|
-
|
|
91
56
|
// For OCP >= 4.12, both networks can use either IPv4 or IPv6
|
|
92
|
-
const allSubnets =
|
|
93
|
-
|
|
94
|
-
|
|
57
|
+
const { IPv4Subnets, IPv6Subnets, allSubnets } = React.useMemo(() => {
|
|
58
|
+
const IPv4Subnets = hostSubnets
|
|
59
|
+
.filter((subnet) => Address4.isValid(subnet.subnet))
|
|
60
|
+
.sort(subnetSort);
|
|
95
61
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
);
|
|
62
|
+
const IPv6Subnets = hostSubnets
|
|
63
|
+
.filter((subnet) => Address6.isValid(subnet.subnet))
|
|
64
|
+
.sort(subnetSort);
|
|
65
|
+
|
|
66
|
+
const allSubnets = supportsIPv6Primary ? [...IPv4Subnets, ...IPv6Subnets] : IPv4Subnets;
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
IPv4Subnets,
|
|
70
|
+
IPv6Subnets,
|
|
71
|
+
allSubnets,
|
|
72
|
+
};
|
|
73
|
+
}, [hostSubnets, supportsIPv6Primary]);
|
|
109
74
|
|
|
110
75
|
// Ensure primary and secondary machine networks are not in the same stack (IPv4/IPv6).
|
|
111
76
|
// If the user switches primary to the same address family as secondary, adjust secondary to the opposite family
|
|
@@ -236,6 +201,15 @@ export const AvailableSubnetsControl = ({
|
|
|
236
201
|
}
|
|
237
202
|
}, [supportsIPv6Primary, primaryNetworkCidr, IPv4Subnets, IPv6Subnets, allSubnets]);
|
|
238
203
|
|
|
204
|
+
// Autoselect values in case machineNetworks is empty
|
|
205
|
+
React.useEffect(() => {
|
|
206
|
+
if (!isViewerMode && values.machineNetworks?.length === 0 && primaryMachineSubnets.length) {
|
|
207
|
+
setFieldValue('machineNetworks', [{ cidr: primaryMachineSubnets[0].subnet, clusterId }]);
|
|
208
|
+
}
|
|
209
|
+
// Run only once
|
|
210
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
211
|
+
}, []);
|
|
212
|
+
|
|
239
213
|
return (
|
|
240
214
|
<>
|
|
241
215
|
<FormGroup
|
|
@@ -252,9 +226,9 @@ export const AvailableSubnetsControl = ({
|
|
|
252
226
|
name="machineNetworks.0.cidr"
|
|
253
227
|
machineSubnets={primaryMachineSubnets}
|
|
254
228
|
isDisabled={isDisabled}
|
|
255
|
-
onAfterSelect={(newSelection) =>
|
|
256
|
-
reorderNetworksForPrimary(newSelection, values, setFieldValue)
|
|
257
|
-
}
|
|
229
|
+
onAfterSelect={(newSelection) => {
|
|
230
|
+
reorderNetworksForPrimary(newSelection, values, setFieldValue);
|
|
231
|
+
}}
|
|
258
232
|
data-testid="subnets-dropdown-toggle-primary"
|
|
259
233
|
/>
|
|
260
234
|
</StackItem>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ButtonVariant, FormGroup, Split, SplitItem, Tooltip } from '@patternfly/react-core';
|
|
2
|
+
import { ButtonVariant, FormGroup, Radio, Split, SplitItem, Tooltip } from '@patternfly/react-core';
|
|
3
3
|
import { useFormikContext } from 'formik';
|
|
4
4
|
import { Address4, Address6 } from 'ip-address';
|
|
5
5
|
|
|
@@ -9,10 +9,9 @@ import {
|
|
|
9
9
|
NETWORK_TYPE_OVN,
|
|
10
10
|
NETWORK_TYPE_SDN,
|
|
11
11
|
} from '../../../types';
|
|
12
|
-
import { getFieldId } from '../../ui';
|
|
12
|
+
import { ConfirmationModal, getFieldId, PopoverIcon } from '../../ui';
|
|
13
13
|
import { DUAL_STACK, NO_SUBNET_SET, SINGLE_STACK } from '../../../config';
|
|
14
14
|
import { RadioField } from '../../ui/formik';
|
|
15
|
-
import { ConfirmationModal, PopoverIcon } from '../../ui';
|
|
16
15
|
import { useTranslation } from '../../../hooks/use-translation-wrapper';
|
|
17
16
|
import { reorderNetworksByCurrentPrimary } from './reorderNetworks';
|
|
18
17
|
import {
|
|
@@ -72,36 +71,32 @@ export const StackTypeControlGroup = ({
|
|
|
72
71
|
|
|
73
72
|
const IPv6Subnets = hostSubnets.filter((subnet) => Address6.isValid(subnet.subnet));
|
|
74
73
|
const cidrIPv6 = IPv6Subnets.length >= 1 ? IPv6Subnets[0].subnet : NO_SUBNET_SET;
|
|
74
|
+
const isSingleStackSelected = values.stackType !== DUAL_STACK;
|
|
75
|
+
|
|
75
76
|
const shouldSetSingleStack =
|
|
76
77
|
!isViewerMode && !isDualStackSelectable && values.stackType === DUAL_STACK;
|
|
77
78
|
|
|
78
79
|
const setSingleStack = React.useCallback(() => {
|
|
79
80
|
setFieldValue('stackType', SINGLE_STACK);
|
|
80
81
|
|
|
81
|
-
// Determine whether the first machine network is IPv4
|
|
82
82
|
const firstNetwork = values.machineNetworks?.[0];
|
|
83
83
|
const isFirstIPv4 = Boolean(firstNetwork?.cidr && Address4.isValid(firstNetwork.cidr));
|
|
84
84
|
|
|
85
85
|
if (values.machineNetworks && values.machineNetworks?.length >= 2) {
|
|
86
|
-
// For single-stack IPv4, prefer IPv4 machine network
|
|
87
86
|
if (isFirstIPv4) {
|
|
88
|
-
// Keep the first network if it's IPv4
|
|
89
87
|
setFieldValue('machineNetworks', [firstNetwork]);
|
|
90
88
|
} else {
|
|
91
|
-
// If first is IPv6, look for IPv4 network or set empty for auto-selection
|
|
92
89
|
const ipv4Network = values.machineNetworks.find(
|
|
93
90
|
(network) => network.cidr && Address4.isValid(network.cidr),
|
|
94
91
|
);
|
|
95
92
|
if (ipv4Network) {
|
|
96
93
|
setFieldValue('machineNetworks', [ipv4Network]);
|
|
97
94
|
} else {
|
|
98
|
-
// No IPv4 network found, set empty for auto-selection
|
|
99
95
|
setFieldValue('machineNetworks', []);
|
|
100
96
|
}
|
|
101
97
|
}
|
|
102
98
|
}
|
|
103
99
|
|
|
104
|
-
// Set cluster/service to IPv4 defaults when switching to single-stack
|
|
105
100
|
if (values.clusterNetworks && values.clusterNetworks.length >= 1) {
|
|
106
101
|
const defaultCluster =
|
|
107
102
|
defaultNetworkValues.clusterNetworksIpv4 && defaultNetworkValues.clusterNetworksIpv4[0];
|
|
@@ -110,12 +105,12 @@ export const StackTypeControlGroup = ({
|
|
|
110
105
|
? {
|
|
111
106
|
cidr: defaultCluster.cidr,
|
|
112
107
|
hostPrefix: defaultCluster.hostPrefix,
|
|
113
|
-
clusterId: firstCluster.clusterId,
|
|
108
|
+
clusterId: firstCluster.clusterId,
|
|
114
109
|
}
|
|
115
110
|
: {
|
|
116
111
|
cidr: '',
|
|
117
112
|
hostPrefix: '',
|
|
118
|
-
clusterId: clusterId,
|
|
113
|
+
clusterId: clusterId,
|
|
119
114
|
};
|
|
120
115
|
setFieldValue('clusterNetworks', [ipv4Cluster]);
|
|
121
116
|
}
|
|
@@ -126,22 +121,20 @@ export const StackTypeControlGroup = ({
|
|
|
126
121
|
const ipv4Service = defaultService
|
|
127
122
|
? {
|
|
128
123
|
cidr: defaultService.cidr,
|
|
129
|
-
clusterId: firstService.clusterId,
|
|
124
|
+
clusterId: firstService.clusterId,
|
|
130
125
|
}
|
|
131
126
|
: {
|
|
132
127
|
cidr: '',
|
|
133
|
-
clusterId: clusterId,
|
|
128
|
+
clusterId: clusterId,
|
|
134
129
|
};
|
|
135
130
|
setFieldValue('serviceNetworks', [ipv4Service]);
|
|
136
131
|
}
|
|
137
132
|
|
|
138
|
-
// Keep only IPv4 VIPs when switching to single-stack (unless DHCP allocation is used)
|
|
139
133
|
if (!values.vipDhcpAllocation) {
|
|
140
134
|
const pruneVips = (
|
|
141
135
|
vips?: { ip?: string; clusterId?: Cluster['id'] }[],
|
|
142
136
|
): { ip: string; clusterId: Cluster['id'] }[] => {
|
|
143
137
|
if (!vips || vips.length === 0) return [];
|
|
144
|
-
// Choose which index to keep based on whether the first network is IPv4
|
|
145
138
|
const keepIndex = isFirstIPv4 ? 0 : 1;
|
|
146
139
|
const chosen = vips[keepIndex];
|
|
147
140
|
return chosen && chosen.ip
|
|
@@ -177,12 +170,10 @@ export const StackTypeControlGroup = ({
|
|
|
177
170
|
}
|
|
178
171
|
|
|
179
172
|
if (values.machineNetworks && values.machineNetworks?.length < 2) {
|
|
180
|
-
// Ensure IPv4 is primary when switching to dual-stack
|
|
181
173
|
const firstNetwork = values.machineNetworks[0];
|
|
182
174
|
const isFirstIPv6 = firstNetwork?.cidr && Address6.isValid(firstNetwork.cidr);
|
|
183
175
|
|
|
184
176
|
if (isFirstIPv6) {
|
|
185
|
-
// If first network is IPv6, make IPv4 primary and IPv6 secondary
|
|
186
177
|
const IPv4Subnets = hostSubnets.filter((subnet) => Address4.isValid(subnet.subnet));
|
|
187
178
|
const cidrIPv4 = IPv4Subnets.length >= 1 ? IPv4Subnets[0].subnet : NO_SUBNET_SET;
|
|
188
179
|
setFieldValue(
|
|
@@ -194,7 +185,6 @@ export const StackTypeControlGroup = ({
|
|
|
194
185
|
false,
|
|
195
186
|
);
|
|
196
187
|
} else {
|
|
197
|
-
// If first network is IPv4, add IPv6 as secondary
|
|
198
188
|
setFieldValue(
|
|
199
189
|
'machineNetworks',
|
|
200
190
|
[...values.machineNetworks, { cidr: cidrIPv6, clusterId: clusterId }],
|
|
@@ -225,7 +215,6 @@ export const StackTypeControlGroup = ({
|
|
|
225
215
|
};
|
|
226
216
|
setFieldValue('serviceNetworks', [...values.serviceNetworks, secondServiceNetwork], false);
|
|
227
217
|
}
|
|
228
|
-
// Initialize VIPs for dual-stack
|
|
229
218
|
if (values.apiVips && values.apiVips.length < 2) {
|
|
230
219
|
setFieldValue(
|
|
231
220
|
'apiVips',
|
|
@@ -244,8 +233,9 @@ export const StackTypeControlGroup = ({
|
|
|
244
233
|
);
|
|
245
234
|
}
|
|
246
235
|
};
|
|
247
|
-
|
|
236
|
+
|
|
248
237
|
const primaryCidr = values.machineNetworks?.[0]?.cidr;
|
|
238
|
+
|
|
249
239
|
React.useEffect(() => {
|
|
250
240
|
if (isViewerMode) {
|
|
251
241
|
return;
|
|
@@ -261,10 +251,11 @@ export const StackTypeControlGroup = ({
|
|
|
261
251
|
values.serviceNetworks,
|
|
262
252
|
]);
|
|
263
253
|
|
|
264
|
-
const
|
|
265
|
-
if (
|
|
266
|
-
|
|
267
|
-
}
|
|
254
|
+
const handleSingleStackRadioClick = () => {
|
|
255
|
+
if (isSingleStackSelected) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
if (
|
|
268
259
|
hasDualStackConfigurationChanged(
|
|
269
260
|
defaultNetworkValues.clusterNetworksDualstack || [],
|
|
270
261
|
defaultNetworkValues.serviceNetworksDualstack || [],
|
|
@@ -284,32 +275,34 @@ export const StackTypeControlGroup = ({
|
|
|
284
275
|
}
|
|
285
276
|
}, [shouldSetSingleStack, setSingleStack]);
|
|
286
277
|
|
|
278
|
+
const singleStackPopoverContent = allowSingleStackIPv6
|
|
279
|
+
? t('ai:Select a single address family (IPv4 or IPv6) for your machine network.')
|
|
280
|
+
: t('ai:Select this when your hosts are using only IPv4.');
|
|
281
|
+
|
|
282
|
+
const singleStackRadioId = getFieldId('stackType', 'radio', SINGLE_STACK);
|
|
283
|
+
|
|
287
284
|
return (
|
|
288
285
|
<>
|
|
289
286
|
<FormGroup
|
|
290
|
-
label=
|
|
287
|
+
label={t('ai:Networking stack type')}
|
|
291
288
|
fieldId={getFieldId('stackType', 'radio')}
|
|
292
|
-
onChange={setStackType}
|
|
293
289
|
isInline
|
|
294
290
|
>
|
|
295
291
|
<Split>
|
|
296
292
|
<SplitItem>
|
|
297
|
-
<
|
|
298
|
-
|
|
293
|
+
<Radio
|
|
294
|
+
id={singleStackRadioId}
|
|
295
|
+
name="stackType"
|
|
299
296
|
value={SINGLE_STACK}
|
|
300
|
-
isDisabled={!isDualStackSelectable || isViewerMode}
|
|
301
297
|
label={`${singleStackLabel}\u00A0`}
|
|
298
|
+
isChecked={isSingleStackSelected}
|
|
299
|
+
isDisabled={!isDualStackSelectable || isViewerMode}
|
|
300
|
+
onChange={() => handleSingleStackRadioClick()}
|
|
301
|
+
data-testid="form-radio-stackType-singleStack-field"
|
|
302
302
|
/>
|
|
303
303
|
</SplitItem>
|
|
304
304
|
<SplitItem>
|
|
305
|
-
<PopoverIcon
|
|
306
|
-
bodyContent={
|
|
307
|
-
allowSingleStackIPv6
|
|
308
|
-
? t('ai:Select a single address family (IPv4 or IPv6) for your machine network.')
|
|
309
|
-
: t('ai:Select this when your hosts are using only IPv4.')
|
|
310
|
-
}
|
|
311
|
-
buttonStyle={{ top: '-4px' }}
|
|
312
|
-
/>
|
|
305
|
+
<PopoverIcon bodyContent={singleStackPopoverContent} buttonStyle={{ top: '-4px' }} />
|
|
313
306
|
</SplitItem>
|
|
314
307
|
</Split>
|
|
315
308
|
<Split>
|
|
@@ -325,6 +318,8 @@ export const StackTypeControlGroup = ({
|
|
|
325
318
|
value={DUAL_STACK}
|
|
326
319
|
isDisabled={!isDualStackSelectable || isViewerMode}
|
|
327
320
|
label="Dual-stack "
|
|
321
|
+
callFormikOnChange={false}
|
|
322
|
+
onChange={() => setDualStack()}
|
|
328
323
|
/>
|
|
329
324
|
</Tooltip>
|
|
330
325
|
</SplitItem>
|
|
@@ -343,7 +338,7 @@ export const StackTypeControlGroup = ({
|
|
|
343
338
|
titleIconVariant={'warning'}
|
|
344
339
|
confirmationButtonText={'Change'}
|
|
345
340
|
confirmationButtonVariant={ButtonVariant.primary}
|
|
346
|
-
content={<p>All data and configuration done for
|
|
341
|
+
content={<p>All data and configuration done for 'Dual-stack' will be lost.</p>}
|
|
347
342
|
onClose={() => {
|
|
348
343
|
setConfirmModal(false);
|
|
349
344
|
setDualStack();
|
|
@@ -53,11 +53,8 @@ import {
|
|
|
53
53
|
NODE_HEALTHCHECK_LINK,
|
|
54
54
|
NODE_MAINTENANCE_LINK,
|
|
55
55
|
ODF_LINK,
|
|
56
|
-
ODF_REQUIREMENTS_LINK,
|
|
57
56
|
OPENSHIFT_AI_LINK,
|
|
58
|
-
OPENSHIFT_AI_REQUIREMENTS_LINK,
|
|
59
57
|
OSC_LINK,
|
|
60
|
-
OSC_REQUIREMENTS_LINK,
|
|
61
58
|
PIPELINES_OPERATOR_LINK,
|
|
62
59
|
SERVERLESS_OPERATOR_LINK,
|
|
63
60
|
SERVICE_MESH_OPERATOR_LINK,
|
|
@@ -183,11 +180,6 @@ export const getOperatorSpecs = (
|
|
|
183
180
|
title: 'OpenShift Data Foundation',
|
|
184
181
|
featureId: 'ODF',
|
|
185
182
|
descriptionText: DESCRIPTION_ODF,
|
|
186
|
-
Requirements: () => (
|
|
187
|
-
<ExternalLink href={ODF_REQUIREMENTS_LINK}>
|
|
188
|
-
Learn more about the requirements for OpenShift Data Foundation
|
|
189
|
-
</ExternalLink>
|
|
190
|
-
),
|
|
191
183
|
Description: ({ searchTerm }) => (
|
|
192
184
|
<>
|
|
193
185
|
<HighlightedText text={DESCRIPTION_ODF} searchTerm={searchTerm} />{' '}
|
|
@@ -246,11 +238,6 @@ export const getOperatorSpecs = (
|
|
|
246
238
|
title: 'OpenShift sandboxed containers',
|
|
247
239
|
featureId: 'OSC',
|
|
248
240
|
descriptionText: DESCRIPTION_OSC,
|
|
249
|
-
Requirements: () => (
|
|
250
|
-
<ExternalLink href={OSC_REQUIREMENTS_LINK}>
|
|
251
|
-
Learn more about the requirements for OpenShift sandboxed containers
|
|
252
|
-
</ExternalLink>
|
|
253
|
-
),
|
|
254
241
|
Description: ({ searchTerm }) => (
|
|
255
242
|
<>
|
|
256
243
|
<HighlightedText text={DESCRIPTION_OSC} searchTerm={searchTerm} />{' '}
|
|
@@ -266,9 +253,6 @@ export const getOperatorSpecs = (
|
|
|
266
253
|
title: 'OpenShift AI',
|
|
267
254
|
featureId: 'OPENSHIFT_AI',
|
|
268
255
|
descriptionText: DESCRIPTION_OPENSHIFT_AI,
|
|
269
|
-
Requirements: () => (
|
|
270
|
-
<ExternalLink href={OPENSHIFT_AI_REQUIREMENTS_LINK}>Learn more</ExternalLink>
|
|
271
|
-
),
|
|
272
256
|
Description: ({ searchTerm }) => (
|
|
273
257
|
<>
|
|
274
258
|
<HighlightedText text={DESCRIPTION_OPENSHIFT_AI} searchTerm={searchTerm} />{' '}
|
|
@@ -65,7 +65,10 @@ const GetPullSecretHelperText: React.FC<{ isOcm: boolean }> = ({ isOcm }) => {
|
|
|
65
65
|
);
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
const PullSecretField: React.FC<{ isOcm: boolean }> = ({
|
|
68
|
+
const PullSecretField: React.FC<{ isOcm: boolean; isRequired?: boolean }> = ({
|
|
69
|
+
isOcm,
|
|
70
|
+
isRequired = true,
|
|
71
|
+
}) => {
|
|
69
72
|
const { t } = useTranslation();
|
|
70
73
|
return (
|
|
71
74
|
<TextAreaField
|
|
@@ -75,7 +78,7 @@ const PullSecretField: React.FC<{ isOcm: boolean }> = ({ isOcm }) => {
|
|
|
75
78
|
getErrorText={(error) => error}
|
|
76
79
|
helperText={<GetPullSecretHelperText isOcm={isOcm} />}
|
|
77
80
|
rows={10}
|
|
78
|
-
isRequired
|
|
81
|
+
isRequired={isRequired}
|
|
79
82
|
/>
|
|
80
83
|
);
|
|
81
84
|
};
|
|
@@ -118,7 +118,7 @@ export const getMceDocsLink = (ocpVersion?: string) =>
|
|
|
118
118
|
export const getLvmsDocsLink = (ocpVersion?: string) =>
|
|
119
119
|
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
|
|
120
120
|
ocpVersion,
|
|
121
|
-
)}/html/storage/
|
|
121
|
+
)}/html-single/storage/index#persistent-storage-using-lvms`;
|
|
122
122
|
|
|
123
123
|
export const NODE_HEALTHCHECK_LINK =
|
|
124
124
|
'https://docs.redhat.com/en/documentation/workload_availability_for_red_hat_openshift/latest/html/remediation_fencing_and_maintenance/node-health-check-operator';
|
|
@@ -229,7 +229,7 @@ export const getClusterObservabilityLink = (ocpVersion?: string) =>
|
|
|
229
229
|
export const getLokiLink = (ocpVersion?: string) =>
|
|
230
230
|
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
|
|
231
231
|
ocpVersion,
|
|
232
|
-
)}/html/network_observability/network-observability-
|
|
232
|
+
)}/html/network_observability/installing-network-observability-operators#network-observability-loki-installation_network_observability`;
|
|
233
233
|
|
|
234
234
|
export const getOpenShiftLoggingLink = (ocpVersion?: string) =>
|
|
235
235
|
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
|
|
@@ -73,4 +73,4 @@ export const SupportedPlatformIntegrations: SupportedPlatformType[] = [
|
|
|
73
73
|
];
|
|
74
74
|
export const NonPlatformIntegrations: PlatformType[] = ['baremetal', 'none'];
|
|
75
75
|
|
|
76
|
-
export type DiscoveryImageType = ImageType | 'discovery-image-ipxe';
|
|
76
|
+
export type DiscoveryImageType = Exclude<ImageType, 'disconnected-iso'> | 'discovery-image-ipxe';
|
|
@@ -9,7 +9,7 @@ import { HostSubnets, NetworkConfigurationValues } from '../types';
|
|
|
9
9
|
import { IP_V4_ZERO, IP_V6_ZERO, MAC_REGEX } from './regexes';
|
|
10
10
|
import { getArrayIndexFromPath, isIPorDN, isIPv4Address, isIPv6Address } from './utils';
|
|
11
11
|
import { NO_SUBNET_SET } from '../config';
|
|
12
|
-
import {
|
|
12
|
+
import { overlapCidr } from 'cidr-tools';
|
|
13
13
|
import parseUrl from 'parse-url';
|
|
14
14
|
import { TFunction } from 'i18next';
|
|
15
15
|
|
|
@@ -272,7 +272,7 @@ export const ipBlockValidationSchema = (
|
|
|
272
272
|
.test('cidrs-can-not-overlap', t('ai:Provided CIDRs can not overlap.'), (cidr: string) => {
|
|
273
273
|
try {
|
|
274
274
|
if (cidr && reservedCidrs && reservedCidrs.length > 0) {
|
|
275
|
-
return !
|
|
275
|
+
return !overlapCidr(cidr, reservedCidrs);
|
|
276
276
|
}
|
|
277
277
|
} catch {
|
|
278
278
|
return false;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Outlet,
|
|
8
8
|
unstable_HistoryRouter as HistoryRouter,
|
|
9
9
|
HistoryRouterProps,
|
|
10
|
-
} from 'react-router
|
|
10
|
+
} from 'react-router';
|
|
11
11
|
import { Clusters, ClusterPage, NewClusterPage } from './clusters';
|
|
12
12
|
import type { FeatureListType } from '../../common/features/featureGate';
|
|
13
13
|
import { AssistedUILibVersion } from './ui';
|
|
@@ -39,7 +39,7 @@ export const UILibRoutes = ({
|
|
|
39
39
|
<Route index element={<Clusters />} />
|
|
40
40
|
</Route>
|
|
41
41
|
{children}
|
|
42
|
-
<Route path="*" element={<Navigate to="assisted-installer/clusters" />} />
|
|
42
|
+
<Route path="*" element={<Navigate to="/assisted-installer/clusters" />} />
|
|
43
43
|
</Routes>
|
|
44
44
|
</>
|
|
45
45
|
);
|
|
@@ -106,7 +106,7 @@ export const OcmDiscoveryImageConfigForm = ({
|
|
|
106
106
|
httpsProxy: httpsProxy || '',
|
|
107
107
|
noProxy: noProxy || '',
|
|
108
108
|
enableProxy: !!(httpProxy || httpsProxy || noProxy),
|
|
109
|
-
imageType: imageTypeValue as
|
|
109
|
+
imageType: imageTypeValue as DiscoveryImageType,
|
|
110
110
|
enableCertificate: enableCertificate || false,
|
|
111
111
|
trustBundle: trustBundle || '',
|
|
112
112
|
};
|
|
@@ -155,7 +155,7 @@ export const OcmDiscoveryImageConfigForm = ({
|
|
|
155
155
|
<Form>
|
|
156
156
|
<DiscoveryImageTypeDropdown
|
|
157
157
|
name="imageType"
|
|
158
|
-
defaultValue={discoveryImageTypes[imageTypeValue]}
|
|
158
|
+
defaultValue={discoveryImageTypes[imageTypeValue as DiscoveryImageType]}
|
|
159
159
|
onChange={updateDiscoveryButtonAndAlertText}
|
|
160
160
|
selectedCpuArchitecture={selectedCpuArchitecture}
|
|
161
161
|
isDisabled={isOracleCloudInfrastructure}
|