Skip to content

Commit

Permalink
Merge pull request #345 from garden-io/fix-helm-init
Browse files Browse the repository at this point in the history
fix(k8s): make sure Helm client is initialized on startup
  • Loading branch information
edvald authored Oct 28, 2018
2 parents b86c463 + f1bf4bd commit 53dd826
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions garden-service/src/plugins/kubernetes/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -76,18 +76,20 @@ export async function getRemoteEnvironmentStatus({ ctx }: GetEnvironmentStatusPa
}

await prepareNamespaces({ ctx })
await helm(ctx.provider, logEntry, "init", "--client-only")

return {
ready: true,
needUserInput: false,
}
}

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
Expand Down

0 comments on commit 53dd826

Please sign in to comment.