diff --git a/cmd/helm/create.go b/cmd/helm/create.go index d22409579..a5fed1e04 100644 --- a/cmd/helm/create.go +++ b/cmd/helm/create.go @@ -81,7 +81,7 @@ func (o *createOptions) run(out io.Writer) error { Type: "application", Version: "0.1.0", AppVersion: "0.1.0", - APIVersion: chart.APIVersionV1, + APIVersion: chart.APIVersionV2, } if o.starter != "" { diff --git a/cmd/helm/create_test.go b/cmd/helm/create_test.go index 0f973d7de..7979b7c2e 100644 --- a/cmd/helm/create_test.go +++ b/cmd/helm/create_test.go @@ -55,7 +55,7 @@ func TestCreateCmd(t *testing.T) { if c.Name() != cname { t.Errorf("Expected %q name, got %q", cname, c.Name()) } - if c.Metadata.APIVersion != chart.APIVersionV1 { + if c.Metadata.APIVersion != chart.APIVersionV2 { t.Errorf("Wrong API version: %q", c.Metadata.APIVersion) } } @@ -106,7 +106,7 @@ func TestCreateStarterCmd(t *testing.T) { if c.Name() != cname { t.Errorf("Expected %q name, got %q", cname, c.Name()) } - if c.Metadata.APIVersion != chart.APIVersionV1 { + if c.Metadata.APIVersion != chart.APIVersionV2 { t.Errorf("Wrong API version: %q", c.Metadata.APIVersion) } @@ -177,7 +177,7 @@ func TestCreateStarterAbsoluteCmd(t *testing.T) { if c.Name() != cname { t.Errorf("Expected %q name, got %q", cname, c.Name()) } - if c.Metadata.APIVersion != chart.APIVersionV1 { + if c.Metadata.APIVersion != chart.APIVersionV2 { t.Errorf("Wrong API version: %q", c.Metadata.APIVersion) } diff --git a/pkg/chart/chart.go b/pkg/chart/chart.go index 8ff72f4f0..03c63c119 100644 --- a/pkg/chart/chart.go +++ b/pkg/chart/chart.go @@ -18,6 +18,9 @@ package chart // APIVersionV1 is the API version number for version 1. const APIVersionV1 = "v1" +// APIVersionV1 is the API version number for version 2. +const APIVersionV2 = "v2" + // Chart is a helm package that contains metadata, a default config, zero or more // optionally parameterizable templates, and zero or more charts (dependencies). type Chart struct { diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 6468f3b90..a534a67a1 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -53,7 +53,7 @@ const ( HelpersName = "_helpers.tpl" ) -const defaultChartfile = `apiVersion: v1 +const defaultChartfile = `apiVersion: v2 name: %s description: A Helm chart for Kubernetes