From 7e13d46fef374c8111d450cd94cc84297137b273 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Fri, 11 Jan 2019 11:27:43 +0100 Subject: [PATCH] Add k8s version check to kustomize deployer Run the same check as the kubectl deployer Signed-off-by: David Gageot --- pkg/skaffold/deploy/kustomize.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/skaffold/deploy/kustomize.go b/pkg/skaffold/deploy/kustomize.go index 00bfc097235..ffa695ee2f0 100644 --- a/pkg/skaffold/deploy/kustomize.go +++ b/pkg/skaffold/deploy/kustomize.go @@ -26,6 +26,7 @@ import ( yaml "gopkg.in/yaml.v2" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/color" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest" @@ -80,6 +81,11 @@ func (k *KustomizeDeployer) Labels() map[string]string { // Deploy runs `kubectl apply` on the manifest generated by kustomize. func (k *KustomizeDeployer) Deploy(ctx context.Context, out io.Writer, builds []build.Artifact) ([]Artifact, error) { + color.Default.Fprintln(out, "kubectl client version:", k.kubectl.Version()) + if err := k.kubectl.CheckVersion(); err != nil { + color.Default.Fprintln(out, err) + } + manifests, err := k.readManifests(ctx) if err != nil { return nil, errors.Wrap(err, "reading manifests")