Commit graph

55 commits

Author SHA1 Message Date
Sidharth Surana
31d41d3fd1 Add unit test for this specific case of loading from V1 archive
Added a tgz "frobnitz.v1.tgz" of the testdata folder frobnitz.v1
Verified that without the fix the unit test fails and re-produces
the issue.

Signed-off-by: Sidharth Surana <ssurana@vmware.com>
2019-10-16 11:36:53 -07:00
Sidharth Surana
8f833fed25 Fix the ordering of the APIVersion check to avoid nil pointer
Signed-off-by: Sidharth Surana <ssurana@vmware.com>
2019-10-15 22:43:33 -07:00
Martin Hickey
1cc2ad0061
Port #5298 to Helm v3 (#6613)
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-10-11 16:19:26 +01:00
Taylor Thomas
3637996dcd fix(chart): Ports security fix for invalid paths in tarballs
This is a port of #5165 and the small refactor in #5610. This is the issue
where carefully crafted paths can reach outside of the intended chart directory

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-08 10:13:43 -06: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
fba311ba23
Merge pull request #6243 from technosophos/feat/5871-crds-directory
feat: Add support for a crds/ directory
2019-08-20 11:38:28 -04:00
Adam Reese
b2d5e41fc7
ref(*): remove dead code
Signed-off-by: Adam Reese <adam@reese.io>
2019-08-19 10:22:27 -07:00
Matt Butcher
98426d6ad3
feat: Add support for a crds/ directory
Closes #5871

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2019-08-16 16:26:55 -06: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
Taylor Thomas
a749cf4c4e docs(chart): updates APIVersionV2 comment to reflect the proper name
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-08-06 11:14:51 -06:00
Martin Hickey
8f8b2c10e5 Remove the chart lock file as its v1 structure
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-08-02 16:01:23 +01:00
Martin Hickey
4d47052395 Update linting and checking for apiVersion v1/v2
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-08-02 15:52:14 +01: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
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
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
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
634fcfb7ef
feat(pkg/chart): support deprecated requirements.yaml
Signed-off-by: Adam Reese <adam@reese.io>
2019-05-15 13:23:26 -07:00
Matthew Fisher
5367c6c296
fix(loader): assume apiVersion is v1 when loading charts
In Helm 2, no chart validation was performed on v1 charts, so there are
a few charts out there that never added an apiVersion to the Chart.yaml.
To ensure those charts continue to work for Helm 3, we should assume
that charts loaded without an apiVersion set should be assumed as v1.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-05-14 11:00:20 -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
Martin Hickey
1915358a21
Merge pull request #5538 from hickeyma/add-app-version
feat(*): Add app version to history table
2019-04-30 09:23:21 +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
Martin Hickey
b600f6090e Add app version to history table
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-04-23 17:02:01 +01: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
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
Martin Hickey
abdaf3ce1b Add chart type
The chart type is added to differentiaite between an application chart
and a library chart. Library charts can be used as dependencies but are
not installable.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-02-15 09:10:41 +00:00
Adam Reese
28d8c7b277
ref(*): remove references to chart 'engine'
Signed-off-by: Adam Reese <adam@reese.io>
2019-02-04 16:08:14 -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
85aef0d3d7
ref(pkg/chart): rename Requirements to Dependencies
Signed-off-by: Adam Reese <adam@reese.io>
2018-11-28 10:20:33 -08:00
Adam Reese
f5b6ff2832
ref(pkg/chart): rename files to be consistent with types
Signed-off-by: Adam Reese <adam@reese.io>
2018-11-14 11:05: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
Matt Butcher
4a6c1e308b fix(pkg/chart): remove pkg/chart
This is the final step in replacing pkg/chart with pkg/chartutil.

This also removes the last of the TOML code.
2016-06-16 13:46:20 -06:00
Matt Butcher
88622a20da fix(helm): read values.yaml instead of values.toml
Closes #822
2016-06-14 12:06:19 -06:00
Adam Reese
a19875adcc fix(style): cleanup coding style on error returns 2016-05-25 00:02:52 -07:00
Matt Butcher
ec9b086ac8 fix(chart): change source to sources in chart file
As a carryover from the days when we only allowed one source, the source
field was still labeled 'source' instead of 'sources'. Fixed and updated
all of the tests.
2016-05-20 11:35:58 -06:00
vaikas-google
7edce9b82b Validate Chart.yaml version for semver, validate that values.toml parses if present 2016-05-11 15:32:42 -07:00
Matt Butcher
75a1aa648e fix(*): correct numerous golint errors 2016-05-10 13:30:18 -06:00
vaikas-google
9b4d2616c2 Add ability to untar charts after downloading them 2016-05-06 09:47:54 -07:00
Brian
c349bfbffd feat(chart2proto): chart to proto transformations for helm grpc client 2016-05-02 14:19:42 -06:00
Matt Butcher
f098cb6fb6 fix(*): rewrite import paths 2016-04-27 21:50:15 -06:00
Brian
104126d2d2 Merge pull request #53 from fibonacci1729/feat/tiller-client
feat(tiller): add initial tiller client for basic helm installs.
2016-04-22 15:45:00 -06:00
Brian
7bc50a5d79 feat(tiller): add initial tiller client for basic helm installs.
1. install command loads chart archive.
  2. invokes helm api to transform the pkg/chart.Chart type
     to it's proto model.
  3. the client then establishes a connection to tiller.
  4. sends InstallReleaseRequest, receives InstallReleaseResponse.

todo (for complete install):
  - walk pkg/chart.{Values,Deps,Templates} types and populate proto
    definitions for various apis/messages.
2016-04-22 10:15:20 -06:00
Matt Butcher
c4b2926ce6 fix(*): fix misc style issues 2016-04-21 10:14:11 -06:00
Matt Butcher
d3830753b4 Merge pull request #25 from technosophos/feat/toml-parser
feat(chart): add values parser
2016-04-18 12:37:38 -06:00