Commit graph

234 commits

Author SHA1 Message Date
Martin Hickey
ecf4eda6c5 Fix scaffold chart label in helper template
The 'app.kubernetes.io/version' label was not being rendered as
expected. It was appending onto the label before it and also
the next label label was appending onto it on the same line.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-05-09 10:56:46 +01:00
Matt Farina
250b63eced
Updating the labels for consistency
Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-05-07 14:13:29 -04:00
Luis Davim
82ffe56ca6
Reduce template code duplication. Fixes #5372
Signed-off-by: Luis Davim <luis.davim@jet.com>
2019-05-07 12:03:54 -04:00
Luis Davim
4425f86865
Add app.kubernetes.io/version label
Signed-off-by: Luis Davim <luis.davim@jet.com>
2019-05-07 11:59:49 -04:00
Matt Farina
af7eab0325
Updating to the k8s label convention
Closes #4335

Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-05-07 11:26:31 -04:00
Martin Hickey
f12c2a3111 Change the nginx app version to a set tag
Want to avoid moving tags like using 'stable'. Therefore,
specify the specifc nginx version/tag.

Update from comment review:
- https://github.com/helm/helm/pull/5662#discussion_r280122531

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-05-02 10:00:41 +01:00
Martin Hickey
86c5e52ac4 Fix the image field for the scaffold chart application
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-04-30 18:13:17 +01:00
Ian Howell
ffff0e8c33 Feat/schema validation (#5350)
* Add the Schema type and a function to read it

* Added a function to read a schema from a file

* Check that values.yaml matches schema

This commit uses the gojsonschema package to validate a values.yaml file
against a corresponding values.schema.yaml file.

* Add functionality to generate a schema from a values.yaml

* Add Schema to Chart and loader

* Clean up implementation in chartutil

* Add tests for helm install with schema

* Add schema validation to helm lint

* Clean up "matchSchema"

* Modify error output

* Add documentation

* Fix a linter issue

* Fix a test that broke during a rebase

* Clean up documentation

* Specify JSONSchema spec

Since JSONSchema is still in a draft state as of this commit, we need to
specify a particular version of the JSONSchema spec

* Switch to using builtin functionality for file extensions

* Switch to using a third-party library for JSON conversion

* Use the constants from the gojsonschema package

* Updates to unit tests

* Minor change to avoid string cast

* Remove JSON Schema generation

* Change Schema type from map[string]interface{} to []byte

* Convert all Schema YAML to JSON

* Fix some tests that were broken by a rebase

* Fix up YAML/JSON conversions

* This checks subcharts for schema validation

The final coalesced values for a given chart will be validated against
that chart's schema, as well as any dependent subchart's schema

* Add unit tests for ValidateAgainstSchema

* Remove nonessential test files

* Remove a misleading unit test

The TestReadSchema unit test was simply testing the ReadValues function,
which is already being validated in the TestReadValues unit test

* Update documentation to reflect changes to subchart schemas
2019-04-26 08:45:03 -07:00
Matthew Fisher
d3f0ac9343
ref(create): app version should be 0.1.0
When creating a Helm chart for the first time, the assumption should be that the app version is also 0.1.0, implying this is for a new application.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-04-15 12:06:16 -07:00
Adam Reese
e458a67f0c
ref(pkg/chart): add validation method to chart
Consolidate validation of Chart.yaml.

Signed-off-by: Adam Reese <adam@reese.io>
2019-04-05 13:40:06 -07:00
Adam Reese
31819e4796
fix(pkg/chartutil): marshal capabilities VersionSet into slice
Marshal capabilities VersionSet into readable value.

Signed-off-by: Adam Reese <adam@reese.io>
2019-03-29 08:49:15 -07:00
Adam Reese
87e789f01f
fix(pkg/chartutil): only include external objects in capabilities
Signed-off-by: Adam Reese <adam@reese.io>
2019-03-28 23:37:32 -07:00
Adam Reese
295092cd7d
ref(pkg/action): refactoring dup code and linter fixes
Signed-off-by: Adam Reese <adam@reese.io>
2019-03-26 11:11:27 -07:00
Adam Reese
895e9192d4
feat(*): use vanity import helm.sh/helm
Signed-off-by: Adam Reese <adam@reese.io>
2019-03-13 13:43:47 -07:00
Adam Reese
849f27d11f
ref(pkg/engine): make template specific functions private
Make template specific functions private to ensure they not misused and
make unit tests simpler.  We may export the template helpers later if
needed.

This lays the foundation for the new chart pipeline.

Signed-off-by: Adam Reese <adam@reese.io>
2019-03-06 15:45:52 -08:00
Martin Hickey
ef4d2a6e65 Update after review
Review comment:
- https://github.com/helm/helm/pull/5295#pullrequestreview-203519813

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-02-15 11:28:39 +00:00
Matthew Fisher
95c865513f
fix appveyor builds (#4934)
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-01-31 21:31:09 -08:00
Adam Reese
d94707db86
ref(*): remove helmVersion chart constraint
* Remove helmVersion constraint from charts
* Guard compile time set variables behind `internal/`
* Allow configuration of UserAgent for HTTPGetter

Signed-off-by: Adam Reese <adam@reese.io>
2019-01-08 13:37:55 -08:00
Matt Butcher
f3bfae5ea7
fix: fix a number of style errors (#5136)
This fixes a dozen or so style errors, almost all of which were just missing comments.

I left several which are fixed in other outstanding PRs, or which belong to code that is about to be removed.

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2019-01-07 21:40:24 -07:00
Adam Reese
2b81eea1e2
ref(*): replace byte array with map for Release config
Signed-off-by: Adam Reese <adam@reese.io>
2018-12-04 15:57:24 -08:00
Adam Reese
6fc8c9e079
ref(pkg/chartutil): simplify chart dependency unit tests
- simplify unit tests
- refactor typed errors
- unexport internal functions

Signed-off-by: Adam Reese <adam@reese.io>
2018-11-29 10:30:52 -08:00
Adam Reese
825b15c763
Merge pull request #4972 from adamreese/ref/chart-dependencies
ref(pkg/chart): rename Requirements to Dependencies
2018-11-28 10:55:08 -08:00
Adam Reese
85aef0d3d7
ref(pkg/chart): rename Requirements to Dependencies
Signed-off-by: Adam Reese <adam@reese.io>
2018-11-28 10:20:33 -08:00
roc
79f88dfc5e ref(url) update helm's github url (#4962)
https://github.com/kubernetes/helm -> https://github.com/helm/helm
https://github.com/kubernetes/charts -> https://github.com/helm/charts

Signed-off-by: Roc Chan <roc@imroc.io>
2018-11-28 10:08:38 -08:00
Adam Reese
9e1e26f01e
ref(pkg/chartutil): attempt to make requirements processing readable
Signed-off-by: Adam Reese <adam@reese.io>
2018-11-14 12:41:14 -08:00
Adam Reese
21259507bd
ref(*): rename requirements.lock to Chart.lock
Signed-off-by: Adam Reese <adam@reese.io>
2018-08-29 14:43:37 -07:00
Adam Reese
f7a7a157ce
ref(*): merge requirement.yaml into Chart.yaml
Signed-off-by: Adam Reese <adam@reese.io>
2018-08-29 14:05:37 -07:00
Adam Reese
516c53dae6
ref(chart): use map for chart.Values
Signed-off-by: Adam Reese <adam@reese.io>
2018-08-29 09:56:19 -07:00
Adam Reese
4f26b658d8
change copyright to "Copyright The Helm Authors" 2018-08-24 12:03:55 -07:00
Adam Reese
f012940d9c
ref(*): refactor chart/chartutil
ref(chartutil): move chart loading out of chartutil into new package
    add chart loader interface to allow lazy loading
feat(chart): create chart accessors
ref(*): cleanup requirements
ref(tiller): remove optional template engines
ref(tiller): simplify sorting releases and hooks
ref(*): code simplification
ref(hapi): move chart package out of hapi
ref(chart): add requirements and lock to Chart struct
2018-08-24 11:28:29 -07:00
Adam Reese
aa859e3f88
feat(*): remove Time, Namespace, and Revision from template functions
Removes Time, Namespace, and Revision from being exposed to templates to
make template rendering discrete and repeatable.
2018-05-18 12:09:54 -07:00
Adam Reese
b1128abf4f
ref(*): s/tiller/helm/ 2018-05-10 09:41:31 -07:00
Adam Reese
726e3c41be
feat(*): print stacktrace on error with debug enabled 2018-05-10 09:34:41 -07:00
Adam Reese
75c4df0b56
ref(tests): use golden files for testing command output 2018-05-09 08:37:20 -07:00
Adam Reese
36e034551f
ref(*): rebuild build version object 2018-05-02 15:26:26 -07:00
Adam Reese
29e772f631
ref(*): replace TillerVersion with HelmVersion 2018-04-20 00:37:34 -07:00
Adam Reese
4c95185164
ref(*): replace chart.config with []byte 2018-04-20 00:13:19 -07:00
Adam Reese
c5a76deba3
ref(*): use go conventions for naming types 2018-04-19 11:12:46 -07:00
Adam Reese
36536d77ba
ref(*): remove protobuf any type 2018-04-18 16:28:50 -07:00
Adam Reese
91a6ebfed5
ref(*): remove protobuf timestamps 2018-04-18 15:35:37 -07:00
Adam Reese
6345f04190
ref(hapi): convert protobuf to go types 2018-04-18 14:53:38 -07:00
Adam Reese
68c0b6a24a
ref(proto): remove unused protobufs 2018-04-17 10:17:42 -07:00
Matthew Fisher
6f02d9e412
Merge pull request #3837 from consideRatio/toYaml-pr
toYaml - Fix #3470 and #3410's trailing \n issues
2018-04-11 14:21:38 -07:00
Steffen Windoffer
8bd42d2645 remove unused servicePort from default ingress template 2018-04-06 11:21:54 +02:00
Erik Sundell
05a1f7f46c Updated tests for PR #3837 2018-04-06 00:59:22 +02:00
Erik Sundell
35132d141c toYaml - Fixes #3410 - trailing \n issue
`toYaml` utilized by `.Files` was introducing a new line. It is an issue since the new line is part of a functions output, it can't be whitespace chomped away so it would require a `trimSuffix "\n"` pipe. This commit trims one trailing `\n` from the toYaml output.
2018-04-06 00:40:43 +02:00
Zack Williams
1d3ae54185 Fix #3822 2018-04-03 13:10:56 -07:00
adshmh
1a55161a53 Fix several golint warnings (#3756)
* fix(helm): fix golint warning due to ApiVersionV1 constant name

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm): fix golint warning due to ResolveChartVersionAndGetRepo comment

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm): fix golint warnings on HttpGetter type and SetCredentials method missing a comment

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm):fix golint warning due to comment on FindChartInAuthRepoURL function

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm): fix golint warning due to RepoFile type name

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm): fix golint warning due to ParseString comment

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2018-03-27 13:06:04 -07:00
Matthew Fisher
b5af54d44c
Merge pull request #3567 from jumal/master
Create missing directories when saving files in chartutil.SaveDir
2018-02-28 12:59:43 -08:00
Matthew Fisher
86ae040bfa
Merge pull request #3491 from oilbeater/fix-defer-in-loop
defer in loop may cause resource leak
2018-02-27 19:52:00 +00:00