Commit graph

268 commits

Author SHA1 Message Date
wxdao
c00890cae1 Fix Save misbehavior on nonexistent directory (#6360)
Signed-off-by: wxdao <waxiadao@gmail.com>
2019-10-08 14:23:14 +01:00
Martin Hickey
335d27a976
Fix ingress API group in scaffold chart (#6591)
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-10-07 15:46:02 +01:00
Matthew Fisher
9510713d21
fix(chartutil): port over enhancements to helm create from Helm 2
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-10-03 12:34:58 -07:00
Matt Farina
9bc7934f35
Updating the module for v3 as the major version
Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-10-03 14:27:05 -04:00
Matt Farina
967f4fed42
Update dependencies
* Kubernetes updated to 1.16.1
* SemVer and Sprig updated to latest releases that leverage go
  modules
* Tests and checks updated. These already landed in v2 via PR 6457

Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-10-03 13:49:07 -04:00
Taylor Thomas
319045d351
Merge pull request #6547 from SimonAlling/processDependencyConditions
ref(pkg/chartutil): Simplify processDependencyConditions
2019-10-02 14:26:10 -06:00
Simon Alling
43bb10cd24 ref(pkg/chartutil): Dry up file and path names (#6554)
Signed-off-by: Simon Alling <alling.simon@gmail.com>
2019-10-02 09:36:14 +01:00
Simon Alling
a40debd42b ref(pkg/chartutil): Simplify processDependencyConditions
Before this commit, `r.Enabled` was modified if and only if a boolean
was found in the for loop, and in that case, it was assigned the value
of said boolean, just in a more complicated way.

Signed-off-by: Simon Alling <alling.simon@gmail.com>
2019-10-01 18:38:38 +02:00
Matthew Fisher
37f7cc0851
Merge pull request #4917 from derkoe/dev-v3-fix-requirement-condition
fix(pkg/chartutil): conditions for alias and umrella charts (#3734)
2019-09-30 14:50:19 -07:00
Martin Hickey
db15a6f898
Create charts directory for scaffold chart (#6516)
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-09-30 16:37:34 +01:00
Taylor Thomas
d95a6246a4
Merge pull request #6430 from karuppiah7890/fix-install-storing-computed-values
fix install storing computed values in release instead of user supplied values
2019-09-23 11:49:03 -06:00
Cindy O'Neill
41e9359716 handle ingress apiVersion change for kubernete versions
Signed-off-by: Cindy O'Neill <cubiedoo2@gmail.com>
2019-09-18 11:11:34 -06:00
Reinhard Nägele
38e41e12c9 ref(*): Improve and fix scaffold chart and API versions (#6426)
* Use `apps/v1` for Deployment
* Reformat comments
* Consistently use `nindent` and indent properly
* Introduce named template for selector labels
* Fix label selector in `NOTES.txt`

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>
2019-09-18 12:24:03 +01:00
Karuppiah Natarajan
25324ca8db
fix install storing computed values in release instead of user supplied values
Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>
2019-09-14 20:34:48 +05:30
Adam Reese
1779ad5302
ref(cmd/helm): remove init command
Signed-off-by: Adam Reese <adam@reese.io>
2019-08-26 10:21:52 -07:00
Adam Reese
b6fdd8783b
feat(cmd/helm): remove need for helm init command
* allow repository config via cli
* make `helm repo add` create repo config file if it does not exist
* squash a ton of bugs

Signed-off-by: Adam Reese <adam@reese.io>
2019-08-22 23:31:50 -07:00
Matthew Fisher
d99edbfb3e
fix(chartutil): remove executable bits from chartutil generated files
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-08-13 16:31:08 -07:00
Taylor Thomas
c9c95ea148 ref(*): Moves packages to internal
These packages are generally used only for logic inside of Helm and
can later be re-exported as needed

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-08-09 16:02:33 -06:00
Josh Dolitsky
cc5dece910
fix(chartutil): Ensure nested template dir on save (#6177)
If a templates/ dir of a chart contained a subdirectory,
for example "templates/tests/test-db.yaml", an error was
being thrown on export due to missing the "templates/test"
directory prior to saving the template file itself.

Fixes #5757

Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
2019-08-08 11:32:03 -05:00
Martin Hickey
149da7c77e Update scaffold chart to v2 apiVersion
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-07-29 19:02:59 +01:00
Martin Hickey
7ddd3f482e
Merge pull request #6038 from liuliqiang/dev-v3
Fix paths in the ingress template and values file written by helm create
2019-07-23 14:44:37 +01:00
Liu Liqiang
49120340d3 Fix paths in the ingress template and values file written by helm create
Signed-off-by: Liu Liqiang <liuliqiang@smartx.com>
2019-07-23 17:25:47 +08:00
Matthew Fisher
4f6d002d6c
chore(docs): move docs to helm-www
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-07-22 12:15:35 -07:00
Oleg Sidorov
f94bac0643 chartutil.ReadValues is forced to unmarshal numbers into json.Number refs #1707 [dev-v3]
Backport of https://github.com/helm/helm/pull/6010 to dev-v3 (the
description below is a copy-paste from the original v2 branch PR).
As https://github.com/helm/helm/pull/6016 is now merged to dev-v3, the
change is reasonably trivial.

This change is an attempt to address the common problem of json number
unmarshalling where any number is converted into a float64 and
represented in a scientific notation on a marshall call. This behavior
breaks things like: chart versions and image tags if not converted to
yaml strings explicitly.

An example of this behavior: k8s failure to fetch an image tagged with a
big number like: $IMAGE:20190612073634 after a few steps of yaml
re-rendering turns into: $IMAGE:2.0190612073634e+13.

Example issue: #1707

This commit forces yaml parser to use JSON modifiers and explicitly
enables interface{} unmarshalling instead of float64. The change
introduced might be breaking so should be processed with an extra care.

Due to the fact helm mostly dals with human-produced data (charts), we
have a decent level of confidence this change looses no functionality
helm users rely upon (the scientific notation).

Relevant doc: https://golang.org/pkg/encoding/json/#Decoder.UseNumber

Signed-off-by: Oleg Sidorov <oleg.sidorov@booking.com>
Signed-off-by: Oleg Sidorov <me@whitebox.io>
2019-07-17 10:30:51 +02:00
Oleg Sidorov
ec440d446d Replaced ghodss/yaml with sigs.k8s.io/yaml
This commit replaces usage of github.com/ghodss/yaml with it's forked
version maintained by SIG community. The replaced library has
low-to-none support activity unlike the latter. We believe the new
Helm branch could benefit from using the community-supported version on
a long-term run as yaml parser is a key component of Helm chart rendering
engine.

This commit locks sigs.k8s.io/yaml dependency version on 1.1.0 which
is backwards compatible with ghodss/yaml 1.0.0.

This change also resolves the outdated dependency version lock for
ghodss/yaml (currently 1.0.0) and makes it possible to port changes from
https://github.com/helm/helm/pull/6010 to dev-v3.

Signed-off-by: Oleg Sidorov <oleg.sidorov@booking.com>
2019-07-12 16:52:15 +02:00
Matt Farina
379b2b177c
Updating to the new Ingress group version
Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-06-17 12:10:34 -04:00
Adam Reese
b49db9e6e6
ref(pkg/chartutil): break up chartutil into logical files
Signed-off-by: Adam Reese <adam@reese.io>
2019-05-22 19:38:11 +02:00
Adam Reese
45f63628e1
ref(pkg/chart): remove unused chart.RawValues
Signed-off-by: Adam Reese <adam@reese.io>
2019-05-16 11:03:21 -07:00
Adam Reese
590bf10ab5
fix(pkg/action): add namespace to release options
ref: https://github.com/helm/helm/issues/5732

Signed-off-by: Adam Reese <adam@reese.io>
2019-05-15 14:08:51 -07:00
Matthew Fisher
757eb88d6c
Merge pull request #5441 from hickeyma/update-lib-charts
feat(*): Add capability for application charts to be used as library charts
2019-05-14 13:58:44 -07:00
Adam Reese
b7a14de590
Merge pull request #5601 from adamreese/v3/capabilities
ref(pkg/chartutil): remove k8s version object dependency
2019-05-09 14:29:34 -07:00
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
Adam Reese
097834de0a
ref(pkg/chartutil): remove k8s version object dependency
Flattens the `.Capabilities` built-in and removes useless kubernetes
runtime metadata.

Signed-off-by: Adam Reese <adam@reese.io>
2019-05-07 13:49:05 -07: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
0b809dd078 Validate library chart files after chart loaded
Validate the library chart files after the chart and
its depoendencies have been loaded. This is an update
following review comment:
- https://github.com/helm/helm/pull/5441#pullrequestreview-231339425

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-05-01 14:56:32 +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