From 693189b42dff9cb67f7ddd995ad5a70abc26a1e1 Mon Sep 17 00:00:00 2001 From: Jon Edvald Date: Mon, 24 Jun 2019 16:25:06 +0200 Subject: [PATCH] improvement(k8s): don't require manual init when only Tiller is missing This would come up, for example, when creating a new app namespace. --- garden-service/src/plugins/kubernetes/init.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/garden-service/src/plugins/kubernetes/init.ts b/garden-service/src/plugins/kubernetes/init.ts index 0f95db9867..738b024163 100644 --- a/garden-service/src/plugins/kubernetes/init.ts +++ b/garden-service/src/plugins/kubernetes/init.ts @@ -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 }