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-19346: Enable 4/5 CPN to Cluster Details Form #4146

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,25 @@ spec:
name: '{{{ai.name}}}'
holdInstallation: true
provisionRequirements:
workerAgents: 0
{{#switch ai.highAvailabilityMode}}
{{#case 'Full'}}
controlPlaneAgents: 3
{{/case}}

{{#case 'None'}}
workerAgents: 0
{{#if ai.controlPlaneAgents}}
Comment on lines +42 to +43
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for switch statement. A simple

Suggested change
workerAgents: 0
{{#if ai.controlPlaneAgents}}
workerAgents: 0
controlPlaneAgents: {{{ai.controlPlaneAgents}}}

will do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the problem is that controlPlaneAgents is an string and we need a number

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after fixing openshift-assisted/assisted-installer-ui#2727, we will have a number here.

also cim-template.hbs needs to be updated.

also in order to make the yaml editor -> UI form sync work, we need to update https://github.com/stolostron/console/blob/main/frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/DetailsForm.tsx#L138-L151

by adding the controlPlaneCount

controlPlaneCount: { path: 'AgentClusterInstall[0].spec.provisionRequirements.controlPlaneAgents' },

{{#switch ai.controlPlaneAgents}}
{{#case '1'}}
controlPlaneAgents: 1
{{/case}}
{{/switch}}
{{/case}}
{{#case '3'}}
controlPlaneAgents: 3
{{/case}}
{{#case '4'}}
controlPlaneAgents: 4
{{/case}}
{{#case '5'}}
controlPlaneAgents: 5
{{/case}}
{{/switch}}
{{else}}
controlPlaneAgents: 3
{{/if}}
imageSetRef:
name: '{{{ai.openshiftVersion}}}'
networking:
Expand Down