Skip to content

Commit

Permalink
fix(k8s): wait for Tiller pod to be ready when initializing
Browse files Browse the repository at this point in the history
Fixes #228
  • Loading branch information
edvald committed Aug 14, 2018
1 parent 1dc936e commit a5cd8eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion garden-cli/src/plugins/kubernetes/helm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ async function buildModule({ ctx, provider, module, logEntry }: BuildModuleParam
return { fresh: true }
}

function helm(provider: KubernetesProvider, ...args: string[]) {
export function helm(provider: KubernetesProvider, ...args: string[]) {
return execa.stdout("helm", [
"--kube-context", provider.config.context,
...args,
Expand Down
7 changes: 6 additions & 1 deletion garden-cli/src/plugins/kubernetes/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import { readFile } from "fs-extra"
import { processServices } from "../../process"
import { LogEntry } from "../../logger/logger"
import { homedir } from "os"
import { helm } from "./helm"

// TODO: split this into separate plugins to handle Docker for Mac and Minikube

Expand Down Expand Up @@ -83,7 +84,11 @@ async function configureSystemEnvironment(
}

// TODO: need to add logic here to wait for tiller to be ready
await execa("helm", ["init", "--service-account", "default", "--upgrade"])
await helm(sysProvider,
"init", "--wait",
"--service-account", "default",
"--upgrade",
)

const sysStatus = await getEnvironmentStatus({
ctx: sysCtx,
Expand Down

0 comments on commit a5cd8eb

Please sign in to comment.