diff --git a/src/resources/Deployments/DeploymentDetails.js b/src/resources/Deployments/DeploymentDetails.js
index 5740639484..c6448828a9 100644
--- a/src/resources/Deployments/DeploymentDetails.js
+++ b/src/resources/Deployments/DeploymentDetails.js
@@ -64,7 +64,12 @@ export function DeploymentDetails(props) {
const statusConditions = deployment => {
return deployment?.status?.conditions?.map(condition => {
return {
- header: { titleText: condition.type, status: condition.status },
+ header: {
+ titleText: condition.type,
+ status: condition.status,
+ overrideStatusType:
+ condition.type === 'ReplicaFailure' ? 'False' : condition.status,
+ },
message: condition.message,
};
});
diff --git a/src/resources/Deployments/DeploymentStatus.js b/src/resources/Deployments/DeploymentStatus.js
index 5bf2456caf..0fb4fe10d3 100644
--- a/src/resources/Deployments/DeploymentStatus.js
+++ b/src/resources/Deployments/DeploymentStatus.js
@@ -4,7 +4,7 @@ import { RunningPodsStatus } from 'shared/components/RunningPodsStatus';
export function DeploymentStatus({ deployment }) {
const running = deployment.status.readyReplicas || 0;
- const expected = deployment.status.replicas || 0;
+ const expected = deployment.status.replicas || deployment.spec.replicas || 0;
return ;
}
diff --git a/src/resources/Namespaces/NamespaceWorkloads/NamespaceWorkloadsHelpers.js b/src/resources/Namespaces/NamespaceWorkloads/NamespaceWorkloadsHelpers.js
index 2e72432885..572ef6f4b8 100644
--- a/src/resources/Namespaces/NamespaceWorkloads/NamespaceWorkloadsHelpers.js
+++ b/src/resources/Namespaces/NamespaceWorkloads/NamespaceWorkloadsHelpers.js
@@ -1,8 +1,12 @@
import { calculatePodState } from 'resources/Pods/PodStatus';
export function getHealthyReplicasCount(resource) {
- return resource?.filter(r => r.status.replicas === r.status.readyReplicas)
- ?.length;
+ return resource?.filter(
+ r =>
+ r.status.replicas &&
+ r.status.readyReplicas &&
+ r.status.replicas === r.status.readyReplicas,
+ )?.length;
}
export const PodStatusCounterKey = {
diff --git a/src/shared/components/ConditionList/ConditionList.tsx b/src/shared/components/ConditionList/ConditionList.tsx
index 397c7390b5..dae0b0dab3 100644
--- a/src/shared/components/ConditionList/ConditionList.tsx
+++ b/src/shared/components/ConditionList/ConditionList.tsx
@@ -18,6 +18,7 @@ type ConditionItem = {
type ConditionHeader = {
titleText: string | ReactNode;
status?: string;
+ overrideStatusType?: string;
};
export const ConditionList = ({
@@ -34,6 +35,7 @@ export const ConditionList = ({
key={index}
header={cond.header?.titleText}
status={cond.header?.status}
+ overrideStatusType={cond.header?.overrideStatusType}
content={cond.message}
customContent={cond.customContent}
/>
diff --git a/src/shared/components/ExpandableListItem/ExpandableListItem.tsx b/src/shared/components/ExpandableListItem/ExpandableListItem.tsx
index 545afc3a9b..65db3d66a8 100644
--- a/src/shared/components/ExpandableListItem/ExpandableListItem.tsx
+++ b/src/shared/components/ExpandableListItem/ExpandableListItem.tsx
@@ -8,6 +8,7 @@ import './ExpandableListItem.scss';
type ExpandableListItemProps = {
header: string | ReactNode;
status?: string;
+ overrideStatusType?: string;
content?: string;
customContent?: CustomContent[];
};
@@ -21,12 +22,18 @@ export type CustomContent = {
export const ExpandableListItem = ({
header,
status,
+ overrideStatusType,
content,
customContent,
}: ExpandableListItemProps) => {
const { t } = useTranslation();
const [expanded, setExpanded] = useState(false);
+ let statusType = status === 'True' ? 'Success' : 'Error';
+ if (overrideStatusType !== undefined) {
+ statusType = overrideStatusType === 'True' ? 'Success' : 'Error';
+ }
+
return (
<>
+
{status}
)}