diff --git a/dashboard/src/lib/hooks/useClusterResourceLimits.ts b/dashboard/src/lib/hooks/useClusterResourceLimits.ts index 0f954562de..c03b18ca91 100644 --- a/dashboard/src/lib/hooks/useClusterResourceLimits.ts +++ b/dashboard/src/lib/hooks/useClusterResourceLimits.ts @@ -8,6 +8,7 @@ import api from "shared/api"; const clusterDataValidator = z.object({ labels: z.object({ "beta.kubernetes.io/instance-type": z.string().nullish(), + "porter.run/workload-kind": z.string().nullish(), }).optional(), }).transform((data) => { const defaultResources = { @@ -17,6 +18,10 @@ const clusterDataValidator = z.object({ if (!data.labels) { return defaultResources; } + const workloadKind = data.labels["porter.run/workload-kind"]; + if (!workloadKind || workloadKind !== "application") { + return defaultResources; + } const instanceType = data.labels["beta.kubernetes.io/instance-type"]; const res = z.tuple([z.string(), z.string()]).safeParse(instanceType?.split(".")) if (!res.success) {