Commit Graph

89 Commits

Author SHA1 Message Date
George Jenkins
0111c25229 Merge pull request #31048 from unguiculus/issue-12952
fix(v3 backport): Add timeout flag to repo add and update flags
2025-09-22 12:47:42 -07:00
Terry Howe
5e8ff72b71 Do not explicitly set SNI in HTTPGetter
Co-authored-by: Wahab Ali <wahabalimk@gmail.com>
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-07-24 09:07:24 -06:00
Reinhard Nägele
79a9cc5653 Add timeout flag to repo add and update flags
Backport of #30900 to v3.
(cherry picked from commit d448cf1943)

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2025-07-10 10:19:31 +02:00
Terry Howe
c3e5217d85 feat: allow installation by OCI digest
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
(cherry picked from commit ad9fb68fa3)
2025-01-01 11:50:26 -05:00
Matt Clegg
3c39705212 ISSUE-9507: TEST server with varied Accept Header
Signed-off-by: Matt Clegg <m@cle.gg>
2024-05-17 05:11:41 +01:00
Matt Clegg
fff3547f9c ISSUE-9507: ADD application/gzip,application/octet-stream accept header when downloading chart
Signed-off-by: Matt Clegg <m@cle.gg>
2024-05-14 15:58:30 +01:00
Matt Farina
a753ee7f43 Merge pull request #12866 from robertsirc/Correcting-Linting-Errors
Correcting linting errors
2024-04-10 14:04:34 -04:00
Robert Sirchia
d58d7b3762 Fixing all the linting errors
Cleaned up all the linting errors we are getting.

Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2024-03-11 17:13:34 -04:00
Ricardo Maraschini
94c1deae6d bug: add proxy support for oci getter
adds missing proxy support on oci chart getter.

Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
2024-01-31 12:58:47 +01:00
Joe Julian
c9366c3a5c Merge pull request #11878 from Exchizz/feature/pass-basic-auth-to-download-plugin
feat: pass basic auth to env-vars when running download plugins
2024-01-05 15:47:59 -08:00
Joe Julian
a749b66310 Merge pull request #12203 from 0xff-dev/main
chore: HTTPGetter add default timeout
2023-08-17 08:41:07 -07:00
0xff-dev
2011a3191c chore: HTTPGetter add default timeout
Signed-off-by: 0xff-dev <stevenshuang521@gmail.com>

Co-authored-by: bjwswang <bjwswang@gmail.com>
Co-authored-by: Abirdcfly <fp544037857@gmail.com>
2023-08-11 12:16:38 +08:00
Sanskar Jaiswal
6defb96dac oci: add tests for plain HTTP and insecure HTTPS registries
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-06-14 23:53:33 +05:30
Sanskar Jaiswal
2538b927a7 oci: Add flag --plain-http to enable working with HTTP registries
Add a new flag `--plain-http` to the following commands:
* `helm install`
* `helm pull`
* `helm push`
* `helm template`
* `helm upgrade`
* `helm show`

This flag instructs the registry client to use plain HTTP connections,
thus enabling upload/download of charts from OCI registries served at
an HTTP endpoint.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-06-09 14:43:53 +05:30
Mathias Neerup
fa067ec16c fix: pass 'passCredentialsAll' as env-var to getter
Signed-off-by: Mathias Neerup <github@mneerup.dk>
2023-04-29 23:55:17 +02:00
Mathias Neerup
f28447c73d feat: pass basic auth to env-vars when running download plugins
Signed-off-by: Mathias Neerup <github@mneerup.dk>
2023-04-29 23:55:17 +02: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
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
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
Martin Hickey
ae828ce0ee Fix code style
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2022-09-21 16:35:29 +01:00
Soule BA
42a04c76a4 make token caching an opt in feature
If implemented, users have to opt in to cache a token.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2022-06-27 14:23:25 +02:00
Matthias Fehr
cab1fc87d4 Dont modify provided transport
Signed-off-by: Matthias Fehr <matthias@monostream.com>
2022-02-22 17:54:10 +01:00
Matthias Fehr
7d22040e66 Pass http getter as pointer in tests
Signed-off-by: Matthias Fehr <matthias@monostream.com>
2022-02-22 16:00:38 +01:00
Matthias Fehr
2acda0cc5b Add docs block
Signed-off-by: Matthias Fehr <matthias@monostream.com>
2022-02-22 15:59:53 +01:00
Matthias Fehr
45367ca9bf Add transport option and tests
Signed-off-by: Matthias Fehr <matthias@monostream.com>
2022-02-22 15:34:29 +01:00
Matthias Fehr
aa33f4fdd8 Reuse http transport
Signed-off-by: Matthias Fehr <matthias@monostream.com>
2022-01-17 15:12:21 +01:00
Thomas Runyon
353d74e967 refactor internal/experimental/registry to pkg/registry
Signed-off-by: Thomas Runyon <runyontr@gmail.com>
2022-01-12 21:49:26 -05:00
Scott Rigby
4d50526a2b Move OCI tag semver range logic from OCIGetter to ChartDownloader
Signed-off-by: Scott Rigby <scott@r6by.com>
2022-01-12 14:36:54 -05:00
Scott Rigby
b6bf3905f3 Implement reusable GetTagMatchingVersionOrConstraint
Largely borrowed from (IndexFile).Get. However there is not currently a nice
way to make this code also usable to the repo package, as IndexFile depends on
a list of index Entries containing a nexted version.

