Commit Graph

2383 Commits

Author SHA1 Message Date
wujunwei
316d3fb56a bugfix:(#11391) helm lint infinite loop
when malformed template object

Signed-off-by: wujunwei <wjw3323@live.com>
2023-03-28 15:04:07 +08:00
Matt Farina
046646c944 Handle failed DNS case for Go 1.20+
Go 1.20 introduced DNS/CNAME handling changes. This can cause an
IP address represented in hex, oct, etc to be looked up as DNS and
fail. This change introduces a mock DNS resolver.

Note, with the mock resolver, we don't need to use 0x7f000001 any
longer. Keeping because it was already there.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-23 13:22:07 -04: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
299a6463a0 Merge pull request #11886 from hiddeco/properly-invalidate-client
Properly invalidate client after CRD install
2023-03-22 10:36:41 -04:00
Hidde Beydals
68f7b1f194 Properly invalidate client after CRD install
As the CRDs are installed before the capabilities are gathered, the
current call to invalidate the discovery client is premature and
expensive.

What actually is required is an invalidation of the REST mapper, as
otherwise the Helm install action may later on fail with a `resource
mapping not found` error. More specifically when the caller of the
action is making use of a persisting[1] `RESTClientGetter`.

Which is not something done by the Helm CLI (albeit it could, and this
would potentially save quite some resources?). But is a default
configuration offered by the Helm SDK via `kube.New` when a nil value
is provided as the `getter`.

[1]: https://github.com/kubernetes/cli-runtime/blob/v0.26.2/pkg/genericclioptions/config_flags.go#L118

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-07 20:07:41 +01: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
c94306f75d Reimplemented change in httpgetter for insecure TLS option
Signed-off-by: Andrew Block <andy.block@gmail.com>
2023-03-03 07:33:17 -06:00
Andrew Block
ec5e29e801 Removed conditional
Signed-off-by: Andrew Block <andy.block@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
cpanato
006bc0f39d update k8s registry domain
Signed-off-by: cpanato <ctadeu@gmail.com>
2023-02-17 09:50:04 +01:00
Matt Farina
863bc74e5a Update to func handling
Signed-off-by: Matt Farina <matt@mattfarina.com>
2023-02-03 15:36:32 -05:00
Matt Farina
76157c6d06 Merge pull request #11720 from mattfarina/fix-11712
Fix improper use of Table request/response to k8s API
2023-01-13 11:57:35 -05:00
Cenk Alti
442d594570 Check status code before retrying request
Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2023-01-12 21:03:45 -05: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
Matt Farina
774c6ce703 Merge pull request #11439 from phoenixsqf/main
use intstr.GetScaledValueFromIntOrPercent instead of the deprecated
2023-01-09 18:08:40 -05:00
Martin Hickey
1819f1f616 Merge pull request #11628 from dastrobu/Linting_error_on_null_in_dependencies_is_misleading_#11627
change linting error messages for null values in arrays
2023-01-06 09:46:48 +00:00
Daniel Strobusch
6a5f240e9a change linting error messages for null values in arrays
Closes #11627

Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
2023-01-05 18:28:14 +01:00
Jakub Warczarek
3d81ea22ac Fix after CR
Signed-off-by: Jakub Warczarek <jakub.warczarek@gmail.com>
2023-01-03 23:35:19 +01:00
Jakub Warczarek
553f1e34f5 Add test for User-Agent header setting and refactor
Signed-off-by: Jakub Warczarek <jakub.warczarek@gmail.com>
2023-01-03 23:13:11 +01:00
Jakub Warczarek
2fa7b3d1b7 Fix User-Agent header in requests made by Helm
Signed-off-by: Jakub Warczarek <jakub.warczarek@gmail.com>
2023-01-03 23:13:11 +01:00
Matt Farina
71ef5f477b Merge pull request #11524 from sap-contributions/harmonize-url-reference-resolving
harmonize URL reference resolving
2023-01-03 09:02:12 -05:00
Matt Farina
6d2b10832e Merge pull request #11616 from zalsader/add-docs-cli-values
docs: add docs for cli/values.Options
2023-01-03 09:01:24 -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
Matt Farina
eb7150fc61 Merge pull request #10912 from SoujanyaMangipudi/main
feat(helm): Supporting helm3 to show up resource names in helm status
2022-12-23 11:00:59 -05:00
Soujanya Mangipudi
6f8c1785a4 Merge remote-tracking branch 'helm-upstream/main' into somangip/MergeHelmMain1219
Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>
2022-12-19 15:22:52 -08:00
Matt Farina
5a8e91a010 Merge pull request #11604 from xishengcai/patch-1
Update chartrepo.go
2022-12-19 17:34:50 -05:00
Martin Hickey
3636f68247 Merge pull request from GHSA-6rx9-889q-vv2r
Update string value name handling
2022-12-14 13:56:49 +00:00
Martin Hickey
638ebffbc2 Merge pull request from GHSA-53c4-hhmh-vw5q
Update repo handling
2022-12-14 13:55:41 +00:00
Martin Hickey
bafafa8bb1 Merge pull request from GHSA-67fx-wx78-jx33
Update schema validation handling
2022-12-14 13:54:39 +00:00
Soujanya Mangipudi
038cc4a0ca Merge branch 'main' into main
Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>
2022-12-12 10:48:20 -08:00
Martin Hickey
b1b0d18a83 Merge pull request #11508 from sap-contributions/improve-plugin-install-error
improve error message on plugin install
2022-12-09 12:30:51 +00:00
Martin Hickey
b6fef6c466 Fix backwards compatibility
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2022-12-08 16:00:45 +00:00
Zuhair AlSader
0fdfe05844 docs: add docs for cli/values.Options
Signed-off-by: Zuhair AlSader <zuhair@koor.tech>
2022-12-08 01:45:40 -05:00
caixisheng
c8890e971e Update chartrepo.go
## case :
1. charmuseum is http
2. nginx https ---> chartmuseum
3. domain, CN is IP

## result:  
 error: failed to prepare chart for release: chart unavailable: looks like "https://120.55.54.50" is not a valid chart repository or cannot be reached: Get "https://120.55.54.50/index.yaml": x509: certificate relies on legacy Common Name field, use SANs instead



Signed-off-by: caixisheng <cc710917049@163.com>
2022-12-05 23:04:16 +08:00
Martin Hickey
a59e584684 Update string handling
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2022-11-25 18:16:43 +00:00
Martin Hickey
256e976331 Update repo handling
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2022-11-22 15:22:10 +00:00
Martin Hickey
3974136b6e Merge pull request #11426 from cenkalti/leader-changed
Fix handling of "leader changed" errors
2022-11-16 15:57:09 +00:00
Philipp Stehle
965f8591e7 improve error message on plugin install
Signed-off-by: Philipp Stehle <philipp.stehle@sap.com>
2022-11-09 10:41:55 +01:00
Philipp Stehle
dfb25e13de harmonize URL reference resolving
Fixes https://github.com/helm/helm/issues/11472

Signed-off-by: Philipp Stehle <philipp.stehle@sap.com>
2022-11-09 10:26:45 +01:00
Matt Farina
9a5eb70320 Merge pull request #11442 from catandcoder/main
fix a few function names on comments
2022-11-08 15:53:50 -05:00
Andrew Block
269dd247d0 Merge pull request #11300 from porridge/better-logging
During deletion, explicitly log already deleted resource.
2022-11-01 01:00:57 -05: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
cui fliter
09d3f31358 fix a few function names on comments
Signed-off-by: cui fliter <imcusg@gmail.com>
2022-10-17 20:41:59 +08:00
Qifan Shen
9d59d92abb use intstr.GetScaledValueFromIntOrPercent instead of the deprecated
Signed-off-by: Qifan Shen <sqfphoenix@163.com>
2022-10-13 16:58:24 +08:00