Commit graph

402 commits

Author SHA1 Message Date
Matt Farina
03911aeab7
Merge pull request #12036 from mattfarina/bump-version-3.12 2023-06-27 22:27:56 -04:00
Dmitry Kamenskikh
b4a4c7a9d4 update autoscaling/v2beta1 to autoscaling/v2 in skeleton chart
Signed-off-by: Dmitry Kamenskikh <kupnu4x@gmail.com>
2023-05-05 13:59:11 +08:00
Matt Farina
1800554452
bump version to v3.12.0
(cherry picked from commit 54a0fac9b5e243d9922dbfb412bff17eb161e361)
Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-05-01 14:08:09 -04:00
wujunwei
878e962b23 fix: failed testcase on windows
Signed-off-by: wujunwei <wjw3323@live.com>
2023-03-29 10:27:44 +08:00
Matt Farina
4e7e939f19
Updating the Go version in go.mod
At this time both Go 1.19 and 1.20 are supported. The version
specified in the go.mod file is the minimum version we expect Helm
to be compiled against. This is the oldest supported version to
support environments where others compile Helm. The Helm project
is using Go 1.20 to build Helm itself.

Updating to Go 1.19 also includes dealing with io/ioutil
deprecation and some additional linting issues around staticcheck.
All the staticcheck issues were in test files so linting was
skipped for those.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-22 11:52:30 -04:00
Matt Farina
50c22ed7f9
Bump the Go version
Needed to gofmt source to meet changes in style

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-22 11:29:26 -04:00
Matt Farina
6facbada26
bump version to v3.11.0
Signed-off-by: Matt Farina <matt.farina@suse.com>
(cherry picked from commit 9d8fee155b)
2023-01-09 21:23:22 -05:00
Martin Hickey
bafafa8bb1
Merge pull request from GHSA-67fx-wx78-jx33
Update schema validation handling
2022-12-14 13:54:39 +00:00
Peter Leong
9d027eaac8
Readiness & liveness probes correct port
Port number now comes from values.yaml

Signed-off-by: Peter Leong <1179301+p33t@users.noreply.github.com>
2022-10-21 12:52:30 -07:00
Martin Hickey
775af2a0ce Update schema validation handling
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2022-10-21 18:04:05 +01:00
Matt Farina
cd809f9b19
bump version to v3.10.0
Signed-off-by: Matt Farina <matt.farina@suse.com>
(cherry picked from commit ce66412a72)
2022-09-12 15:29:41 -04:00
yxxhero
39b0a82365 bump Go 1.18
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-07-03 10:19:15 +08:00
Matt Farina
1db28a2311
bump version to v3.9.0
Signed-off-by: Matt Farina <matt.farina@suse.com>
(cherry picked from commit 7ceeda6c58)
2022-05-09 15:20:33 -04:00
Matt Farina
3fdb7cac01
Merge pull request #10110 from zegerius/main
Fix value precedence
2022-04-12 11:08:33 -04:00
Eng Zer Jun
2e3e22a003
test: use T.TempDir to create temporary test directory
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-02-12 13:54:54 +08:00
Martin Hickey
f0fd37d2c5 Replace golint with revive
golint which is used as one of the sublinters in golangci-lint is deprecated.
It is replaced with revive which is a drop-in replacement.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>

Co-authored-by: Martin Mulholland <mmulholl@redhat.com>
2022-01-20 15:19:40 +00:00
Matt Farina
0c8320b685
bump version to v3.8.0
Signed-off-by: Matt Farina <matt.farina@suse.com>
(cherry picked from commit d493f29c32)
2022-01-13 10:09:43 -05:00
mengjiao.liu
160da867d0 validate release name during install
Signed-off-by: mengjiao.liu <mengjiao.liu@daocloud.io>
2021-12-29 14:45:05 +08:00
Matt Farina
7838fb769d
Fix specifying of Kubernetes version from build scripts
This bug came about because of three issues that this change
corrects:
- The CI scripts run on a pull request did not test building
  Helm. This means that a failure to set a variable using LDFLAGS
  had no opportunity to be caught.
- #8608 provided a means to match the k8s version used in linting
  and chartutil with the version of the package we pull in. With
  one problem. It attempts to set a const as if it were a string.
  This is ignored and everyone missed it.
- #10325 moved those constants to vars so it could be set. This
  looked good and passed tests but missed that you can't set an
  int as if it were a string. See first bullet.

