From 21d8dc8a8143bdfaaeb1c5e736162fd31d5b962b Mon Sep 17 00:00:00 2001 From: shubhindia Date: Sun, 29 Oct 2023 11:53:19 +0530 Subject: [PATCH] drop status field from yamls Signed-off-by: shubhindia --- pkg/transformer/utils.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/transformer/utils.go b/pkg/transformer/utils.go index 7caba1d3..f78c3dee 100644 --- a/pkg/transformer/utils.go +++ b/pkg/transformer/utils.go @@ -22,6 +22,7 @@ import ( "os/exec" "path" "path/filepath" + "regexp" "strings" dockerlib "github.com/fsouza/go-dockerclient" @@ -274,6 +275,10 @@ func ConfigAnnotations(service kobject.ServiceConfig) map[string]string { // Print either prints to stdout or to file/s func Print(name, path string, trailing string, data []byte, toStdout, generateJSON bool, f *os.File, provider string) (string, error) { file := "" + // simple hack to remove status from the output + re := regexp.MustCompile(`(?s)status:.*`) + data = re.ReplaceAll(data, nil) + if generateJSON { file = fmt.Sprintf("%s-%s.json", name, trailing) } else {