Skip to content

MGMT-20200: Add new operators to virtualization bundle #2884

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

Merged
merged 1 commit into from
Apr 1, 2025
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
10 changes: 10 additions & 0 deletions libs/locales/lib/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}.",
Expand Down Expand Up @@ -476,6 +478,8 @@
"ai:Keep the field empty to match <bold>any</bold> location.": "Keep the field empty to match <bold>any</bold> 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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
21 changes: 18 additions & 3 deletions libs/types/assisted-installer-service.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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.
*/
Expand Down
30 changes: 30 additions & 0 deletions libs/ui-lib/lib/common/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down Expand Up @@ -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 = (
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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];
Expand Down Expand Up @@ -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'),
};
};

Expand Down
17 changes: 17 additions & 0 deletions libs/ui-lib/lib/common/config/docs_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
5 changes: 5 additions & 0 deletions libs/ui-lib/lib/common/types/clusters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<PlatformType, 'vsphere' | 'nutanix' | 'external'>;
Expand Down
Original file line number Diff line number Diff line change
@@ -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 (
<>
<Tooltip hidden={!disabledReason} content={disabledReason}>
<span>Fence Agents Remediation </span>
</Tooltip>
<NewFeatureSupportLevelBadge
featureId={FENCE_AGENTS_REMEDIATION_FEATURE_ID}
supportLevel={supportLevel}
/>
</>
);
};

const FenceAgentsRemediationHelperText = () => {
return (
<HelperText>
<HelperTextItem variant="indeterminate">
Externally fences failed nodes using power controllers.{' '}
<a href={FENCE_AGENTS_REMEDIATION_LINK} target="_blank" rel="noopener noreferrer">
{'Learn more'} <ExternalLinkAltIcon />
</a>
</HelperTextItem>
</HelperText>
);
};

const FenceAgentsRemediationCheckbox = ({
disabledReason,
supportLevel,
}: {
disabledReason?: string;
supportLevel?: SupportLevel | undefined;
}) => {
const fieldId = getFieldId(FENCE_AGENTS_REMEDIATION_FIELD_NAME, 'input');

return (
<FormGroup isInline fieldId={fieldId}>
<OcmCheckboxField
name={FENCE_AGENTS_REMEDIATION_FIELD_NAME}
label={
<FenceAgentsRemediationLabel
disabledReason={disabledReason}
supportLevel={supportLevel}
/>
}
helperText={<FenceAgentsRemediationHelperText />}
isDisabled={!!disabledReason}
/>
</FormGroup>
);
};

export default FenceAgentsRemediationCheckbox;
Original file line number Diff line number Diff line change
@@ -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 (
<>
<Tooltip hidden={!disabledReason} content={disabledReason}>
<span>Kube Descheduler </span>
</Tooltip>
<NewFeatureSupportLevelBadge
featureId={KUBE_DESCHEDULER_FEATURE_ID}
supportLevel={supportLevel}
/>
</>
);
};

const KubeDeschedulerHelperText = () => {
return (
<HelperText>
<HelperTextItem variant="indeterminate">
Evicts pods to reschedule them onto more suitable nodes.{' '}
<a href={NODE_HEALTHCHECK_LINK} target="_blank" rel="noopener noreferrer">
{'Learn more'} <ExternalLinkAltIcon />
</a>
</HelperTextItem>
</HelperText>
);
};

const KubeDeschedulerCheckbox = ({
disabledReason,
supportLevel,
}: {
disabledReason?: string;
supportLevel?: SupportLevel | undefined;
}) => {
const fieldId = getFieldId(KUBE_DESCHEDULER_FIELD_NAME, 'input');

return (
<FormGroup isInline fieldId={fieldId}>
<OcmCheckboxField
name={KUBE_DESCHEDULER_FIELD_NAME}
label={<KubeDeschedulerLabel disabledReason={disabledReason} supportLevel={supportLevel} />}
helperText={<KubeDeschedulerHelperText />}
isDisabled={!!disabledReason}
/>
</FormGroup>
);
};

export default KubeDeschedulerCheckbox;
Original file line number Diff line number Diff line change
@@ -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 (
<>
<Tooltip hidden={!disabledReason} content={disabledReason}>
<span>Node Healthcheck </span>
</Tooltip>
<NewFeatureSupportLevelBadge
featureId={NODE_HEALTHCHECK_FEATURE_ID}
supportLevel={supportLevel}
/>
</>
);
};

const NodeHealthcheckHelperText = () => {
return (
<HelperText>
<HelperTextItem variant="indeterminate">
Identify Unhealthy Nodes.{' '}
<a href={NODE_HEALTHCHECK_LINK} target="_blank" rel="noopener noreferrer">
{'Learn more'} <ExternalLinkAltIcon />
</a>
</HelperTextItem>
</HelperText>
);
};

const NodeHealthcheckCheckbox = ({
disabledReason,
supportLevel,
}: {
disabledReason?: string;
supportLevel?: SupportLevel | undefined;
}) => {
const fieldId = getFieldId(NODE_HEALTHCHECK_FIELD_NAME, 'input');

return (
<FormGroup isInline fieldId={fieldId}>
<OcmCheckboxField
name={NODE_HEALTHCHECK_FIELD_NAME}
label={<NodeHealthcheckLabel disabledReason={disabledReason} supportLevel={supportLevel} />}
helperText={<NodeHealthcheckHelperText />}
isDisabled={!!disabledReason}
/>
</FormGroup>
);
};

export default NodeHealthcheckCheckbox;
Loading
Loading