We could refactor this later to somehow use the same shared function, but for
now keeping separate.

Signed-off-by: Scott Rigby <scott@r6by.com>
2022-01-11 21:47:04 -05:00
Andrew Block
df98e18eb7 Working oci code without providing versions
Signed-off-by: Andrew Block <andy.block@gmail.com>
2022-01-11 21:47:03 -05:00
Josh Dolitsky
230e37ca52 remove hardcoded oci strings, add constant/util
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-06-28 12:43:33 -04:00
Josh Dolitsky
1809cc0509 Merge branch 'main' of github.com:helm/helm into hip-6
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-06-28 10:30:20 -04:00
longkai
0d9ebc7885 refactor(getter): refine http GET request
It just makes the code better, I suppose the following is rational:

- use standard libaray common constants instead of hardcode though it's
  really common
- close the response body even if the http status code is not 200 OK.
  The doc says *It is the caller's responsibility to close Body*.
- move the `bytes.Buffer` return value declaration where it gets used.

Signed-off-by: longkai <im.longkai@gmail.com>
2021-06-25 13:18:48 +08:00
Josh Dolitsky
cd27cf660f Merge branch 'main' of github.com:helm/helm into hip-6
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-06-16 16:08:25 -04:00
Matt Farina
17ed9c4cd3 tweak basic handling
Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-06-15 06:53:31 -04:00
Josh Dolitsky
00985cad6b Implement changes proposed in HIP 6
For more information, please see the following URL:
https://github.com/helm/community/blob/main/hips/hip-0006.md

Note: OCI support remains experimental, and you are still
required to set HELM_EXPERIMENTAL_OCI=1 in your environment.

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
2021-06-08 02:43:13 -04:00
Martin Hickey
699ea6dcef Merge pull request #9066 from scaat/fix-specification
[FIX]Unified go specification
2021-06-02 11:55:53 +01: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
Alex Sears
1c377f8c62 add test to ensure OCIGetter registryClient is set
Signed-off-by: Alex Sears <me@alexsears.com>
2021-02-24 18:02:37 -05:00
Alex Sears
2d16a8135b initialize registry client in oci getter
Signed-off-by: Alex Sears <me@alexsears.com>
2021-02-24 14:38:37 -05:00
Matt Farina
49f895db6b Merge pull request #8843 from bloodorangeio/oci-pull
Signed-off-by: Matt Farina <matt@mattfarina.com>
2021-01-05 16:09:19 -05:00
Peter Engelbert
beda5e1e2b Address error on deletion of old dependencies
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
2020-12-18 16:29:16 -06:00
Dinu Mathai
a202fb0c0b Fixed bug - The flags --cert-file/--key-file where ignored when --insecure-skip-tls-verify flag is set (#9070)
* fix: Fixed bug - The flags --cert-file/--key-file where ignored when --insecure-skip-tls-verify flag is set

Signed-off-by: Dinu Mathai <Dinu.Mathai1@T-Mobile.com>

* fix: Added unit test

Signed-off-by: Dinu Mathai <Dinu.Mathai1@T-Mobile.com>
2020-12-17 13:49:16 -07:00
Peter Engelbert
3ad08f3ea9 Implement helm pull for OCI registries
* Implement `helm dep update` for oci dependencies
* New unit tests
* Remove `helm chart pull` command
* New `helm pull` does not depend on registry cache

Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
2020-12-11 21:44:30 -06:00
Scaat Feng
f1f2e6ff4c [FIX]comment should start with whitespace
Signed-off-by: Scaat Feng <scaat.feng@gmail.com>
2020-11-26 14:06:00 +08:00