This change fixes this by moved the internal representation to
be a string. These are internal variables not exposed in the public
API which makes this change non-breaking to the API.

Closes #10367

Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-11-18 11:48:02 -05:00
Sverre Boschman
81a373ead5 allow ldflags to overwrite k8s version
Signed-off-by: Sverre Boschman <1142569+sboschman@users.noreply.github.com>
2021-11-09 14:18:07 +01:00
Aram Zegerius
752aa6d462 Simplify testdata charts
Signed-off-by: Aram Zegerius <aram@zegeri.us>
Signed-off-by: Ankita Bhopatkar <ankitabhopatkar13@gmail.com>
2021-09-14 10:34:35 +02:00
Aram Zegerius
3fd4a11b18 Simplify testdata charts
Signed-off-by: Aram Zegerius <aram@zegeri.us>
Signed-off-by: Ankita Bhopatkar <ankitabhopatkar13@gmail.com>
2021-09-14 10:27:50 +02:00
Damien Nozay
65ec3d6fd6 Make validation errors easier to fix
Problem: the warnings don't give enough details about which
values are problematic, only the name of the leaf key. This is
all the more annoying when you have a chart depending on other charts.

```
mainchart
 |
 +- subchart1
 +- subchart2
 +- subchart3
```

Here are some warnings I get before the change:
```
coalesce.go:199: warning: destination for credentials is a table. Ignoring non-table value
coalesce.go:160: warning: skipped value for resources: Not a table.
coalesce.go:160: warning: skipped value for googleSheetsServiceAccount: Not a table.
coalesce.go:199: warning: destination for googleSheetsServiceAccount is a table. Ignoring non-table value
coalesce.go:199: warning: destination for resources is a table. Ignoring non-table value []
coalesce.go:199: warning: destination for credentials is a table. Ignoring non-table value
coalesce.go:199: warning: destination for credentials is a table. Ignoring non-table value
coalesce.go:160: warning: skipped value for resources: Not a table.
coalesce.go:160: warning: skipped value for googleSheetsServiceAccount: Not a table.
```

with fix:
```
coalesce.go:162: warning: skipped value for subchart1.resources: Not a table.
coalesce.go:162: warning: skipped value for subchart2.googleSheetsServiceAccount: Not a table.
coalesce.go:211: warning: destination for subchart3.aws.credentials is a table. Ignoring non-table value ()
coalesce.go:211: warning: destination for mainchart.subchart3.aws.credentials is a table. Ignoring non-table value ()
coalesce.go:211: warning: destination for mainchart.subchart2.googleSheetsServiceAccount is a table. Ignoring non-table value ()
coalesce.go:211: warning: destination for mainchart.subchart1.resources is a table. Ignoring non-table value ([])
coalesce.go:162: warning: skipped value for subchart1.resources: Not a table.
coalesce.go:162: warning: skipped value for subchart2.googleSheetsServiceAccount: Not a table.
coalesce.go:211: warning: destination for subchart3.aws.credentials is a table. Ignoring non-table value ()
```

Signed-off-by: Damien Nozay <damiennozay+github@gmail.com>

add tests

Signed-off-by: Damien Nozay <damiennozay+github@gmail.com>
2021-09-14 10:07:26 +02:00
Aram Zegerius
4b49f356a9 Add tests for multi-level dependencies.
Closes #9940

Signed-off-by: Aram Zegerius <aram@zegeri.us>
Signed-off-by: Ankita Bhopatkar <ankitabhopatkar13@gmail.com>
2021-09-10 15:49:05 +02:00
Damien Nozay
9fa373e8be Make validation errors easier to fix
Problem: the warnings don't give enough details about which
values are problematic, only the name of the leaf key. This is
all the more annoying when you have a chart depending on other charts.

```
mainchart
 |
 +- subchart1
 +- subchart2
 +- subchart3
```

Here are some warnings I get before the change:
```
coalesce.go:199: warning: destination for credentials is a table. Ignoring non-table value
coalesce.go:160: warning: skipped value for resources: Not a table.
coalesce.go:160: warning: skipped value for googleSheetsServiceAccount: Not a table.
coalesce.go:199: warning: destination for googleSheetsServiceAccount is a table. Ignoring non-table value
coalesce.go:199: warning: destination for resources is a table. Ignoring non-table value []
coalesce.go:199: warning: destination for credentials is a table. Ignoring non-table value
coalesce.go:199: warning: destination for credentials is a table. Ignoring non-table value
coalesce.go:160: warning: skipped value for resources: Not a table.
coalesce.go:160: warning: skipped value for googleSheetsServiceAccount: Not a table.
```

