Commit graph

1835 commits

Author SHA1 Message Date
Matt Farina
96e33e2773
Tweaking new dry-run internal handling
There are a few changes to the new dry-run handling:

1. Some documentation is added to help clarify what is happening
   and what is expected.
2. DryRun is never changed by internal handling. If an API user
   sets the property it is not changed by our code.
3. The behavior on contacting the server with false/none is made
   consistent between install and upgrade.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-07-20 14:26:46 -04:00
Matt Farina
838b12191e
Merge pull request #9426 from tapaskapadia/feat/lookup-dryrun
feat(helm): add ability for --dry-run to do lookup functions
2023-07-20 13:30:52 -04:00
Joe Julian
14d363669f
Merge pull request #11529 from wujunwei/fix-update-dependency-panic
bugfix: SIGSEGV with OCI chart reference using helm template
2023-07-12 18:00:41 -07:00
Matt Farina
03911aeab7
Merge pull request #12036 from mattfarina/bump-version-3.12 2023-06-27 22:27:56 -04:00
wujunwei
c87f846d88 add GetRegistryClient method
Signed-off-by: wujunwei <wjw3323@live.com>
2023-06-15 11:49:23 +08:00
Joe Julian
ad1fd058ad
Merge pull request #10602 from hown3d/lowercase-search
fix(search): print repo search result in original case
2023-05-26 08:32:49 -07:00
Joe Julian
d7805e68ae
Merge pull request #11455 from ksankeerth/dev-11451
Strict file permissions for repository.yaml
2023-05-25 11:25:19 -07:00
Joe Julian
49805f09b5
Merge branch 'main' into lowercase-search
Signed-off-by: Joe Julian <me@joejulian.name>
2023-05-10 16:41:11 -07:00
Joe Julian
126e4f4af8
tests: change crd golden file to match after #11870
Signed-off-by: Joe Julian <me@joejulian.name>
2023-05-09 16:04:32 -07: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
Tapas Kapadia
b7a2d47eca feat(helm): add ability for --dry-run to do lookup functions
When a helm command is run with the --dry-run flag, it will try to connect to the cluster
to be able to render lookup functions.
Closes #8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-05-01 00:04:04 -05:00
Matt Farina
9705369da6
Merge pull request #11973 from joejulian/quiet_lint
fail quiet linting when an error occurs
2023-04-28 14:53:04 -04:00
Matt Farina
0833318b32
Merge pull request #9182 from pscheid92/4030-provide-literal-alternative-for-set-flag
Provide an alternative for --set and/or --set-string to take a value literally
2023-04-28 14:39:41 -04:00
Matt Farina
3b74c13768
Merge pull request #11479 from MichaelMorrisEst/cascade
Add option to support foreground cascade deletion
2023-04-27 15:43:14 -04:00
Joe Julian
f13fa07793
create failing test for quietly linting a chart that doesn't exist
Signed-off-by: Joe Julian <me@joejulian.name>
2023-04-10 09:22:24 -07:00
Tapas Kapadia
4b7248e361 feat(helm): add ability for --dry-run to do lookup functions
When a helm command is run with the --dry-run flag, it will try to connect to the cluster
if the value is 'server' to be able to render lookup functions.
Closes helm#8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-04-08 18:43:01 -05: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
Tapas Kapadia
4899e8a788 feat(helm): add ability for --dry-run to do lookup functions
When a helm command is run with the --dry-run flag, it will try to connect to the cluster
if the value is 'server' to be able to render lookup functions.
Closes helm#8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-03-10 02:45:30 -06:00
Soule BA
11738dde51
Provide a helper to set the registryClient in cmd
If enabled the registryClient is set using a helper that accepts the TLS
flags. This keeps the client creation consistent accross the different
commands.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2023-03-03 07:33:17 -06:00
Andrew Block
154f37efec
Added insecure option to login subcommand
Signed-off-by: Andrew Block <andy.block@gmail.com>
2023-03-03 07:33:17 -06:00
Andrew Block
08593c8dd6
Added support for insecure OCI registries
Signed-off-by: Andrew Block <andy.block@gmail.com>
2023-03-03 07:33:17 -06:00
Soule BA
b0ecb21056
Enable custom certificates option for OCI
If implemented, users will be able to use custom certificates and CA to
while interacting with OCI registries.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2023-03-03 07:33:17 -06:00
Matt Farina
5abcf74227
Merge pull request from GHSA-pwcw-6f5g-gxf8
Update to func handling
2023-02-08 11:34:57 -05:00
Matt Farina
863bc74e5a
Update to func handling
Signed-off-by: Matt Farina <matt@mattfarina.com>
2023-02-03 15:36:32 -05:00
MichaelMorris
830d4a9ee9 Add option to support cascade deletion options
Add --cascade=<background|foreground|orphan> option to helm uninstall
Current behaviour is hardcoded to background

Addresses issue: https://github.com/helm/helm/issues/10586

