diff --git a/frontend/packages/console-shared/locales/en/console-shared.json b/frontend/packages/console-shared/locales/en/console-shared.json index afe0d28d13f..9e583810c75 100644 --- a/frontend/packages/console-shared/locales/en/console-shared.json +++ b/frontend/packages/console-shared/locales/en/console-shared.json @@ -232,6 +232,7 @@ "Namespace": "Namespace", "Enable Autoscale": "Enable Autoscale", "Increase the Pod count": "Increase the Pod count", + "This image is not intended to run with more than one replica. Scaling up may cause unexpected behavior.": "This image is not intended to run with more than one replica. Scaling up may cause unexpected behavior.", "Decrease the Pod count": "Decrease the Pod count", "No Pods found for this resource.": "No Pods found for this resource.", "Hide waiting pods with errors": "Hide waiting pods with errors", diff --git a/frontend/packages/console-shared/src/components/pod/PodRing.tsx b/frontend/packages/console-shared/src/components/pod/PodRing.tsx index e7d6ef2544c..83988d72d27 100644 --- a/frontend/packages/console-shared/src/components/pod/PodRing.tsx +++ b/frontend/packages/console-shared/src/components/pod/PodRing.tsx @@ -1,12 +1,13 @@ import type { FC } from 'react'; import { useState, useEffect } from 'react'; -import { Button, Split, SplitItem, Bullseye } from '@patternfly/react-core'; +import { Button, Split, SplitItem, Bullseye, Tooltip } from '@patternfly/react-core'; import { AngleDownIcon, AngleUpIcon, AutomationIcon } from '@patternfly/react-icons'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import type { ImpersonateKind } from '@console/dynamic-plugin-sdk'; import type { K8sResourceKind, K8sKind } from '@console/internal/module/k8s'; import { k8sPatch } from '@console/internal/module/k8s'; +import { useNonScalableImageCheck } from '../../hooks/useNonScalableImageCheck'; import { useRelatedHPA } from '../../hooks/useRelatedHPA'; import type { ExtPodKind } from '../../types/pod'; import { usePodRingLabel, usePodScalingAccessStatus } from '../../utils/pod-ring-utils'; @@ -82,6 +83,7 @@ export const PodRing: FC = ({ } = obj; const [hpa] = useRelatedHPA(apiVersion, kind, name, namespace); const hpaControlledScaling = !!hpa; + const { isNonScalable } = useNonScalableImageCheck(obj); const isScalingAllowed = isAccessScalingAllowed && !hpaControlledScaling; @@ -126,15 +128,32 @@ export const PodRing: FC = ({
-