Skip to content

Commit

Permalink
fix(k8s): make sure we error/init when any system service is missing …
Browse files Browse the repository at this point in the history
…on init

Previously we were relying on the combined state, which doesn't distinguish
between any/all services being outdated, and some being missing.
  • Loading branch information
edvald committed Jun 13, 2019
1 parent 2ccd039 commit 33f9638
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions garden-service/src/plugins/kubernetes/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ export async function getEnvironmentStatus({ ctx, log }: GetEnvironmentStatusPar
systemReady = systemTillerReady && sysNamespaceUpToDate && systemServiceStatus.state === "ready"
dashboardPages = systemServiceStatus.dashboardPages

// If we require manual init and system services are outdated (as opposed to unhealthy, missing etc.), we warn
// If we require manual init and system services are outdated but none are *missing*, we warn
// in the prepareEnvironment handler, instead of flagging as not ready here. This avoids blocking users where
// there's variance in configuration between users of the same cluster, that most likely shouldn't affect usage.
if (needManualInit && systemServiceStatus.state === "outdated") {
const states = Object.values(systemServiceStatus.serviceStatuses).map(s => s.state)
if (needManualInit && systemServiceStatus.state === "outdated" && !states.includes("missing")) {
needManualInit = false
}

Expand Down

0 comments on commit 33f9638

Please sign in to comment.