Commit graph

119 commits

Author SHA1 Message Date
Taylor Thomas
854919fae8 feat(repo): Ports repo file Get method from v2
This is a port of #3478 with some slight refactors to make it a bit more friendly.
It is technically a breaking change as it is changing the method signature from v2

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-07 14:18:33 -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
967f4fed42
Update dependencies
* Kubernetes updated to 1.16.1
* SemVer and Sprig updated to latest releases that leverage go
  modules
* Tests and checks updated. These already landed in v2 via PR 6457

Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-10-03 13:49:07 -04:00
Adam Reese
fe92480ab4
fix(cmd/helm): user friendly error message when repos are not configured
Signed-off-by: Adam Reese <adam@reese.io>
2019-08-28 14:13:49 -07:00
Adam Reese
1779ad5302
ref(cmd/helm): remove init command
Signed-off-by: Adam Reese <adam@reese.io>
2019-08-26 10:21:52 -07:00
Adam Reese
b6fdd8783b
feat(cmd/helm): remove need for helm init command
* allow repository config via cli
* make `helm repo add` create repo config file if it does not exist
* squash a ton of bugs

Signed-off-by: Adam Reese <adam@reese.io>
2019-08-22 23:31:50 -07: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
Matthew Fisher
c728611e5a
feat(cli): support XDG base directory specification
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-08-02 13:15:03 -07:00
Karuppiah Natarajan
8d660a96a0
Allow missing trailing '/' in --repo url
Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>

Co-authored-by: Nandhagopal Ezhilmaran <nandhagr8@gmail.com>
2019-07-30 23:00:39 +05:30
hd-rk
7ad1d522b3 test: add test
Signed-off-by: hd-rk <hdn314159@gmail.com>
2019-07-26 19:18:20 +08:00
hd-rk
6d3eb81943 fix: use repo default client to download index
Signed-off-by: hd-rk <hdn314159@gmail.com>
2019-07-26 14:49:53 +08:00
Matthew Fisher
2800c56f9d
ref(downloader): pass in options to ChartDownloader
This restores the ability to pass in parameters at runtime to the
ChartDownloader, enabling users to pass in parameters like the --username
and --password flags.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-07-18 09:00:08 -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
Matthew Fisher
e410a03c74
ref(getter): introduce Options for passing in getter parameters
instead of hard-coding the parameters being passed in the constructor, we should pass in an Options struct that can be used to pass in those parameters.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-07-02 15:22:23 -07:00
Matthew Fisher
7353a65bfa
ref(downloader): remove ResolveChartVersionAndGetRepo
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-06-07 08:51:27 -07: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
895e9192d4
feat(*): use vanity import helm.sh/helm
Signed-off-by: Adam Reese <adam@reese.io>
2019-03-13 13:43:47 -07:00
Matthew Fisher
2571dbf82f
ref: remove pkg/helm, pkg/hapi, pkg/tiller
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-03-12 09:47:12 -07: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
Matthew Fisher
95c865513f
fix appveyor builds (#4934)
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-01-31 21:31:09 -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
roc
212d326a34 ref(pkg/repo): rename RepoFile to File
To resolve the linter warning: name start with package name.

Signed-off-by: Roc <roc@imroc.io>
2018-11-20 19:58:35 +08: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
Adam Reese
b1128abf4f
ref(*): s/tiller/helm/ 2018-05-10 09:41:31 -07:00
Adam Reese
726e3c41be
feat(*): print stacktrace on error with debug enabled 2018-05-10 09:34:41 -07:00
Adam Reese
c50813af54
ref(*): remove local repository (dead code) 2018-04-25 09:35:29 -07:00
Adam Reese
6345f04190
ref(hapi): convert protobuf to go types 2018-04-18 14:53:38 -07:00
adshmh
1a55161a53 Fix several golint warnings (#3756)
* fix(helm): fix golint warning due to ApiVersionV1 constant name

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm): fix golint warning due to ResolveChartVersionAndGetRepo comment

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm): fix golint warnings on HttpGetter type and SetCredentials method missing a comment

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm):fix golint warning due to comment on FindChartInAuthRepoURL function

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm): fix golint warning due to RepoFile type name

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm): fix golint warning due to ParseString comment

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2018-03-27 13:06:04 -07:00
Eyal Ben Moshe
b6335b7dfe Authentication support for remote charts repositories (#3206)
Authentication support for remote charts repositories.
2018-03-20 10:56:48 -07:00
Mitchel Humpherys
6de70254fd feat(repo): Add test for non-existent repo path 2017-12-13 09:46:15 -08:00
Mitchel Humpherys
7417f09293 feat(repo): Improve error message for missing repositories.yaml
New users to helm don't always run `helm init` (e.g. if their cluster
already has helm installed).  The user's initial interaction with any of
helm's repository commands (e.g. `helm repo list`) will then be an error
message due to a missing repositories.yaml in their local config.

