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

Make sure multi-yamels are delimited #917

Merged
merged 1 commit into from
Jan 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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