mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
fix(apps): use replicas from application spec [r8s-142] (#335)
This commit is contained in:
parent
a259c28678
commit
7f089fab86
3 changed files with 14 additions and 6 deletions
|
@ -69,11 +69,10 @@ export function getTotalPods(
|
|||
): number {
|
||||
switch (application.kind) {
|
||||
case 'Deployment':
|
||||
return application.status?.replicas ?? 0;
|
||||
case 'StatefulSet':
|
||||
return application.spec?.replicas ?? 0;
|
||||
case 'DaemonSet':
|
||||
return application.status?.desiredNumberScheduled ?? 0;
|
||||
case 'StatefulSet':
|
||||
return application.status?.replicas ?? 0;
|
||||
default:
|
||||
throw new Error('Unknown application type');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue