From 6f807db6424832a2334880ececb895b8a4acb786 Mon Sep 17 00:00:00 2001 From: Dan Manor Date: Sun, 30 Mar 2025 19:25:21 +0300 Subject: [PATCH] Add new operators to virtualization bundle Signed-off-by: Dan Manor --- libs/locales/lib/en/translation.json | 10 +++ libs/types/assisted-installer-service.d.ts | 21 +++++- libs/ui-lib/lib/common/config/constants.ts | 30 ++++++++ libs/ui-lib/lib/common/config/docs_links.ts | 17 +++++ libs/ui-lib/lib/common/types/clusters.ts | 5 ++ .../FenceAgentsRemediationCheckbox.tsx | 71 +++++++++++++++++++ .../operators/KubeDeschedulerCheckbox.tsx | 66 +++++++++++++++++ .../operators/NodeHealthcheckCheckbox.tsx | 66 +++++++++++++++++ .../NodeMaintenanceOperatorCheckbox.tsx | 66 +++++++++++++++++ .../operators/SelfNodeRemediationCheckbox.tsx | 68 ++++++++++++++++++ .../operators/SupportedOperators.tsx | 25 +++++++ .../operators/VirtualizationRequirements.tsx | 5 ++ .../components/clusterWizard/Operators.tsx | 10 +++ .../clusterWizard/OperatorsStep.tsx | 9 ++- .../lib/ocm/services/OperatorsService.tsx | 10 +++ 15 files changed, 474 insertions(+), 5 deletions(-) create mode 100644 libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/FenceAgentsRemediationCheckbox.tsx create mode 100644 libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/KubeDeschedulerCheckbox.tsx create mode 100644 libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/NodeHealthcheckCheckbox.tsx create mode 100644 libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/NodeMaintenanceOperatorCheckbox.tsx create mode 100644 libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/SelfNodeRemediationCheckbox.tsx diff --git a/libs/locales/lib/en/translation.json b/libs/locales/lib/en/translation.json index 505088900c..f5dc9c123f 100644 --- a/libs/locales/lib/en/translation.json +++ b/libs/locales/lib/en/translation.json @@ -336,6 +336,8 @@ "ai:Failed to update the AgentServiceConfig": "Failed to update the AgentServiceConfig", "ai:Failed validations:": "Failed validations:", "ai:Failing infrastructure environment": "Failing infrastructure environment", + "ai:Fence Agents Remediation": "Fence Agents Remediation", + "ai:Fence Agents Remediation requirements": "Fence Agents Remediation requirements", "ai:File is not structured correctly. Use the template to use the right file structure.": "File is not structured correctly. Use the template to use the right file structure.", "ai:File size is too big. Upload a new {{maxFileSizeKb}} Kb or less.": "File size is too big. Upload a new file that is {{maxFileSizeKb}} Kb or less.", "ai:File type is not supported. File type must be {{acceptedFiles}}.": "File type is not supported. File type must be {{acceptedFiles}}.", @@ -476,6 +478,8 @@ "ai:Keep the field empty to match any location.": "Keep the field empty to match any location.", "ai:Kernel Module Management": "Kernel Module Management", "ai:Kernel Module Management requirements": "Kernel Module Management requirements", + "ai:Kube Descheduler": "Kube Descheduler", + "ai:Kube Descheduler requirements": "Kube Descheduler requirements", "ai:Kubeconfig is empty.": "Kubeconfig is empty.", "ai:Labels": "Labels", "ai:Labels matching hosts": "Labels matching hosts", @@ -591,6 +595,10 @@ "ai:No version selected": "No version selected", "ai:Node Feature Discovery": "Node Feature Discovery", "ai:Node Feature Discovery requirements": "Node Feature Discovery requirements", + "ai:Node Healthcheck": "Node Healthcheck", + "ai:Node Healthcheck requirements": "Node Healthcheck requirements", + "ai:Node Maintenace": "Node Maintenace", + "ai:Node Maintenance requirements": "Node Maintenance requirements", "ai:Nodepool": "Nodepool", "ai:Nodepool conditions": "Nodepool conditions", "ai:Nodepool name": "Nodepool name", @@ -731,6 +739,8 @@ "ai:Select one or multiple locations to choose the hosts from.": "Select one or multiple locations of the hosts.", "ai:selected": "selected", "ai:Selected image does not support arm64": "Selected image does not support arm64", + "ai:Self Node Remediation": "Self Node Remediation", + "ai:Self Node Remediation requirements": "Self Node Remediation requirements", "ai:Serial": "Serial", "ai:Serial number": "Serial number", "ai:Serverless": "Serverless", diff --git a/libs/types/assisted-installer-service.d.ts b/libs/types/assisted-installer-service.d.ts index c59feb49c0..0583e69dee 100644 --- a/libs/types/assisted-installer-service.d.ts +++ b/libs/types/assisted-installer-service.d.ts @@ -658,7 +658,12 @@ export type ClusterValidationId = | 'authorino-requirements-satisfied' | 'nmstate-requirements-satisfied' | 'amd-gpu-requirements-satisfied' - | 'kmm-requirements-satisfied'; + | 'kmm-requirements-satisfied' + | 'node-healthcheck-requirements-satisfied' + | 'self-node-remediation-requirements-satisfied' + | 'fence-agents-remediation-requirements-satisfied' + | 'node-maintenance-requirements-satisfied' + | 'kube-descheduler-requirements-satisfied'; export interface CompletionParams { isSuccess: boolean; errorInfo?: string; @@ -1053,7 +1058,12 @@ export type FeatureSupportLevelId = | 'USER_MANAGED_LOAD_BALANCER' | 'NMSTATE' | 'AMD_GPU' - | 'KMM'; + | 'KMM' + | 'NODE_HEALTHCHECK' + | 'SELF_NODE_REMEDIATION' + | 'FENCE_AGENTS_REMEDIATION' + | 'NODE_MAINTENANCE' + | 'KUBE_DESCHEDULER'; /** * Cluster finalizing stage managed by controller */ @@ -1609,7 +1619,12 @@ export type HostValidationId = | 'mtu-valid' | 'nmstate-requirements-satisfied' | 'amd-gpu-requirements-satisfied' - | 'kmm-requirements-satisfied'; + | 'kmm-requirements-satisfied' + | 'node-healthcheck-requirements-satisfied' + | 'self-node-remediation-requirements-satisfied' + | 'fence-agents-remediation-requirements-satisfied' + | 'node-maintenance-requirements-satisfied' + | 'kube-descheduler-requirements-satisfied'; /** * Explicit ignition endpoint overrides the default ignition endpoint. */ diff --git a/libs/ui-lib/lib/common/config/constants.ts b/libs/ui-lib/lib/common/config/constants.ts index 3ca54af0b4..2029663cda 100644 --- a/libs/ui-lib/lib/common/config/constants.ts +++ b/libs/ui-lib/lib/common/config/constants.ts @@ -140,6 +140,11 @@ export const hostValidationLabels = (t: TFunction): { [key in HostValidationId]: 'nmstate-requirements-satisfied': '', 'amd-gpu-requirements-satisfied': t('ai:AMD GPU requirements'), 'kmm-requirements-satisfied': t('ai:Kernel Module Management requirements'), + 'node-healthcheck-requirements-satisfied': t('ai:Node Healthcheck requirements'), + 'self-node-remediation-requirements-satisfied': t('ai:Self Node Remediation requirements'), + 'fence-agents-remediation-requirements-satisfied': t('ai:Fence Agents Remediation requirements'), + 'node-maintenance-requirements-satisfied': t('ai:Node Maintenance requirements'), + 'kube-descheduler-requirements-satisfied': t('ai:Kube Descheduler requirements'), }); export const hostValidationFailureHints = ( @@ -202,6 +207,11 @@ export const hostValidationFailureHints = ( 'nmstate-requirements-satisfied': '', 'amd-gpu-requirements-satisfied': '', 'kmm-requirements-satisfied': '', + 'node-healthcheck-requirements-satisfied': '', + 'self-node-remediation-requirements-satisfied': '', + 'fence-agents-remediation-requirements-satisfied': '', + 'node-maintenance-requirements-satisfied': '', + 'kube-descheduler-requirements-satisfied': '', }); export const clusterValidationLabels = ( @@ -307,6 +317,11 @@ export const OPERATOR_NAME_NMSTATE = 'nmstate'; export const OPERATOR_NAME_AUTHORINO = 'authorino'; export const OPERATOR_NAME_AMD_GPU = 'amd-gpu'; export const OPERATOR_NAME_KMM = 'kmm'; +export const OPERATOR_NAME_NODE_HEALTHCHECK = 'node-healthcheck'; +export const OPERATOR_NAME_SELF_NODE_REMEDIATION = 'self-node-remediation'; +export const OPERATOR_NAME_FENCE_AGENTS_REMEDIATION = 'fence-agents-remediation'; +export const OPERATOR_NAME_NODE_MAINTENANCE = 'node-maintenance'; +export const OPERATOR_NAME_KUBE_DESCHEDULER = 'kube-descheduler'; const OperatorNames = [ OPERATOR_NAME_CNV, @@ -327,6 +342,11 @@ const OperatorNames = [ OPERATOR_NAME_AUTHORINO, OPERATOR_NAME_AMD_GPU, OPERATOR_NAME_KMM, + OPERATOR_NAME_NODE_HEALTHCHECK, + OPERATOR_NAME_SELF_NODE_REMEDIATION, + OPERATOR_NAME_FENCE_AGENTS_REMEDIATION, + OPERATOR_NAME_NODE_MAINTENANCE, + OPERATOR_NAME_KUBE_DESCHEDULER, ]; export const ExposedOperatorNames = [ OPERATOR_NAME_CNV, @@ -346,6 +366,11 @@ export const ExposedOperatorNames = [ OPERATOR_NAME_AUTHORINO, OPERATOR_NAME_AMD_GPU, OPERATOR_NAME_KMM, + OPERATOR_NAME_NODE_HEALTHCHECK, + OPERATOR_NAME_SELF_NODE_REMEDIATION, + OPERATOR_NAME_FENCE_AGENTS_REMEDIATION, + OPERATOR_NAME_NODE_MAINTENANCE, + OPERATOR_NAME_KUBE_DESCHEDULER, ]; export type OperatorName = (typeof OperatorNames)[number]; @@ -393,6 +418,11 @@ export const operatorLabels = ( [OPERATOR_NAME_AUTHORINO]: t('ai:Authorino'), [OPERATOR_NAME_AMD_GPU]: t('ai:AMD GPU'), [OPERATOR_NAME_KMM]: t('ai:Kernel Module Management'), + [OPERATOR_NAME_NODE_HEALTHCHECK]: t('ai:Node Healthcheck'), + [OPERATOR_NAME_SELF_NODE_REMEDIATION]: t('ai:Self Node Remediation'), + [OPERATOR_NAME_FENCE_AGENTS_REMEDIATION]: t('ai:Fence Agents Remediation'), + [OPERATOR_NAME_NODE_MAINTENANCE]: t('ai:Node Maintenace'), + [OPERATOR_NAME_KUBE_DESCHEDULER]: t('ai:Kube Descheduler'), }; }; diff --git a/libs/ui-lib/lib/common/config/docs_links.ts b/libs/ui-lib/lib/common/config/docs_links.ts index 9c2a4ddda6..2114a14de4 100644 --- a/libs/ui-lib/lib/common/config/docs_links.ts +++ b/libs/ui-lib/lib/common/config/docs_links.ts @@ -105,6 +105,23 @@ export const getLvmsDocsLink = (ocpVersion?: string) => ocpVersion, )}/html/storage/configuring-persistent-storage#overview-of-lvm-storage-functionality_ways-to-provision-local-storage`; +export const NODE_HEALTHCHECK_LINK = + 'https://docs.redhat.com/en/documentation/workload_availability_for_red_hat_openshift/latest/html/remediation_fencing_and_maintenance/node-health-check-operator'; + +export const SELF_NODE_REMEDIATION_LINK = + 'https://docs.redhat.com/en/documentation/workload_availability_for_red_hat_openshift/latest/html/remediation_fencing_and_maintenance/self-node-remediation-operator-remediate-nodes'; + +export const FENCE_AGENTS_REMEDIATION_LINK = + 'https://docs.redhat.com/en/documentation/workload_availability_for_red_hat_openshift/latest/html/remediation_fencing_and_maintenance/fence-agents-remediation-operator-remediate-nodes'; + +export const NODE_MAINTENANCE_LINK = + 'https://docs.redhat.com/en/documentation/workload_availability_for_red_hat_openshift/latest/html/remediation_fencing_and_maintenance/node-maintenance-operator'; + +export const getKubeDeschedulerLink = (ocpVersion?: string) => + `https://docs.redhat.com/en/documentation/openshift_container_platform/${getShortOpenshiftVersion( + ocpVersion, + )}/html/nodes/controlling-pod-placement-onto-nodes-scheduling#descheduler`; + //Others export const REDHAT_CONSOLE_OPENSHIFT = 'https://console.redhat.com/openshift'; diff --git a/libs/ui-lib/lib/common/types/clusters.ts b/libs/ui-lib/lib/common/types/clusters.ts index 9321545e25..d3d0844551 100644 --- a/libs/ui-lib/lib/common/types/clusters.ts +++ b/libs/ui-lib/lib/common/types/clusters.ts @@ -76,6 +76,11 @@ export type OperatorsValues = V2ClusterUpdateParams & { useNvidiaGpu: boolean; useAmdGpu: boolean; useKmm: boolean; + useNodeHealthcheck: boolean; + useSelfNodeRemediation: boolean; + useFenceAgentsRemediation: boolean; + useNodeMaintenance: boolean; + useKubeDescheduler: boolean; }; export type SupportedPlatformType = Extract; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/FenceAgentsRemediationCheckbox.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/FenceAgentsRemediationCheckbox.tsx new file mode 100644 index 0000000000..8d0dcfeee5 --- /dev/null +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/FenceAgentsRemediationCheckbox.tsx @@ -0,0 +1,71 @@ +import React from 'react'; +import { FormGroup, HelperText, HelperTextItem, Tooltip } from '@patternfly/react-core'; +import { getFieldId, FENCE_AGENTS_REMEDIATION_LINK } from '../../../../common'; +import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon'; +import { OcmCheckboxField } from '../../ui/OcmFormFields'; +import NewFeatureSupportLevelBadge from '../../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge'; +import { SupportLevel } from '@openshift-assisted/types/./assisted-installer-service'; + +const FENCE_AGENTS_REMEDIATION_FIELD_NAME = 'useFenceAgentsRemediation'; +const FENCE_AGENTS_REMEDIATION_FEATURE_ID = 'FENCE_AGENTS_REMEDIATION'; + +const FenceAgentsRemediationLabel = ({ + disabledReason, + supportLevel, +}: { + disabledReason?: string; + supportLevel?: SupportLevel; +}) => { + return ( + <> + + + + ); +}; + +const FenceAgentsRemediationHelperText = () => { + return ( + + + Externally fences failed nodes using power controllers.{' '} + + {'Learn more'} + + + + ); +}; + +const FenceAgentsRemediationCheckbox = ({ + disabledReason, + supportLevel, +}: { + disabledReason?: string; + supportLevel?: SupportLevel | undefined; +}) => { + const fieldId = getFieldId(FENCE_AGENTS_REMEDIATION_FIELD_NAME, 'input'); + + return ( + + + } + helperText={} + isDisabled={!!disabledReason} + /> + + ); +}; + +export default FenceAgentsRemediationCheckbox; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/KubeDeschedulerCheckbox.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/KubeDeschedulerCheckbox.tsx new file mode 100644 index 0000000000..679ba2b8e8 --- /dev/null +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/KubeDeschedulerCheckbox.tsx @@ -0,0 +1,66 @@ +import React from 'react'; +import { FormGroup, HelperText, HelperTextItem, Tooltip } from '@patternfly/react-core'; +import { getFieldId, NODE_HEALTHCHECK_LINK } from '../../../../common'; +import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon'; +import { OcmCheckboxField } from '../../ui/OcmFormFields'; +import NewFeatureSupportLevelBadge from '../../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge'; +import { SupportLevel } from '@openshift-assisted/types/./assisted-installer-service'; + +const KUBE_DESCHEDULER_FIELD_NAME = 'useKubeDescheduler'; +const KUBE_DESCHEDULER_FEATURE_ID = 'KUBE_DESCHEDULER'; + +const KubeDeschedulerLabel = ({ + disabledReason, + supportLevel, +}: { + disabledReason?: string; + supportLevel?: SupportLevel; +}) => { + return ( + <> + + + + ); +}; + +const KubeDeschedulerHelperText = () => { + return ( + + + Evicts pods to reschedule them onto more suitable nodes.{' '} + + {'Learn more'} + + + + ); +}; + +const KubeDeschedulerCheckbox = ({ + disabledReason, + supportLevel, +}: { + disabledReason?: string; + supportLevel?: SupportLevel | undefined; +}) => { + const fieldId = getFieldId(KUBE_DESCHEDULER_FIELD_NAME, 'input'); + + return ( + + } + helperText={} + isDisabled={!!disabledReason} + /> + + ); +}; + +export default KubeDeschedulerCheckbox; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/NodeHealthcheckCheckbox.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/NodeHealthcheckCheckbox.tsx new file mode 100644 index 0000000000..80ee53667f --- /dev/null +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/NodeHealthcheckCheckbox.tsx @@ -0,0 +1,66 @@ +import React from 'react'; +import { FormGroup, HelperText, HelperTextItem, Tooltip } from '@patternfly/react-core'; +import { getFieldId, NODE_HEALTHCHECK_LINK } from '../../../../common'; +import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon'; +import { OcmCheckboxField } from '../../ui/OcmFormFields'; +import NewFeatureSupportLevelBadge from '../../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge'; +import { SupportLevel } from '@openshift-assisted/types/./assisted-installer-service'; + +const NODE_HEALTHCHECK_FIELD_NAME = 'useNodeHealthcheck'; +const NODE_HEALTHCHECK_FEATURE_ID = 'NODE_HEALTHCHECK'; + +const NodeHealthcheckLabel = ({ + disabledReason, + supportLevel, +}: { + disabledReason?: string; + supportLevel?: SupportLevel; +}) => { + return ( + <> + + + + ); +}; + +const NodeHealthcheckHelperText = () => { + return ( + + + Identify Unhealthy Nodes.{' '} + + {'Learn more'} + + + + ); +}; + +const NodeHealthcheckCheckbox = ({ + disabledReason, + supportLevel, +}: { + disabledReason?: string; + supportLevel?: SupportLevel | undefined; +}) => { + const fieldId = getFieldId(NODE_HEALTHCHECK_FIELD_NAME, 'input'); + + return ( + + } + helperText={} + isDisabled={!!disabledReason} + /> + + ); +}; + +export default NodeHealthcheckCheckbox; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/NodeMaintenanceOperatorCheckbox.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/NodeMaintenanceOperatorCheckbox.tsx new file mode 100644 index 0000000000..9dac6bb6ca --- /dev/null +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/NodeMaintenanceOperatorCheckbox.tsx @@ -0,0 +1,66 @@ +import React from 'react'; +import { FormGroup, HelperText, HelperTextItem, Tooltip } from '@patternfly/react-core'; +import { getFieldId, NODE_HEALTHCHECK_LINK } from '../../../../common'; +import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon'; +import { OcmCheckboxField } from '../../ui/OcmFormFields'; +import NewFeatureSupportLevelBadge from '../../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge'; +import { SupportLevel } from '@openshift-assisted/types/./assisted-installer-service'; + +const NODE_MAINTENANCE_FIELD_NAME = 'useNodeMaintenance'; +const NODE_MAINTENANCE_FEATURE_ID = 'NODE_MAINTENANCE'; + +const NodeMaintenanceLabel = ({ + disabledReason, + supportLevel, +}: { + disabledReason?: string; + supportLevel?: SupportLevel; +}) => { + return ( + <> + + + + ); +}; + +const NodeMaintenanceHelperText = () => { + return ( + + + Place nodes in maintenance mode.{' '} + + {'Learn more'} + + + + ); +}; + +const NodeMaintenanceCheckbox = ({ + disabledReason, + supportLevel, +}: { + disabledReason?: string; + supportLevel?: SupportLevel | undefined; +}) => { + const fieldId = getFieldId(NODE_MAINTENANCE_FIELD_NAME, 'input'); + + return ( + + } + helperText={} + isDisabled={!!disabledReason} + /> + + ); +}; + +export default NodeMaintenanceCheckbox; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/SelfNodeRemediationCheckbox.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/SelfNodeRemediationCheckbox.tsx new file mode 100644 index 0000000000..070accf280 --- /dev/null +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/SelfNodeRemediationCheckbox.tsx @@ -0,0 +1,68 @@ +import React from 'react'; +import { FormGroup, HelperText, HelperTextItem, Tooltip } from '@patternfly/react-core'; +import { getFieldId, SELF_NODE_REMEDIATION_LINK } from '../../../../common'; +import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon'; +import { OcmCheckboxField } from '../../ui/OcmFormFields'; +import NewFeatureSupportLevelBadge from '../../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge'; +import { SupportLevel } from '@openshift-assisted/types/./assisted-installer-service'; + +const SELF_NODE_REMEDIATION_FIELD_NAME = 'useSelfNodeRemediation'; +const SELF_NODE_REMEDIATION_FEATURE_ID = 'SELF_NODE_REMEDIATION'; + +const SelfNodeRemediationLabel = ({ + disabledReason, + supportLevel, +}: { + disabledReason?: string; + supportLevel?: SupportLevel; +}) => { + return ( + <> + + + + ); +}; + +const SelfNodeRemediationHelperText = () => { + return ( + + + Allows nodes to reboot themselves when they become unhealthy.{' '} + + {'Learn more'} + + + + ); +}; + +const SelfNodeRemediationCheckbox = ({ + disabledReason, + supportLevel, +}: { + disabledReason?: string; + supportLevel?: SupportLevel | undefined; +}) => { + const fieldId = getFieldId(SELF_NODE_REMEDIATION_FIELD_NAME, 'input'); + + return ( + + + } + helperText={} + isDisabled={!!disabledReason} + /> + + ); +}; + +export default SelfNodeRemediationCheckbox; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/SupportedOperators.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/SupportedOperators.tsx index a41606f0a6..8e6c3c4178 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/SupportedOperators.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/SupportedOperators.tsx @@ -16,6 +16,11 @@ import ServiceMeshCheckbox from './ServicemeshCheckbox'; import NvidiaGpuCheckbox from './NvidiaGpuCheckbox'; import AmdGpuCheckbox from './AmdGpuCheckbox'; import KmmCheckbox from './KmmCheckbox'; +import NodeHealthcheckCheckbox from './NodeHealthcheckCheckbox'; +import SelfNodeRemediationCheckbox from './SelfNodeRemediationCheckbox'; +import FenceAgentsRemediationCheckbox from './FenceAgentsRemediationCheckbox'; +import NodeMaintenanceCheckbox from './NodeMaintenanceOperatorCheckbox'; +import KubeDeschedulerCheckbox from './KubeDeschedulerCheckbox'; import { FeatureId, OPERATOR_NAME_AMD_GPU, @@ -35,6 +40,11 @@ import { OPERATOR_NAME_PIPELINES, OPERATOR_NAME_SERVERLESS, OPERATOR_NAME_SERVICEMESH, + OPERATOR_NAME_NODE_HEALTHCHECK, + OPERATOR_NAME_SELF_NODE_REMEDIATION, + OPERATOR_NAME_FENCE_AGENTS_REMEDIATION, + OPERATOR_NAME_NODE_MAINTENANCE, + OPERATOR_NAME_KUBE_DESCHEDULER, } from '../../../../common'; import { SupportLevel } from '@openshift-assisted/types/./assisted-installer-service'; @@ -72,6 +82,11 @@ export const operatorComponentMap: Record JSX. 'nvidia-gpu': (props) => , 'amd-gpu': (props) => , kmm: (props) => , + 'node-healthcheck': (props) => , + 'self-node-remediation': (props) => , + 'fence-agents-remediation': (props) => , + 'node-maintenance': (props) => , + 'kube-descheduler': (props) => , }; export const mapOperatorsToFieldIds: { [key: string]: string } = { @@ -92,6 +107,11 @@ export const mapOperatorsToFieldIds: { [key: string]: string } = { [OPERATOR_NAME_NVIDIA_GPU]: 'useNvidiaGpu', [OPERATOR_NAME_AMD_GPU]: 'useAmdGpu', [OPERATOR_NAME_KMM]: 'useKmm', + [OPERATOR_NAME_NODE_HEALTHCHECK]: 'useNodeHealthcheck', + [OPERATOR_NAME_SELF_NODE_REMEDIATION]: 'useSelfNodeRemediation', + [OPERATOR_NAME_FENCE_AGENTS_REMEDIATION]: 'useFenceAgentsRemediation', + [OPERATOR_NAME_NODE_MAINTENANCE]: 'useNodeMaintenance', + [OPERATOR_NAME_KUBE_DESCHEDULER]: 'useKubeDescheduler', }; export const mapOperatorIdToFeatureId: { [key: string]: FeatureId } = { @@ -112,4 +132,9 @@ export const mapOperatorIdToFeatureId: { [key: string]: FeatureId } = { [OPERATOR_NAME_NVIDIA_GPU]: 'NVIDIA_GPU', [OPERATOR_NAME_AMD_GPU]: 'AMD_GPU', [OPERATOR_NAME_KMM]: 'KMM', + [OPERATOR_NAME_NODE_HEALTHCHECK]: 'NODE_HEALTHCHECK', + [OPERATOR_NAME_SELF_NODE_REMEDIATION]: 'SELF_NODE_REMEDIATION', + [OPERATOR_NAME_FENCE_AGENTS_REMEDIATION]: 'FENCE_AGENTS_REMEDIATION', + [OPERATOR_NAME_NODE_MAINTENANCE]: 'NODE_MAINTENANCE', + [OPERATOR_NAME_KUBE_DESCHEDULER]: 'KUBE_DESCHEDULER', }; diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/VirtualizationRequirements.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/VirtualizationRequirements.tsx index 301a01d262..41144324ec 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/VirtualizationRequirements.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/VirtualizationRequirements.tsx @@ -22,6 +22,11 @@ const VirtualizationRequirements = () => { Migration Toolkit for Virtualization Nmstate Storage operator (either LSO/LVMS) + Node Healthcheck + Self Node Remediation + Fence Agents Remediation + Node Maintenance + Kube Descheduler ); diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/Operators.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/Operators.tsx index 23103b27ab..7c579a4c65 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/Operators.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/Operators.tsx @@ -22,6 +22,11 @@ import { OPERATOR_NAME_PIPELINES, OPERATOR_NAME_SERVERLESS, OPERATOR_NAME_SERVICEMESH, + OPERATOR_NAME_NODE_HEALTHCHECK, + OPERATOR_NAME_SELF_NODE_REMEDIATION, + OPERATOR_NAME_FENCE_AGENTS_REMEDIATION, + OPERATOR_NAME_NODE_MAINTENANCE, + OPERATOR_NAME_KUBE_DESCHEDULER, OperatorsValues, selectMonitoredOperators, useAlerts, @@ -60,6 +65,11 @@ export const getOperatorsInitialValues = ( useNvidiaGpu: isOperatorEnabled([OPERATOR_NAME_NVIDIA_GPU]), useAmdGpu: isOperatorEnabled([OPERATOR_NAME_AMD_GPU]), useKmm: isOperatorEnabled([OPERATOR_NAME_KMM]), + useNodeHealthcheck: isOperatorEnabled([OPERATOR_NAME_NODE_HEALTHCHECK]), + useSelfNodeRemediation: isOperatorEnabled([OPERATOR_NAME_SELF_NODE_REMEDIATION]), + useFenceAgentsRemediation: isOperatorEnabled([OPERATOR_NAME_FENCE_AGENTS_REMEDIATION]), + useNodeMaintenance: isOperatorEnabled([OPERATOR_NAME_NODE_MAINTENANCE]), + useKubeDescheduler: isOperatorEnabled([OPERATOR_NAME_KUBE_DESCHEDULER]), }; }; diff --git a/libs/ui-lib/lib/ocm/components/clusterWizard/OperatorsStep.tsx b/libs/ui-lib/lib/ocm/components/clusterWizard/OperatorsStep.tsx index 15fa42a7ad..c8fedb5585 100644 --- a/libs/ui-lib/lib/ocm/components/clusterWizard/OperatorsStep.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterWizard/OperatorsStep.tsx @@ -60,6 +60,11 @@ const operatorsThatCanNotBeInstalledAlone = [ 'lso', 'amd-gpu', 'nvidia-gpu', + 'node-healthcheck', + 'self-node-remediation', + 'fence-agents-remediation', + 'node-maintenance', + 'kube-descheduler', ]; export const OperatorsStep = (props: ClusterOperatorProps) => { @@ -426,7 +431,7 @@ export const OperatorsStep = (props: ClusterOperatorProps) => { {supportedOperators.map((operatorKey) => { const isOperatorSelected = bundleOperators.includes(operatorKey); - const isOperatorPartOfAIBundle = + const isOperatorNotAllowedAlone = operatorsThatCanNotBeInstalledAlone.includes(operatorKey); const disabledReason = getDisabledReasonForOperator(operatorKey, values); const featureSupportLevel = featureSupportLevelData.getFeatureSupportLevel( @@ -446,7 +451,7 @@ export const OperatorsStep = (props: ClusterOperatorProps) => { disabledReason={ isOperatorSelected ? 'This operator is part of a bundle and cannot be deselected.' - : isOperatorPartOfAIBundle + : isOperatorNotAllowedAlone ? 'This operator cannot be installed as a standalone' : disabledReason } diff --git a/libs/ui-lib/lib/ocm/services/OperatorsService.tsx b/libs/ui-lib/lib/ocm/services/OperatorsService.tsx index 8055e51c46..d65c013b34 100644 --- a/libs/ui-lib/lib/ocm/services/OperatorsService.tsx +++ b/libs/ui-lib/lib/ocm/services/OperatorsService.tsx @@ -18,6 +18,11 @@ import { OPERATOR_NAME_NVIDIA_GPU, OPERATOR_NAME_AMD_GPU, OPERATOR_NAME_KMM, + OPERATOR_NAME_NODE_HEALTHCHECK, + OPERATOR_NAME_SELF_NODE_REMEDIATION, + OPERATOR_NAME_FENCE_AGENTS_REMEDIATION, + OPERATOR_NAME_NODE_MAINTENANCE, + OPERATOR_NAME_KUBE_DESCHEDULER, } from '../../common'; import { getOlmOperatorCreateParamsByName } from '../components/clusters/utils'; import { @@ -56,6 +61,11 @@ const OperatorsService = { setOperator(OPERATOR_NAME_NVIDIA_GPU, values.useNvidiaGpu); setOperator(OPERATOR_NAME_AMD_GPU, values.useAmdGpu); setOperator(OPERATOR_NAME_KMM, values.useKmm); + setOperator(OPERATOR_NAME_NODE_HEALTHCHECK, values.useNodeHealthcheck); + setOperator(OPERATOR_NAME_SELF_NODE_REMEDIATION, values.useNodeMaintenance); + setOperator(OPERATOR_NAME_FENCE_AGENTS_REMEDIATION, values.useFenceAgentsRemediation); + setOperator(OPERATOR_NAME_NODE_MAINTENANCE, values.useNodeMaintenance); + setOperator(OPERATOR_NAME_KUBE_DESCHEDULER, values.useKubeDescheduler); return Object.values(enabledOlmOperatorsByName); },