with fix:
```
coalesce.go:162: warning: skipped value for subchart1.resources: Not a table.
coalesce.go:162: warning: skipped value for subchart2.googleSheetsServiceAccount: Not a table.
coalesce.go:211: warning: destination for subchart3.aws.credentials is a table. Ignoring non-table value ()
coalesce.go:211: warning: destination for mainchart.subchart3.aws.credentials is a table. Ignoring non-table value ()
coalesce.go:211: warning: destination for mainchart.subchart2.googleSheetsServiceAccount is a table. Ignoring non-table value ()
coalesce.go:211: warning: destination for mainchart.subchart1.resources is a table. Ignoring non-table value ([])
coalesce.go:162: warning: skipped value for subchart1.resources: Not a table.
coalesce.go:162: warning: skipped value for subchart2.googleSheetsServiceAccount: Not a table.
coalesce.go:211: warning: destination for subchart3.aws.credentials is a table. Ignoring non-table value ()
```

Signed-off-by: Damien Nozay <damiennozay+github@gmail.com>

add tests

Signed-off-by: Damien Nozay <damiennozay+github@gmail.com>
2021-09-09 11:47:00 -07:00
Aram Zegerius
c4952c9c8c
Fix value precedence
Fix value precedence when importing values from child. Closes https://github.com/helm/helm/issues/9940

