Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,7 @@ export const isDualStack = ({
clusterNetworks,
serviceNetworks,
openshiftVersion,
}: Pick<Cluster, 'machineNetworks' | 'clusterNetworks' | 'serviceNetworks'> & {
openshiftVersion?: string;
}) =>
}: Pick<Cluster, 'machineNetworks' | 'clusterNetworks' | 'serviceNetworks' | 'openshiftVersion'>) =>
areNetworksDualStack(machineNetworks, openshiftVersion) &&
areNetworksDualStack(clusterNetworks, openshiftVersion) &&
areNetworksDualStack(serviceNetworks, openshiftVersion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const getNetworkInitialValues = (
isClusterManagedNetworkingUnsupported: boolean,
): NetworkConfigurationValues => {
const isSNOCluster = isSNO(cluster);
const isDualStackType = isDualStack({ ...cluster, openshiftVersion: cluster.openshiftVersion });
const isDualStackType = isDualStack({ ...cluster });
Comment thread
ammont82 marked this conversation as resolved.
Outdated

return {
apiVips: cluster.apiVips,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { Title } from '@patternfly/react-core';
import { Table, TableVariant, Tbody, Td, Tr } from '@patternfly/react-table';
import React from 'react';
import {
genericTableRowKey,
isDualStack,
selectApiVip,
selectIngressVip,
} from '../../../../common';
import { genericTableRowKey, isDualStack } from '../../../../common';
import {
getManagementType,
getStackTypeLabel,
Expand Down Expand Up @@ -58,7 +53,7 @@ export const ReviewNetworkingTable = ({ cluster }: { cluster: Cluster }) => {
)),
props: { 'data-testid': 'machine-networks' },
},
isDualStack({ ...cluster, openshiftVersion: cluster.openshiftVersion })
isDualStack({ ...cluster })
Comment thread
ammont82 marked this conversation as resolved.
Outdated
? {
title: cluster.machineNetworks?.map((network, index) => (
<span key={network.cidr}>
Expand All @@ -78,9 +73,24 @@ export const ReviewNetworkingTable = ({ cluster }: { cluster: Cluster }) => {
cells: [
{ title: 'API IP' },
{
title: selectApiVip(cluster),
props: { 'data-testid': 'api-vip', colSpan: 2 },
title: cluster.apiVips?.map((apiVip) => (
<span key={apiVip.ip}>
{apiVip.ip}
<br />
</span>
)),
props: { 'data-testid': 'api-vip' },
},
isDualStack({ ...cluster })
? {
title: cluster.apiVips?.map((apiVip, index) => (
<span key={apiVip.ip}>
{index === 0 ? 'Primary' : 'Secondary'}
<br />
</span>
)),
}
: { title: '' },
],
});

Expand All @@ -91,9 +101,24 @@ export const ReviewNetworkingTable = ({ cluster }: { cluster: Cluster }) => {
cells: [
{ title: 'Ingress IP' },
{
title: selectIngressVip(cluster),
props: { 'data-testid': 'ingress-vip', colSpan: 2 },
title: cluster.ingressVips?.map((ingressVip) => (
<span key={ingressVip.ip}>
{ingressVip.ip}
<br />
</span>
)),
props: { 'data-testid': 'api-vip' },
Comment thread
ammont82 marked this conversation as resolved.
Outdated
},
isDualStack({ ...cluster })
? {
title: cluster.ingressVips?.map((ingressVip, index) => (
<span key={ingressVip.ip}>
{index === 0 ? 'Primary' : 'Secondary'}
<br />
</span>
)),
}
: { title: '' },
],
});

Expand All @@ -115,7 +140,7 @@ export const ReviewNetworkingTable = ({ cluster }: { cluster: Cluster }) => {
)),
props: { 'data-testid': 'cluster-network-cidr' },
},
isDualStack({ ...cluster, openshiftVersion: cluster.openshiftVersion }) && {
isDualStack({ ...cluster }) && {
title: cluster.clusterNetworks?.map((network, index) => (
<span key={network.cidr}>
{index === 0 ? 'Primary' : 'Secondary'}
Expand All @@ -138,7 +163,7 @@ export const ReviewNetworkingTable = ({ cluster }: { cluster: Cluster }) => {
)),
props: { 'data-testid': 'cluster-network-prefix' },
},
isDualStack({ ...cluster, openshiftVersion: cluster.openshiftVersion }) && {
isDualStack({ ...cluster }) && {
title: cluster.clusterNetworks?.map((network, index) => (
<span key={network.hostPrefix}>
{index === 0 ? 'Primary' : 'Secondary'}
Expand All @@ -161,7 +186,7 @@ export const ReviewNetworkingTable = ({ cluster }: { cluster: Cluster }) => {
)),
props: { 'data-testid': 'service-network-cidr' },
},
isDualStack({ ...cluster, openshiftVersion: cluster.openshiftVersion }) && {
isDualStack({ ...cluster }) && {
title: cluster.serviceNetworks?.map((network, index) => (
<span key={network.cidr}>
{index === 0 ? 'Primary' : 'Secondary'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const getManagementType = ({ userManagedNetworking }: Cluster): string =>
};

export const getStackTypeLabel = (cluster: Cluster): string =>
isDualStack({ ...cluster, openshiftVersion: cluster.openshiftVersion }) ? 'Dual-stack' : 'IPv4';
isDualStack({ ...cluster }) ? 'Dual-stack' : 'IPv4';

export const getDiskEncryptionEnabledOnStatus = (diskEncryption: DiskEncryption['enableOn']) => {
let diskEncryptionType = null;
Expand All @@ -67,7 +67,7 @@ export const getDiskEncryptionEnabledOnStatus = (diskEncryption: DiskEncryption[

const ClusterProperties = ({ cluster, externalMode = false }: ClusterPropertiesProps) => {
const { t } = useTranslation();
const isDualStackType = isDualStack({ ...cluster, openshiftVersion: cluster.openshiftVersion });
const isDualStackType = isDualStack({ ...cluster });
const featureSupportLevelContext = useNewFeatureSupportLevel();

const activeFeatureConfiguration = featureSupportLevelContext.activeFeatureConfiguration;
Expand Down
Loading