Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MGMT-16982: Enable switching infra-availability-policy Single replica / HA #2511

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions libs/locales/lib/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@
"ai:Information & Troubleshooting": "Information & Troubleshooting",
"ai:Information and warnings": "Information and warnings",
"ai:Infrastructure": "Infrastructure",
"ai:Infrastructure availability policy": "Infrastructure availability policy",
"ai:Infrastructure env": "Infrastructure env",
"ai:Infrastructure environment details": "Infrastructure environment details",
"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.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,39 @@ const HostsForm: React.FC<HostsFormProps> = ({
</FormGroup>
</GridItem>

<GridItem>
<FormGroup isInline label={<>{t('ai:Infrastructure availability policy')}</>} isRequired>
<RadioField
name={'infrastructureAvailabilityPolicy'}
label={
<>
{t('ai:Highly available')}{' '}
<PopoverIcon
bodyContent={t(
'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.',
)}
/>
</>
}
value={'HighlyAvailable'}
/>
<RadioField
name={'infrastructureAvailabilityPolicy'}
label={
<>
{t('ai:Single replica')}{' '}
<PopoverIcon
bodyContent={t(
'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.',
)}
/>
</>
}
value={'SingleReplica'}
/>
</FormGroup>
</GridItem>

<GridItem>
<SelectField
label={t('ai:Namespace')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const HostsStep: React.FC<HostsStepProps> = ({
initReleaseImage,
nodePools,
controllerAvailabilityPolicy,
infrastructureAvailabilityPolicy,
}) => {
const { t } = useTranslation();
const availableAgents = getAgentsForSelection(agents);
Expand All @@ -80,6 +81,7 @@ const HostsStep: React.FC<HostsStepProps> = ({
<Formik<HostsFormValues>
initialValues={{
controllerAvailabilityPolicy: controllerAvailabilityPolicy || 'HighlyAvailable',
infrastructureAvailabilityPolicy: infrastructureAvailabilityPolicy || 'HighlyAvailable',
agentNamespace: initInfraEnv || infraEnvsWithAgents[0]?.metadata?.namespace || '',
nodePools: initNodePools || [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type NodePoolFormValue = {

export type HostsFormValues = {
controllerAvailabilityPolicy: string;
infrastructureAvailabilityPolicy: string;
agentNamespace: string;
nodePools: NodePoolFormValue[];
};
Expand All @@ -29,4 +30,5 @@ export type HostsStepProps = {
initNodePools?: NodePoolFormValue[];
nodePools: NodePoolK8sResource[];
controllerAvailabilityPolicy: string;
infrastructureAvailabilityPolicy: string;
};
Loading