Signed-off-by: MichaelMorris <michael.morris@est.tech>
2023-02-02 11:22:32 +00:00
Matt Farina
5bf273d81b
Merge pull request #11487 from yxxhero/fix_template_with_output_dir
fix template --output-dir issue
2023-02-01 13:19:13 -05:00
Tapas Kapadia
f9e54b6079 feat(helm): add ability for --dry-run to do lookup functions
When a helm command is run with the --dry-run flag, it will try to connect to the cluster
if the value is 'server' to be able to render lookup functions.
Closes #8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-01-30 17:04:10 -06:00
Tapas Kapadia
9a0025f963 feat(helm): add ability for --dry-run to do lookup functions
When a helm command is run with the --dry-run flag, it will try to connect to the cluster
if the value is 'server' to be able to render lookup functions.
Closes #8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-01-23 14:28:29 -06:00
Tapas Kapadia
5ec7913fd4 feat(helm): add ability for a dry-run to evaluate lookup functions
When a helm command is run with the --dry-run-option=server flag, it will try to connect to the cluster
to be able to render lookup functions.
Closes #8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-01-23 13:38:41 -06:00
Tapas Kapadia
ddb33580db feat(helm): add ability for a dry-run to evaluate lookup functions
When a helm command is run with the --dry-run-option=server flag, it will try to connect to the cluster
to be able to render lookup functions.
Closes #8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-01-23 13:18:59 -06:00
Tapas Kapadia
fc16ea7d44 feat(helm): add ability for --dry-run to do lookup functions
When a helm command is run with the --dry-run flag, it will try to connect to the cluster
if the value is 'server' to be able to render lookup functions.
Closes #8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-01-16 12:43:15 -06:00
Tapas Kapadia
4d67dfabaa feat(helm): add ability for --dry-run to do lookup functions
When a helm command is run with the --dry-run flag, it will try to connect to the cluster
if the value is 'server' to be able to render lookup functions.
Closes #8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-01-16 12:43:15 -06:00
Tapas Kapadia
51281c195a feat(helm): add ability for --dry-run to do lookup functions
When a helm command is run with the --dry-run flag, it will try to connect to the cluster
if the value is 'server' to be able to render lookup functions.
Closes helm#8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
2023-01-16 12:43:15 -06:00
Matt Farina
36e18fa6e1
Fix improper use of Table request/response to k8s API
Fixes #11712

A change was made that when validation was turned off the Kubernetes
packages were building objects as a Table type. This was done for
display purposes. When details about the objects was going to be
printed as part of #10912.

This broke rollback, and possibly other functionality, as a Table
type was returned in some cases that needed the regular object.
This caused things to break silently.

The fix involved adding in a new Function (and interface) to
query for tables instead of the objects themselves. There was not
a clean way to add it to the existing function that covered all
cases.

A second problem was noticed along the way. When data was output
via status as YAML or JSON it was in the form of a table rather
than the objects themselves. This did not reflect expectations
and did not match the functionality in kubectl. The code was
updated to return a table when that was presented and the objects
when they are being output for YAML or JSON. The API also supports
this handling to SDK users can replicate this functionality.

API changes made here were never released. The functions were
developed for this release of Helm and only ever appeared in an
RC. In this case, they can be changed.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-01-12 08:38:10 -05: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
Matt Farina
6487d43965
Merge pull request #11672 from VaibhavSharma-47/feature
[CMD/PKG] Adopted resource not replaced when using upgrade --install --force
2023-01-09 20:48:08 -05:00
yxxhero
1c25a1fadd fix template --output-dir issue
Signed-off-by: yxxhero <aiopsclub@163.com>
2023-01-10 07:35:35 +08:00
Matt Farina
946967ffd1
Merge pull request #11490 from learnitall/pr/learnitall/allow-csv-api-versions
Add support for CSVs in template --api-versions arg
2023-01-09 17:58:51 -05:00
Matt Farina
6611cdcd01
Merge branch 'main' into 4030-provide-literal-alternative-for-set-flag
Signed-off-by: Matt Farina <matt@mattfarina.com>
2023-01-03 09:06:14 -05:00
Vaibhav Sharma
3181c7ddad fix adopted resource not replaced
Signed-off-by: Vaibhav Sharma <17532va@gmail.com>
2022-12-24 00:19:06 +05:30
Soujanya Mangipudi
038cc4a0ca
Merge branch 'main' into main
Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>
2022-12-12 10:48:20 -08:00
Ryan Drew
5aa316e1ee
Add support for CSVs in template --api-versions arg
This commit changes the template sub-command argument
`--api-versions` from `StringArrayVarP` to `StringSliceVarP`,
to allow support for comma separated variables. This will allow
users to use a syntax such as `--api-versions one,two,three` over
`--api-versions one --api-versions two --api-versions three`.

Fixes: #11485

Signed-off-by: Ryan Drew <ryan.drew@isovalent.com>
2022-10-31 10:42:31 -06:00
Cyril Jouve
1535ad5671
redirect registry client output to stderr
Signed-off-by: Cyril Jouve <jv.cyril@gmail.com>
2022-10-27 21:02:56 +02:00
shankeerthan-kasilingam
33121a80ff strict file permissions of repository.yaml
Fixes #11451

Signed-off-by: shankeerthan-kasilingam <shankeerthan1995@gmail.com>
2022-10-24 06:36:07 +05:30
Matt Farina
37dd72729b
Merge pull request #11336 from mattfarina/bump-version-3.10
bump version to v3.10.0
2022-10-03 09:32:13 -04:00
Patrick Scheid
451603910e feature(helm): add --set-literal flag for literal string interpretation
The current family of '--set' methods interprets some special characters
in values (e.g. commas, square brackets, points, backslashes). With the
typical shell escaping rules, this can increase the difficulty of overwriting
values in some cases.

In contrast to '--set-string' or similar methods, '--set-literal' does
not interpret those special characters. It interprets given values as
literal strings.

Example:

    --set-literal outer.inner='so\me,values'

    outer:
      inner: so\me,values

Closes #4030

Signed-off-by: Patrick Scheid <p.scheid92@gmail.com>
2022-09-23 13:35:48 +02:00
Martin Hickey
a48b87f32a
Merge pull request #11274 from wujunwei/fix-case-title-smaller-all
bugfix: add cases.NoLower opt for we can get same effect to strings.Title
2022-09-23 11:22:29 +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
Soujanya Mangipudi
ffa19a4b5d Addressing review comments - move printing code out of client.go
Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix circleci tests

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix formatting errors

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix tests

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix tests

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix gofmt issue

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>
2022-09-09 13:29:19 -07:00