diff --git a/integration/render_test.go b/integration/render_test.go index 82650d11f1d..60ff769c9a6 100644 --- a/integration/render_test.go +++ b/integration/render_test.go @@ -58,7 +58,6 @@ spec: containers: - image: gcr.io/k8s-skaffold/skaffold:test name: skaffold - `, }, { @@ -92,7 +91,6 @@ spec: name: image1 - image: gcr.io/project/image2:tag2 name: image2 - `, }, { @@ -129,7 +127,7 @@ spec: containers: - image: gcr.io/project/image1:tag1 name: image1 - +--- apiVersion: v1 kind: Pod metadata: @@ -138,7 +136,6 @@ spec: containers: - image: gcr.io/project/image2:tag2 name: image2 - `, }, } diff --git a/pkg/skaffold/deploy/kubectl.go b/pkg/skaffold/deploy/kubectl.go index 21ee85f97e9..d59c1c5c354 100644 --- a/pkg/skaffold/deploy/kubectl.go +++ b/pkg/skaffold/deploy/kubectl.go @@ -235,10 +235,13 @@ func (k *KubectlDeployer) Render(ctx context.Context, out io.Writer, builds []bu manifestOut = bufio.NewWriter(f) } - for _, m := range manifests { - if _, err := fmt.Fprintln(manifestOut, string(m)); err != nil { + for i := 0; i < len(manifests); i++ { + if _, err := fmt.Fprintf(manifestOut, string(manifests[i])); err != nil { return errors.Wrap(err, "writing manifests") } + if i < len(manifests)-1 { + fmt.Fprintf(manifestOut, "---\n") + } } return nil }