Skip to content

Commit 8a0e737

Browse files
authored
Add support for infrastructure availability policy (#2511)
1 parent 41872af commit 8a0e737

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

libs/locales/lib/en/translation.json

+1
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@
415415
"ai:Information & Troubleshooting": "Information & Troubleshooting",
416416
"ai:Information and warnings": "Information and warnings",
417417
"ai:Infrastructure": "Infrastructure",
418+
"ai:Infrastructure availability policy": "Infrastructure availability policy",
418419
"ai:Infrastructure env": "Infrastructure env",
419420
"ai:Infrastructure environment details": "Infrastructure environment details",
420421
"ai:Infrastructure environments are used by clusters. Create an infrastructure environment to add resources to your cluster.": "Infrastructure environments are used by clusters. Create an infrastructure environment to add resources to your cluster.",

libs/ui-lib/lib/cim/components/Hypershift/HostedClusterWizard/HostsStep/HostsForm.tsx

+33
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,39 @@ const HostsForm: React.FC<HostsFormProps> = ({
7575
</FormGroup>
7676
</GridItem>
7777

78+
<GridItem>
79+
<FormGroup isInline label={<>{t('ai:Infrastructure availability policy')}</>} isRequired>
80+
<RadioField
81+
name={'infrastructureAvailabilityPolicy'}
82+
label={
83+
<>
84+
{t('ai:Highly available')}{' '}
85+
<PopoverIcon
86+
bodyContent={t(
87+
'ai:Highly available means components should be resilient to problems across fault boundaries as defined by the component to which the policy is attached. This usually means running critical workloads with 3 replicas and with little or no toleration of disruption of the component.',
88+
)}
89+
/>
90+
</>
91+
}
92+
value={'HighlyAvailable'}
93+
/>
94+
<RadioField
95+
name={'infrastructureAvailabilityPolicy'}
96+
label={
97+
<>
98+
{t('ai:Single replica')}{' '}
99+
<PopoverIcon
100+
bodyContent={t(
101+
'ai:Single replica means components are not expected to be resilient to problems across most fault boundaries associated with high availability. This usually means running critical workloads with just 1 replica and with toleration of full disruption of the component.',
102+
)}
103+
/>
104+
</>
105+
}
106+
value={'SingleReplica'}
107+
/>
108+
</FormGroup>
109+
</GridItem>
110+
78111
<GridItem>
79112
<SelectField
80113
label={t('ai:Namespace')}

libs/ui-lib/lib/cim/components/Hypershift/HostedClusterWizard/HostsStep/HostsStep.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const HostsStep: React.FC<HostsStepProps> = ({
5757
initReleaseImage,
5858
nodePools,
5959
controllerAvailabilityPolicy,
60+
infrastructureAvailabilityPolicy,
6061
}) => {
6162
const { t } = useTranslation();
6263
const availableAgents = getAgentsForSelection(agents);
@@ -80,6 +81,7 @@ const HostsStep: React.FC<HostsStepProps> = ({
8081
<Formik<HostsFormValues>
8182
initialValues={{
8283
controllerAvailabilityPolicy: controllerAvailabilityPolicy || 'HighlyAvailable',
84+
infrastructureAvailabilityPolicy: infrastructureAvailabilityPolicy || 'HighlyAvailable',
8385
agentNamespace: initInfraEnv || infraEnvsWithAgents[0]?.metadata?.namespace || '',
8486
nodePools: initNodePools || [
8587
{

libs/ui-lib/lib/cim/components/Hypershift/HostedClusterWizard/HostsStep/types.ts

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export type NodePoolFormValue = {
99

1010
export type HostsFormValues = {
1111
controllerAvailabilityPolicy: string;
12+
infrastructureAvailabilityPolicy: string;
1213
agentNamespace: string;
1314
nodePools: NodePoolFormValue[];
1415
};
@@ -29,4 +30,5 @@ export type HostsStepProps = {
2930
initNodePools?: NodePoolFormValue[];
3031
nodePools: NodePoolK8sResource[];
3132
controllerAvailabilityPolicy: string;
33+
infrastructureAvailabilityPolicy: string;
3234
};

0 commit comments

Comments
 (0)