Skip to content

Commit

Permalink
fix(k8s): report correct deployment status when replicas=0
Browse files Browse the repository at this point in the history
closes #655
  • Loading branch information
edvald committed Mar 28, 2019
1 parent 8ee25ee commit a7a2983
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions garden-service/src/plugins/kubernetes/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export async function checkWorkloadStatus(
const status = <V1StatefulSetStatus>statusRes.status
const statusSpec = <V1StatefulSetSpec>statusRes.spec

const replicas = status.replicas
const replicas = status.replicas || 0
const updated = status.updatedReplicas || 0
const ready = status.readyReplicas || 0

Expand All @@ -272,7 +272,7 @@ export async function checkWorkloadStatus(
} else {
const status = <V1DeploymentStatus>statusRes.status

const desired = 1 // TODO: service.count[env.name] || 1
const desired = status.replicas || 0
const updated = status.updatedReplicas || 0
const replicas = status.replicas || 0
const available = status.availableReplicas || 0
Expand Down Expand Up @@ -385,7 +385,7 @@ export async function waitForResources({ ctx, provider, serviceName, resources:
const symbol = status.warning === true ? "warning" : "info"
statusLine.setState({
symbol,
msg: status.lastMessage,
msg: `${status.obj.kind}/${status.obj.metadata.name}: ${status.lastMessage}`,
})
log.verbose({
symbol,
Expand Down

0 comments on commit a7a2983

Please sign in to comment.