Signed-off-by: Aram Zegerius <aram@zegeri.us>
2021-09-07 17:25:34 +02:00
Matt Farina
e6a92c4b62
bump version to 3.7
Signed-off-by: Matt Farina <matt.farina@suse.com>
(cherry picked from commit 7048ef6b30aa23abdcfcaf523cb4c42dff85add9)
2021-08-30 22:06:54 -04:00
Bernd Gutjahr
5cf9735a9d improved coalesce readability by getting rid of continue statements
Signed-off-by: Bernd Gutjahr <bernd.gutjahr@microfocus.com>
2021-08-26 06:34:37 +02:00
Bernd Gutjahr
1740e7f89b enhanced coelesce_test with some more test cases
Signed-off-by: Bernd Gutjahr <bernd.gutjahr@microfocus.com>
2021-08-26 06:34:37 +02:00
Giacomo Margaria
3b68afc1c8 Fix coalesce globals to prevent subchart globals to leak upstream
Signed-off-by: Giacomo Margaria <giacomo.margaria@gmail.com>
2021-05-31 00:19:19 +02:00
Matt Farina
3415b6e7b8
bump version to v3.6.0
Signed-off-by: Matt Farina <matt@mattfarina.com>
(cherry picked from commit af0feeddd91c729aa97327f33c9e3e3109b13561)
2021-05-18 11:05:59 -04:00
Matt Farina
d4cc130fa9
Merge pull request #9621 from sagikazarmark/ingress-v1
Ingress v1 template
2021-05-17 15:33:41 -07:00
Mark Sagi-Kazar
6d9e15bd1a
feat: add networking.k8s.io/v1 support to ingress template
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-04-25 12:22:57 +02:00
Thomas Dy
0156ca61ca Fix capabilities changes leaking into other tests
Signed-off-by: Thomas Dy <thatsmydoing@gmail.com>
2021-04-07 17:27:53 +09:00
Thomas Dy
538670fda6 Add tests for template --kube-version
Signed-off-by: Thomas Dy <thatsmydoing@gmail.com>
2021-04-07 17:27:53 +09:00
Thomas Dy
47c8f48f20 feat(helm): Support setting --kube-version
Signed-off-by: Thomas Dy <thatsmydoing@gmail.com>
2021-04-07 17:27:53 +09:00
Adam Reese
213a7df2dc
Merge pull request #9416 from croomes/resource-name-validation
Add name validation rules for different object kinds
2021-03-26 10:25:49 -07:00
Simon Croome
c50372a8c1
Add/update deprecation notices
Signed-off-by: Simon Croome <simon.croome@storageos.com>
2021-03-22 16:43:10 +00:00
Josh Soref
2bf8fdf45d
chore: Spelling (#9410)
* spelling: annotate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: asserts

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: behavior

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: binary

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: contain

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: copied

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dependency

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: depending

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: deprecated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: doesn't

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: donot

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: github

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: inputting

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: iteration

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: jabberwocky

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: kubernetes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: length

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: mismatch

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: multiple

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: nonexistent

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: outputs

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: panicking

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: plugins

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: parsing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: porthos

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: regular

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: resource

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: repositories

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: something

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: strict

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: string

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unknown

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-03-15 21:11:57 -04:00
Adam Reese
6ce9ba60b7
Merge pull request from GHSA-c38g-469g-cmgx
fix(*): Validate metadata semver and printable characters
2021-02-04 12:57:08 -08:00
Adam Reese
657ce552cb
fix(*): Validate metadata semver and printable characters
ref: https://github.com/helm/helm/security/advisories/GHSA-c38g-469g-cmgx

* Skip invalid chart versions when reading the repository index file or
  when programmatically adding a chart version.
* Adds semver validation and strips non-printable characters and
  normalizes spaces for string fields in Metadata.Validate()
* Fixes a unit test that was pulling a remote repo.  Now uses a local
  repo.
* Fixes ignored error in repo update command

Signed-off-by: Adam Reese <adam@reese.io>
2021-02-04 12:52:24 -08:00
Nick Jones
042567808f
Update default ingress values section to correspond with template
This commit updates the default section in values.yaml for the example
ingress definition to correspond with the template.

Signed-off-by: Nick Jones <nick@dischord.org>
2021-01-13 22:58:08 +00:00
Matt Farina
8082f6db45 bump version to
Signed-off-by: Matt Farina <matt@mattfarina.com>
(cherry picked from commit f546ebb1ac)
2021-01-05 21:37:16 -05:00
Joe Julian
fdcd22ef58
Reduce linting severity for users of out-of-date kubernetes (#8608)
* Reduce linting severity for users of out-of-date kubernetes

Fixes #8596

Signed-off-by: Joe Julian <me@joejulian.name>

* add more verbose deprecation info

Signed-off-by: Joe Julian <me@joejulian.name>

* use new upstream deprecations

Signed-off-by: Joe Julian <me@joejulian.name>

* do not error for custom resources

Signed-off-by: Joe Julian <me@joejulian.name>

* Define deprecation version in lint rules by LDFLAG

Signed-off-by: Joe Julian <me@joejulian.name>

* make comment clearer

Signed-off-by: Joe Julian <me@joejulian.name>

* Extend the k8s version discovery and constants to chartutil

Signed-off-by: Joe Julian <me@joejulian.name>

* remove awk dependency

Signed-off-by: Joe Julian <me@joejulian.name>

* align k8s version constant names between capabilities.go and deprecations.go

Signed-off-by: Joe Julian <me@joejulian.name>

* show the error if the unexpected happens

Signed-off-by: Joe Julian <me@joejulian.name>

* bump k8sVersionMinor and golden chart templates for k8s 1.20

Signed-off-by: Joe Julian <me@joejulian.name>

* bump for tests to match 1.20.1

Signed-off-by: Joe Julian <me@joejulian.name>
2021-01-05 16:05:33 -07:00
Marc Khouzam
bed1a42a39 fix(pkg/chartutil): Remove warning for nils
Nil tables should not be reported as non-tables.

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
2020-12-16 15:54:29 -05:00
Matthew Fisher
f228a7c36c
Merge pull request #9057 from ssalaues/fix/ingress-templating-error
fix: ingress path issue
2020-12-02 08:35:56 -08:00
rimas
ce1a46899f Fixes #9083
Signed-off-by: rimas <rmocius@gmail.com>
2020-12-01 18:50:14 +02:00
Salim Salaues
50144aad03 fix: ingress path issue
Signed-off-by: Salim Salaues <salim@openinvest.co>
2020-11-24 00:20:47 -08:00
Martin Hickey
6696a9fa5f
Merge pull request #8970 from zerefwayne/patch-8965
Add remaining tests in TestDependentChartAliases
2020-11-06 13:15:55 +00:00
Aayush Joglekar
babc8c9a70 Add remaining tests in TestDependentChartAliases
Signed-off-by: Aayush Joglekar <aayushjog@gmail.com>
2020-11-03 01:50:59 +05:30