From 13ab03abf344a80ed2d1dacfc54c7982606a6849 Mon Sep 17 00:00:00 2001 From: Jaye Doepke Date: Fri, 2 Jul 2021 07:11:42 -0500 Subject: [PATCH] fix(helm): Pass multiple --api-versions flags to Helm (#573) (#576) Helm expects the --api-versions flag to be passed for each API, not once with a comma-separated list of APIs. --- pkg/helm/template.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/helm/template.go b/pkg/helm/template.go index 3e56b52cb..908a1d7ab 100644 --- a/pkg/helm/template.go +++ b/pkg/helm/template.go @@ -4,7 +4,6 @@ import ( "bytes" "io" "os" - "strings" "github.com/grafana/tanka/pkg/kubernetes/manifest" "github.com/pkg/errors" @@ -78,8 +77,7 @@ type TemplateOpts struct { func (t TemplateOpts) Flags() []string { var flags []string - if t.APIVersions != nil { - value := strings.Join(t.APIVersions, ",") + for _, value := range t.APIVersions { flags = append(flags, "--api-versions="+value) }