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-17186: Hosted cluster on BM in disconnected environment is not supported by UI #3404

Closed
Closed
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
3 changes: 3 additions & 0 deletions frontend/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,7 @@
"Governance": "Governance",
"Governance provides an extensible policy framework for enterprises to harden security for software engineering, secure engineering, and resiliency. Enhance your security to meet internal standards by using policies to verify which clusters are at risk": "Governance provides an extensible policy framework for enterprises to harden security for software engineering, secure engineering, and resiliency. Enhance your security to meet internal standards by using policies to verify which clusters are at risk",
"GPU Accelerated Compute": "GPU Accelerated Compute",
"Guest": "Guest",
"H1 - 16 TB of HDD-based local storage": "H1 - 16 TB of HDD-based local storage",
"Health check": "Health check",
"Health status": "Health status",
Expand Down Expand Up @@ -1767,6 +1768,7 @@
"managedClusterSet.form.removed": "Removed",
"managedClusterSet.form.transferred": "Transferred",
"managedClusterSet.form.unchanged": "No change",
"Management": "Management",
"Managing clusters <bold>just got easier</bold>": "Managing clusters <bold>just got easier</bold>",
"Manual run: Set this automation to run once. After the automation runs, it is set to disabled.": "Manual run: Set this automation to run once. After the automation runs, it is set to disabled.",
"Matched Clusters": "Matched Clusters",
Expand Down Expand Up @@ -1918,6 +1920,7 @@
"of": "of",
"Offline": "Offline",
"OIDC Secret for Red Hat OpenShift Provisioning with hosted control plane": "OIDC Secret for Red Hat OpenShift Provisioning with hosted control plane",
"OLM catalog placement": "OLM catalog placement",
"Once": "Once",
"One or more of the selected clusters have automations that will run before or after the upgrade. Expand the table rows to view the Ansible templates for each cluster.": "One or more of the selected clusters have automations that will run before or after the upgrade. Expand the table rows to view the Ansible templates for each cluster.",
"One or more selected policies can not be found.": "One or more selected policies can not be found.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const HostsForm: React.FC<HostsFormProps> = ({ control, handleChange }) => {
setControllerAvailabilityPolicy,
infrastructureAvailabilityPolicy,
setInfrastructureAvailabilityPolicy,
olmCatalogPlacement,
setOlmCatalogPlacement,
} = React.useContext(HypershiftAgentContext)
const { agentsState, clusterImageSetsState, infraEnvironmentsState, nodePoolsState } = useSharedAtoms()
const { waitForAll } = useSharedRecoil()
Expand All @@ -55,6 +57,7 @@ const HostsForm: React.FC<HostsFormProps> = ({ control, handleChange }) => {
setInfraEnvNamespace(values.agentNamespace)
setControllerAvailabilityPolicy(values.controllerAvailabilityPolicy)
setInfrastructureAvailabilityPolicy(values.infrastructureAvailabilityPolicy)
setOlmCatalogPlacement(values.olmCatalogPlacement)
handleChange(control)
}
// eslint-disable-next-line
Expand All @@ -65,6 +68,8 @@ const HostsForm: React.FC<HostsFormProps> = ({ control, handleChange }) => {
return formRef?.current?.errors
}

console.log(control.active)

control.summary = () => [
{
term: t('Hosts namespace'),
Expand All @@ -75,6 +80,10 @@ const HostsForm: React.FC<HostsFormProps> = ({ control, handleChange }) => {
desc:
control.active.controllerAvailabilityPolicy === 'HighlyAvailable' ? t('Highly available') : t('Single replica'),
},
{
term: t('OLM catalog placement'),
desc: control.active.olmCatalogPlacement === 'management' ? t('Management') : t('Guest'),
},
{
term: t('Node pools'),
desc: control.active.nodePools.length,
Expand All @@ -101,6 +110,7 @@ const HostsForm: React.FC<HostsFormProps> = ({ control, handleChange }) => {
nodePools={currentNodePools}
controllerAvailabilityPolicy={controllerAvailabilityPolicy}
infrastructureAvailabilityPolicy={infrastructureAvailabilityPolicy}
olmCatalogPlacement={olmCatalogPlacement}
/>
) : (
<LoadingState />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export type HypershiftAgentContextType = {
setControllerAvailabilityPolicy: (policy: string) => void
infrastructureAvailabilityPolicy: string
setInfrastructureAvailabilityPolicy: (policy: string) => void
olmCatalogPlacement: string
setOlmCatalogPlacement: (placement: string) => void
nodePools?: NodePoolFormValue[]
setNodePools: (nodePools: any) => void
isAdvancedNetworking: boolean
Expand All @@ -39,6 +41,8 @@ export const HypershiftAgentContext = React.createContext<HypershiftAgentContext
setControllerAvailabilityPolicy: noop,
infrastructureAvailabilityPolicy: '',
setInfrastructureAvailabilityPolicy: noop,
olmCatalogPlacement: '',
setOlmCatalogPlacement: noop,
nodePools: [],
setNodePools: noop,
isAdvancedNetworking: false,
Expand All @@ -62,12 +66,15 @@ export const useHypershiftContextValues = (): HypershiftAgentContextType => {
const [sshPublicKey, setSshPublicKey] = React.useState('')
const [controllerAvailabilityPolicy, setControllerAvailabilityPolicy] = React.useState('')
const [infrastructureAvailabilityPolicy, setInfrastructureAvailabilityPolicy] = React.useState('')
const [olmCatalogPlacement, setOlmCatalogPlacement] = React.useState('')

return {
controllerAvailabilityPolicy,
setControllerAvailabilityPolicy,
infrastructureAvailabilityPolicy,
setInfrastructureAvailabilityPolicy,
olmCatalogPlacement,
setOlmCatalogPlacement,
nodePools,
setNodePools,
isAdvancedNetworking,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ spec:
{{#if hypershift-hosts.infrastructureAvailabilityPolicy}}
infrastructureAvailabilityPolicy: {{{hypershift-hosts.infrastructureAvailabilityPolicy}}}
{{/if}}
{{#if hypershift-hosts.olmCatalogPlacement}}
olmCatalogPlacement: {{{hypershift-hosts.olmCatalogPlacement}}}
{{/if}}
platform:
type: Agent
agent:
Expand Down