Give the user a little hint about how to fix the error without them having
to hunt through the man/help pages.
2017-12-13 08:37:48 -08:00
Christoph Hösler
98e0bd2ecb refactor: rename function and improve error messages 2017-11-23 09:41:34 +01:00
Christoph Hösler
af9190f956 feature: let FindChartInRepoURL return absolute chart URLs 2017-11-22 18:32:05 +01:00
Taylor Thomas
d4ccef7ba7 Merge pull request #2999 from bonifaido/getterConstructor-err
fix(helm): invoking getterConstructor returns downstream error now
2017-10-07 12:32:45 -07:00
Michal Cwienczek
dad8c6f644 Fix #2937 - helm always appends /index.yaml at the end of URL (#2988)
* Closes #2937
Added required dependency to run make test in developer's guide

* Fixed base URL appending when chart address is not absolute

* Removed requirement from developers.md

* Fixed unnecessary line breaks

* Added tests for query string repo

* Returning URL along with error
2017-10-06 08:59:11 -06:00
Nandor Kracser
a28e5dd2b3 fix(helm): invoking getterConstructor returns downstream error now 2017-10-03 12:01:49 +02:00
Matthew Fisher
9d1db2851e Revert "Write repo file using atomicfile"
This reverts commit 965cb7fd1c.
2017-09-26 14:57:17 -07:00
Michelle Noorali
84bb77f183 Merge pull request #1997 from AmandaCameron/issue/1401
Take a crack at Issue #1401
2017-09-08 07:58:37 -06:00
Amanda Cameron
415e52bf55 Add support for sub-directory scanning as in issue #1401 2017-09-08 09:33:44 -04:00
Nandor Kracser
9f963c84b4 Redefine the err variable in NewChartRepository, otherwise errors might slip through 2017-07-24 11:26:11 +02:00
Raphael Badin
965cb7fd1c Write repo file using atomicfile
This prevents clients from seeing half-written files because
on POSIX systems renaming a file is an atomic operation.

Drive-by: Add test for repo file permission.
2017-05-16 23:25:32 +02:00
Sushil Kumar
d5fd75fe61 Updated StartLocalServerForTests to be private method 2017-05-05 10:54:54 -07:00
Sushil Kumar
dce9d88c25 Added tests for --repo flag for helm fetch command
- [ ] Added tests for --repo flag on `helm fetch` command
- [ ] Also added tests for (pkg/repo).FindChartInRepoURL
2017-05-02 16:57:05 -07:00
Sushil Kumar
2a5ab59895 Updated defer delete call 2017-05-02 13:25:13 -07:00
Sushil Kumar
d13b134ffb Implements --repo flag to commands fetch, install, inspect, upgrade 2017-05-02 10:46:16 -07:00
Matt Butcher
bd02f39384
ref(getter): flatten the getter package tree
This flattens the getter package tree, adds tests, and changes a little
bit of the terminology to follow Go idioms. This also makes much of the
getter API private to begin with. This will give us more flexibility in
the future.
2017-05-01 16:18:13 -06:00
Shane Starcher
7150fc3d9e bug(helm) - install/upgrade/search semver constraint support 2017-04-18 18:10:48 -04:00
Gergo Huszty
b4ca198cc6 Pluggable downloaders. Closes #2093, #2094.
It is now possible to create plugins with chart download capabilities for custom, non-http protocols.
Furthermore it is possible to reuse helm packages to implement alternative clients with these custom downloader functions.
2017-04-16 20:58:03 +02:00
Matt Butcher
ba6c55c987
fix(helm): add 'skip-refresh' flag to 'helm init'
This exposes the skip-refresh flag to helm init to make it possible to
initialize Helm without fetching the index.yaml of the stable repo.
This mirrors the behavior of 'helm dep up's skip-refresh flag.

Closes #2127
2017-04-03 13:44:08 -06:00