Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #917 from weaveworks/issue/916-missing-sync
Browse files Browse the repository at this point in the history
Make sure multi-yamels are delimited
  • Loading branch information
squaremo authored Jan 26, 2018
2 parents 9ce750a + 7ab9cbd commit 85a2602
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cluster/kubernetes/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func (c *Kubectl) apply(logger log.Logger, cs changeSet, errs cluster.SyncError)
if len(objs) == 0 {
return
}
logger.Log("cmd", cmd, "args", strings.Join(args, " "), "count", len(objs))
args = append(args, cmd)
if err := c.doCommand(logger, makeMultidoc(objs), args...); err != nil {
for _, obj := range objs {
Expand Down Expand Up @@ -103,7 +104,7 @@ func (c *Kubectl) doCommand(logger log.Logger, r io.Reader, args ...string) erro
func makeMultidoc(objs []obj) *bytes.Buffer {
buf := &bytes.Buffer{}
for _, obj := range objs {
buf.WriteString("---\n" + string(obj.bytes))
buf.WriteString("\n---\n" + string(obj.bytes))
}
return buf
}
Expand Down

0 comments on commit 85a2602

Please sign in to comment.