From 9ca8c27e16bebd9a5bde4a653c31f79027d6bad1 Mon Sep 17 00:00:00 2001 From: Matt Butcher Date: Mon, 6 Jun 2016 19:34:30 -0600 Subject: [PATCH] fix(*): change TOML to YAML --- _proto/hapi/services/tiller.proto | 4 +-- cmd/helm/create.go | 2 +- cmd/helm/install.go | 2 +- docs/charts.md | 34 +++++++++--------- docs/examples/alpine/README.md | 2 +- docs/examples/alpine/values.toml | 2 -- docs/examples/alpine/values.yaml | 2 ++ pkg/chartutil/load.go | 4 ++- pkg/chartutil/testdata/frobnitz-1.2.3.tgz | Bin 3459 -> 3333 bytes .../charts/alpine/charts/mast1/values.yaml | 2 +- .../charts/alpine/charts/mast2-0.1.0.tgz | Bin 435 -> 325 bytes .../frobnitz/charts/mariner-4.3.2.tgz | Bin 895 -> 896 bytes .../mariner/charts/albatross-0.1.0.tgz | Bin 322 -> 322 bytes pkg/engine/engine.go | 7 ++-- pkg/engine/engine_test.go | 23 ++++++------ pkg/helm/error.go | 2 +- pkg/lint/lint_test.go | 4 +-- pkg/lint/message.go | 2 +- pkg/lint/testdata/albatross/values.toml | 1 - pkg/lint/testdata/albatross/values.yaml | 1 + pkg/lint/testdata/badchartfile/values.toml | 4 --- pkg/lint/testdata/badchartfile/values.yaml | 1 + .../{values.toml => values.yaml} | 4 +-- pkg/lint/testdata/goodone/values.toml | 1 - pkg/lint/testdata/goodone/values.yaml | 1 + pkg/lint/values.go | 10 +++--- pkg/proto/hapi/services/tiller.pb.go | 2 +- 27 files changed, 58 insertions(+), 59 deletions(-) delete mode 100644 docs/examples/alpine/values.toml create mode 100644 docs/examples/alpine/values.yaml delete mode 100644 pkg/lint/testdata/albatross/values.toml create mode 100644 pkg/lint/testdata/albatross/values.yaml delete mode 100644 pkg/lint/testdata/badchartfile/values.toml create mode 100644 pkg/lint/testdata/badchartfile/values.yaml rename pkg/lint/testdata/badvaluesfile/{values.toml => values.yaml} (66%) delete mode 100644 pkg/lint/testdata/goodone/values.toml create mode 100644 pkg/lint/testdata/goodone/values.yaml diff --git a/_proto/hapi/services/tiller.proto b/_proto/hapi/services/tiller.proto index 4829633e8..729a9848e 100644 --- a/_proto/hapi/services/tiller.proto +++ b/_proto/hapi/services/tiller.proto @@ -16,7 +16,7 @@ option go_package = "services"; // config. At any given time a release has one // chart and one config. // -// Config: A config is a TOML file that supplies values +// Config: A config is a YAML file that supplies values // to the parametrizable templates of a chart. // // Chart: A chart is a helm package that contains @@ -150,7 +150,7 @@ message UpdateReleaseResponse { message InstallReleaseRequest { // Chart is the protobuf representation of a chart. hapi.chart.Chart chart = 1; - // Values is a string containing (unparsed) TOML values. + // Values is a string containing (unparsed) YAML values. hapi.chart.Config values = 2; // DryRun, if true, will run through the release logic, but neither create // a release object nor deploy to Kubernetes. The release object returned diff --git a/cmd/helm/create.go b/cmd/helm/create.go index 4270e1bbc..e99a05cc9 100644 --- a/cmd/helm/create.go +++ b/cmd/helm/create.go @@ -19,7 +19,7 @@ something like this: foo/ |- Chart.yaml # Information about your chart | - |- values.toml # The default values for your templates + |- values.yaml # The default values for your templates | |- charts/ # Charts that this chart depends on | diff --git a/cmd/helm/install.go b/cmd/helm/install.go index a8de096c5..1d0717836 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -42,7 +42,7 @@ var installCmd = &cobra.Command{ func init() { f := installCmd.Flags() - f.StringVarP(&installValues, "values", "f", "", "path to a values TOML file") + f.StringVarP(&installValues, "values", "f", "", "path to a values YAML file") f.StringVarP(&installRelName, "name", "n", "", "the release name. If unspecified, it will autogenerate one for you.") f.BoolVar(&installDryRun, "dry-run", false, "simulate an install") diff --git a/docs/charts.md b/docs/charts.md index ced2aa3e1..ed95e0ba8 100644 --- a/docs/charts.md +++ b/docs/charts.md @@ -25,7 +25,7 @@ wordpress/ Chart.yaml # A YAML file containing information about the chart LICENSE # OPTIONAL: A plain text file containing the license for the chart README.md # OPTIONAL: A human-readable README file - values.toml # The default configuration values for this chart + values.yaml # The default configuration values for this chart charts/ # A directory containing any charts upon which this chart depends. templates/ # A directory of templates that, when combined with values, # will generate valid Kubernetes manifest files. @@ -133,13 +133,13 @@ Helm renders the charts, it will pass every file in that directory through the template engine. Values for the templates are supplied two ways: - - Chart developers may supply a file called `values.toml` inside of a + - Chart developers may supply a file called `values.yaml` inside of a chart. This file can contain default values. - - Chart users may supply a TOML file that contains values. This can be + - Chart users may supply a YAML file that contains values. This can be provided on the command line with `helm install`. When a user supplies custom values, these values will override the -values in the chart's `values.toml` file. +values in the chart's `values.yaml` file. ### Template Files Template files follow the standard conventions for writing Go templates. @@ -207,36 +207,36 @@ used to pass arbitrarily structured data into the template. ### Values files -Considering the template in the previous section, a `values.toml` file +Considering the template in the previous section, a `values.yaml` file that supplies the necessary values would look like this: -```toml +```yaml imageRegistry = "quay.io/deis" dockerTag = "latest" pullPolicy = "alwaysPull" storage = "s3" ``` -A values file is formatted in TOML. A chart may include a default -`values.toml` file. The Helm install command allows a user to override -values by supplying additional TOML values: +A values file is formatted in YAML. A chart may include a default +`values.yaml` file. The Helm install command allows a user to override +values by supplying additional YAML values: ```console -$ helm install --values=myvals.toml wordpress +$ helm install --values=myvals.yaml wordpress ``` When values are passed in this way, they will be merged into the default -values file. For example, consider a `myvals.toml` file that looks like +values file. For example, consider a `myvals.yaml` file that looks like this: -```toml +```yaml storage = "gcs" ``` -When this is merged with the `values.toml` in the chart, the resulting +When this is merged with the `values.yaml` in the chart, the resulting generated content will be: -```toml +```yaml imageRegistry = "quay.io/deis" dockerTag = "latest" pullPolicy = "alwaysPull" @@ -246,7 +246,7 @@ storage = "gcs" Note that only the last field was overridden. **NOTE:** The default values file included inside of a chart _must_ be named -`values.toml`. But files specified on the command line can be named +`values.yaml`. But files specified on the command line can be named anything. ### Scope, Dependencies, and Values @@ -259,7 +259,7 @@ demonstration Wordpress chart above has both `mysql` and `apache` as dependencies. The values file could supply values to all of these components: -```toml +```yaml title = "My Wordpress Site" # Sent to the Wordpress template [mysql] @@ -289,7 +289,7 @@ standard references that will help you out. - [Go templates](https://godoc.org/text/template) - [Extra template functions](https://godoc.org/github.com/Masterminds/sprig) -- [The TOML format](https://github.com/toml-lang/toml) +- [The YAML format]() ## Using Helm to Manage Charts diff --git a/docs/examples/alpine/README.md b/docs/examples/alpine/README.md index a7c84fc41..5bd595747 100644 --- a/docs/examples/alpine/README.md +++ b/docs/examples/alpine/README.md @@ -3,7 +3,7 @@ This example was generated using the command `helm create alpine`. The `templates/` directory contains a very simple pod resource with a couple of parameters. -The `values.toml` file contains the default values for the +The `values.yaml` file contains the default values for the `alpine-pod.yaml` template. You can install this example using `helm install docs/examples/alpine`. diff --git a/docs/examples/alpine/values.toml b/docs/examples/alpine/values.toml deleted file mode 100644 index 504e6e1be..000000000 --- a/docs/examples/alpine/values.toml +++ /dev/null @@ -1,2 +0,0 @@ -# The pod name -name = "my-alpine" diff --git a/docs/examples/alpine/values.yaml b/docs/examples/alpine/values.yaml new file mode 100644 index 000000000..bb6c06ae4 --- /dev/null +++ b/docs/examples/alpine/values.yaml @@ -0,0 +1,2 @@ +# The pod name +name: my-alpine diff --git a/pkg/chartutil/load.go b/pkg/chartutil/load.go index c7b3b6d59..ef1662a8d 100644 --- a/pkg/chartutil/load.go +++ b/pkg/chartutil/load.go @@ -93,7 +93,9 @@ func loadFiles(files []*afile) (*chart.Chart, error) { return c, err } c.Metadata = m - } else if f.name == "values.toml" || f.name == "values.yaml" { + } else if f.name == "values.toml" { + return c, errors.New("values.toml is illegal as of 2.0.0-alpha.2") + } else if f.name == "values.yaml" { c.Values = &chart.Config{Raw: string(f.data)} } else if strings.HasPrefix(f.name, "templates/") { c.Templates = append(c.Templates, &chart.Template{Name: f.name, Data: f.data}) diff --git a/pkg/chartutil/testdata/frobnitz-1.2.3.tgz b/pkg/chartutil/testdata/frobnitz-1.2.3.tgz index 80c0a25022b6306a4aadb290475650981f1fcef5..31c855223046ed3bba9abb2a7ca707195ad6daa4 100644 GIT binary patch literal 3333 zcmV+g4f^sQiwFSOBUV=c1MOT3bQ4t??k-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KveCX19qvfCP?%bv4A)W5S zBf4G{W6~yEU4QM`)lu^#r{`hMl(*0C`tmPX8$X*Fjm-}@2Q{JH9ysd_wNIx;=6^%< z|Dz^@Jjp-w_TA)Psgk4kpI6{8RYX45PyY;b{2-6`B8U;Sf4TBF4^I7H$XEOeq9OAC zsL7y)+J88%fyzKGtp8dZ<$t__hVcJUgTcR_|4Nk-#ecnmhVcJUgTbEGe}!7@=Km=* zDir_m3WV=;f0aBF*)Ej?*7*g%BKov2ah-PkS$dy3RWS}syLpID4If6g{VtOEXtaBMKbNS zqRDw>=dBp!{dV&0PTP0q&C|N>lXXt-@itxw6Y{^`DeLnWW%?A)n7>C|RUhXsgbeu$ zF~=_IIe#g+SrMn$%(;J_|DcTCP^g0JS-aNm4}L!m8@i)M-5Y9`%Ajtv^fYa?9kkaj zJ8J8~B+f<7*=}6cSg*6cei`_&c>Y7mE>#=&?)@Lnf3ci@t|adNONjYC00000 X0000000000z?FFgy`&fL04M+ebFHRB literal 435 zcmV;k0ZjfMiwG0|32ul0|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PL3CYQrED$8(*hIJDPI)W!q~yBOQWU>m#X3)s{)0TY9oLf?LV z&@l#Mlr0%!{sCqsHbDvkYrjADo{nKwFp&Zu!t1F1`d2p(BJTG5X^4vNn%{DKOt)x^`C>F|A~o_>&(bW3V^Tf ze?sX;{V9(3|12!wo*&pK41^r;SG`Y)EM3C3X*Jk~!S?0(X=T54%ox6hLo0X&jWL7X z&{6;Z diff --git a/pkg/chartutil/testdata/frobnitz/charts/mariner-4.3.2.tgz b/pkg/chartutil/testdata/frobnitz/charts/mariner-4.3.2.tgz index 3b6f987b3b39b992636405c611bc710066b3a8cd..90c7979afe88fb36ef00f6fe09041217b874323f 100644 GIT binary patch literal 896 zcmV-`1AqJyFIqY%^yyyBQQ+^g%6q>LQwJ^q?dW1r=f!(cXlzOnT`iX_i51-kZHxmX%8G zN_c*=@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@H5n2Og>}tziKR;LlUg213=egWP|bIA2$*|=YNt=FBJcgU}S`kR33%e^k7u~ z&kAN1%95h!ag4xl4BGeo`x@iLKaG>a^`A5{YW%C?(f|L55LYr+QyIH$yJl8rQ*-V; z5F6FCyH$4~rtDI;=5})ZqW8K?TYCJln%b*3s@7%9Jiq*uwfsQCl6l7;7q+jgeU$0C z{59t6gH7wNms=fAJ)WGLm&tc;zT1pnq7%#K>DrEZ-_}xXg*dj+!^B&6c{4hkUrJsT zzdpU^O2@+HZ4oNsQXZFkC|&cxbDd02 z$Lu?$nXN_X1t-a_SAA8)8c)qYPid0ot8Z~_|KZD7XHKl$|3%+b(x0^5TNIr=XwP;x z89vSG+B$IYTtlBP`_qi>qG-!t-QGFRb}n#@Jhel8-BGveK38d$PL*y51OkCTAP@)y V0)apv5D3KI@Ex#|jWGZy005ZBxA6b~ diff --git a/pkg/chartutil/testdata/mariner/charts/albatross-0.1.0.tgz b/pkg/chartutil/testdata/mariner/charts/albatross-0.1.0.tgz index 6795b2d9e8d5ac0f91c5d842bb20f3ab82b42a0c..3d5b6a2420ffcdf46d8f9de74f056c4d7e47bb9e 100644 GIT binary patch delta 15 WcmX@abcl&fzMF&Lrt(HM8%6*nDg-eA delta 15 WcmX@abcl&fzMF$#p3Fuz8%6*lr33E( diff --git a/pkg/engine/engine.go b/pkg/engine/engine.go index 70e809580..17254f17e 100644 --- a/pkg/engine/engine.go +++ b/pkg/engine/engine.go @@ -7,8 +7,7 @@ import ( "text/template" "github.com/Masterminds/sprig" - - chartutil "k8s.io/helm/pkg/chart" + "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/proto/hapi/chart" ) @@ -177,7 +176,7 @@ func coalesceValues(c *chart.Chart, v chartutil.Values) chartutil.Values { nv, err := chartutil.ReadValues([]byte(c.Values.Raw)) if err != nil { // On error, we return just the overridden values. - // FIXME: We should log this error. It indicates that the TOML data + // FIXME: We should log this error. It indicates that the YAML data // did not parse. log.Printf("error reading default values: %s", err) return v @@ -226,7 +225,7 @@ func coalesceTables(dst, src map[string]interface{}) { } } -// istable is a special-purpose function to see if the present thing matches the definition of a TOML table. +// istable is a special-purpose function to see if the present thing matches the definition of a YAML table. func istable(v interface{}) bool { _, ok := v.(map[string]interface{}) return ok diff --git a/pkg/engine/engine_test.go b/pkg/engine/engine_test.go index aa9cc4110..2d0b7de6f 100644 --- a/pkg/engine/engine_test.go +++ b/pkg/engine/engine_test.go @@ -5,7 +5,7 @@ import ( "sync" "testing" - chartutil "k8s.io/helm/pkg/chart" + "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/proto/hapi/chart" ) @@ -31,13 +31,12 @@ func TestRender(t *testing.T) { {Name: "test1", Data: []byte("{{.outer | title }} {{.inner | title}}")}, }, Values: &chart.Config{ - Raw: `outer = "DEFAULT"\ninner= "DEFAULT"\n`, + Raw: "outer: DEFAULT\ninner: DEFAULT", }, } vals := &chart.Config{ - Raw: `outer = "BAD" - inner= "inn"`, + Raw: "outer: BAD\ninner: inn", } overrides := map[string]interface{}{ @@ -207,18 +206,20 @@ func TestRenderNestedValues(t *testing.T) { {Name: outerpath, Data: []byte(`Gather ye {{.what}} while ye may`)}, }, Values: &chart.Config{ - Raw: `what = "stinkweed" - [herrick] - who = "time" - `}, + Raw: ` +what: stinkweed +herrick: + who: time`, + }, Dependencies: []*chart.Chart{inner}, } inject := chart.Config{ Raw: ` - what = "rosebuds" - [herrick.deepest] - what = "flower"`, +what: rosebuds +herrick: + deepest: + what: flower`, } out, err := e.Render(outer, &inject, map[string]interface{}{}) diff --git a/pkg/helm/error.go b/pkg/helm/error.go index 88dd2cd90..450999246 100644 --- a/pkg/helm/error.go +++ b/pkg/helm/error.go @@ -9,7 +9,7 @@ const ( ErrMissingTpls = Error("missing chart templates") // ErrMissingChart indicates that the Chart.yaml data is missing. ErrMissingChart = Error("missing chart metadata") - // ErrMissingValues indicates that the config values.toml data is missing. + // ErrMissingValues indicates that the config values.yaml data is missing. ErrMissingValues = Error("missing chart values") ) diff --git a/pkg/lint/lint_test.go b/pkg/lint/lint_test.go index 65f4ace7f..634b10145 100644 --- a/pkg/lint/lint_test.go +++ b/pkg/lint/lint_test.go @@ -53,8 +53,8 @@ func TestBadValues(t *testing.T) { if len(m) != 1 { t.Errorf("All didn't fail with expected errors, got %#v", m) } - if !strings.Contains(m[0].Text, "Bare keys cannot contain ':'") { - t.Errorf("All didn't have the error for invalid key format") + if !strings.Contains(m[0].Text, "cannot unmarshal") { + t.Errorf("All didn't have the error for invalid key format: %s", m[0].Text) } } diff --git a/pkg/lint/message.go b/pkg/lint/message.go index ba4eee8ff..62bf9cf58 100644 --- a/pkg/lint/message.go +++ b/pkg/lint/message.go @@ -8,7 +8,7 @@ type Severity int const ( // UnknownSev indicates that the severity of the error is unknown, and should not stop processing. UnknownSev = iota - // InfoSev indicates information, for example missing values.toml file + // InfoSev indicates information, for example missing values.yaml file InfoSev // WarningSev indicates that something does not meet code standards, but will likely function. WarningSev diff --git a/pkg/lint/testdata/albatross/values.toml b/pkg/lint/testdata/albatross/values.toml deleted file mode 100644 index 388764d49..000000000 --- a/pkg/lint/testdata/albatross/values.toml +++ /dev/null @@ -1 +0,0 @@ -name = "mariner" diff --git a/pkg/lint/testdata/albatross/values.yaml b/pkg/lint/testdata/albatross/values.yaml new file mode 100644 index 000000000..74cc6a0dc --- /dev/null +++ b/pkg/lint/testdata/albatross/values.yaml @@ -0,0 +1 @@ +name: "mariner" diff --git a/pkg/lint/testdata/badchartfile/values.toml b/pkg/lint/testdata/badchartfile/values.toml deleted file mode 100644 index d6bba222c..000000000 --- a/pkg/lint/testdata/badchartfile/values.toml +++ /dev/null @@ -1,4 +0,0 @@ -# Default values for badchartfile. -# This is a TOML-formatted file. https://github.com/toml-lang/toml -# Declare name/value pairs to be passed into your templates. -# name = "value" diff --git a/pkg/lint/testdata/badchartfile/values.yaml b/pkg/lint/testdata/badchartfile/values.yaml new file mode 100644 index 000000000..9f367033b --- /dev/null +++ b/pkg/lint/testdata/badchartfile/values.yaml @@ -0,0 +1 @@ +# Default values for badchartfile. diff --git a/pkg/lint/testdata/badvaluesfile/values.toml b/pkg/lint/testdata/badvaluesfile/values.yaml similarity index 66% rename from pkg/lint/testdata/badvaluesfile/values.toml rename to pkg/lint/testdata/badvaluesfile/values.yaml index 80488f4f7..b5a10271c 100644 --- a/pkg/lint/testdata/badvaluesfile/values.toml +++ b/pkg/lint/testdata/badvaluesfile/values.yaml @@ -1,2 +1,2 @@ -# Invalid value for badvaluesfile for testing lint fails with invalid toml format -name: "value" +# Invalid value for badvaluesfile for testing lint fails with invalid yaml format +name= "value" diff --git a/pkg/lint/testdata/goodone/values.toml b/pkg/lint/testdata/goodone/values.toml deleted file mode 100644 index 6c50ac9cc..000000000 --- a/pkg/lint/testdata/goodone/values.toml +++ /dev/null @@ -1 +0,0 @@ -name = "goodone here" diff --git a/pkg/lint/testdata/goodone/values.yaml b/pkg/lint/testdata/goodone/values.yaml new file mode 100644 index 000000000..fe9abd983 --- /dev/null +++ b/pkg/lint/testdata/goodone/values.yaml @@ -0,0 +1 @@ +name: "goodone here" diff --git a/pkg/lint/values.go b/pkg/lint/values.go index 1fb4773f3..2549f2937 100644 --- a/pkg/lint/values.go +++ b/pkg/lint/values.go @@ -4,18 +4,18 @@ import ( "os" "path/filepath" - "k8s.io/helm/pkg/chart" + "k8s.io/helm/pkg/chartutil" ) -// Values lints a chart's values.toml file. +// Values lints a chart's values.yaml file. func Values(basepath string) (messages []Message) { - vf := filepath.Join(basepath, "values.toml") + vf := filepath.Join(basepath, "values.yaml") messages = []Message{} if _, err := os.Stat(vf); err != nil { - messages = append(messages, Message{Severity: InfoSev, Text: "No values.toml file"}) + messages = append(messages, Message{Severity: InfoSev, Text: "No values.yaml file"}) return } - _, err := chart.ReadValuesFile(vf) + _, err := chartutil.ReadValuesFile(vf) if err != nil { messages = append(messages, Message{Severity: ErrorSev, Text: err.Error()}) } diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index dac4868b2..40a18d7f4 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -238,7 +238,7 @@ func (*UpdateReleaseResponse) Descriptor() ([]byte, []int) { return fileDescript type InstallReleaseRequest struct { // Chart is the protobuf representation of a chart. Chart *hapi_chart3.Chart `protobuf:"bytes,1,opt,name=chart" json:"chart,omitempty"` - // Values is a string containing (unparsed) TOML values. + // Values is a string containing (unparsed) YAML values. Values *hapi_chart.Config `protobuf:"bytes,2,opt,name=values" json:"values,omitempty"` // DryRun, if true, will run through the release logic, but neither create // a release object nor deploy to Kubernetes. The release object returned