From f1bf4bdc04257710e4d9ab2c423475bfdb1eb5c2 Mon Sep 17 00:00:00 2001 From: Jon Edvald Date: Sun, 28 Oct 2018 22:31:08 +0100 Subject: [PATCH] fix(k8s): make sure Helm client is initialized on startup --- garden-service/src/plugins/kubernetes/init.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/garden-service/src/plugins/kubernetes/init.ts b/garden-service/src/plugins/kubernetes/init.ts index 32306691da..da0a4ae3e1 100644 --- a/garden-service/src/plugins/kubernetes/init.ts +++ b/garden-service/src/plugins/kubernetes/init.ts @@ -65,7 +65,7 @@ async function prepareNamespaces({ ctx }: GetEnvironmentStatusParams) { ]) } -export async function getRemoteEnvironmentStatus({ ctx }: GetEnvironmentStatusParams) { +export async function getRemoteEnvironmentStatus({ ctx, logEntry }: GetEnvironmentStatusParams) { const loggedIn = await getLoginStatus({ ctx }) if (!loggedIn) { @@ -76,6 +76,7 @@ export async function getRemoteEnvironmentStatus({ ctx }: GetEnvironmentStatusPa } await prepareNamespaces({ ctx }) + await helm(ctx.provider, logEntry, "init", "--client-only") return { ready: true, @@ -83,11 +84,12 @@ export async function getRemoteEnvironmentStatus({ ctx }: GetEnvironmentStatusPa } } -export async function getLocalEnvironmentStatus({ ctx }: GetEnvironmentStatusParams) { +export async function getLocalEnvironmentStatus({ ctx, logEntry }: GetEnvironmentStatusParams) { let ready = true let needUserInput = false await prepareNamespaces({ ctx }) + await helm(ctx.provider, logEntry, "init", "--client-only") // TODO: check if mkcert has been installed // TODO: check if all certs have been generated