diff --git a/examples/helm-deployment/skaffold.yaml b/examples/helm-deployment/skaffold.yaml index d2ad1b498f0..5e37951dd5b 100644 --- a/examples/helm-deployment/skaffold.yaml +++ b/examples/helm-deployment/skaffold.yaml @@ -11,6 +11,7 @@ deploy: - name: skaffold-helm chartPath: skaffold-helm namespace: skaffold + #wait: true #valuesFilePath: helm-skaffold-values.yaml values: image: skaffold-helm diff --git a/pkg/skaffold/deploy/helm.go b/pkg/skaffold/deploy/helm.go index c92e72f818d..c0f4000a898 100644 --- a/pkg/skaffold/deploy/helm.go +++ b/pkg/skaffold/deploy/helm.go @@ -135,6 +135,9 @@ func (h *HelmDeployer) deployRelease(out io.Writer, r v1alpha2.HelmRelease, buil setOpts = append(setOpts, fmt.Sprintf("%s=%s", k, v)) } } + if r.Wait { + args = append(args, "--wait") + } args = append(args, setOpts...) return h.helm(out, args...) diff --git a/pkg/skaffold/schema/v1alpha2/config.go b/pkg/skaffold/schema/v1alpha2/config.go index 5859fb22c03..d32d9887f79 100644 --- a/pkg/skaffold/schema/v1alpha2/config.go +++ b/pkg/skaffold/schema/v1alpha2/config.go @@ -132,6 +132,7 @@ type HelmRelease struct { Namespace string `yaml:"namespace"` Version string `yaml:"version"` SetValues map[string]string `yaml:"setValues"` + Wait bool `yaml:"wait"` } // Artifact represents items that need to be built, along with the context in which