Skip to content

Commit

Permalink
improvement(k8s): don't require manual init when only Tiller is missing
Browse files Browse the repository at this point in the history
This would come up, for example, when creating a new app namespace.
  • Loading branch information
edvald authored and thsig committed Jun 24, 2019
1 parent 622d133 commit 693189b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions garden-service/src/plugins/kubernetes/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,14 @@ 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 but none are *missing*, we warn
// If we require manual init and system services are ready OR 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.
const states = Object.values(systemServiceStatus.serviceStatuses).map(s => s.state)
if (needManualInit && systemServiceStatus.state === "outdated" && !states.includes("missing")) {
if (
(systemServiceStatus.state === "outdated" && !states.includes("missing"))
|| systemServiceStatus.state === "ready"
) {
needManualInit = false
}

Expand Down

0 comments on commit 693189b

Please sign in to comment.