Philipp Stehle
965f8591e7
improve error message on plugin install
...
Signed-off-by: Philipp Stehle <philipp.stehle@sap.com>
2 years ago
cui fliter
09d3f31358
fix a few function names on comments
...
Signed-off-by: cui fliter <imcusg@gmail.com>
2 years ago
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>
3 years ago
Tyler Auerbeck
4bf99e54eb
Update HELM_PLUGIN_SELF -> HELM_PLUGIN_DIR ( #10380 )
...
* Update HELM_PLUGIN_SELF -> HELM_PLUGIN_DIR
Signed-off-by: Tyler Auerbeck <tylerauerbeck@users.noreply.github.com>
* Trigger Build
Signed-off-by: Tyler Auerbeck <tylerauerbeck@users.noreply.github.com>
Co-authored-by: Tyler Auerbeck <tylerauerbeck@users.noreply.github.com>
3 years ago
yxxhero
133c227331
add unittest
...
Signed-off-by: yxxhero <aiopsclub@163.com>
3 years ago
yxxhero
90fa4c962a
fix HELM PLUGINS behavior another_way
...
Signed-off-by: yxxhero <aiopsclub@163.com>
3 years ago
Martin Hickey
699ea6dcef
Merge pull request #9066 from scaat/fix-specification
...
[FIX]Unified go specification
3 years ago
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>
4 years ago
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>
4 years ago
Scaat Feng
89f2f84a02
[FIX]error string should not be capitalized
...
Signed-off-by: Scaat Feng <scaat.feng@gmail.com>
4 years ago
Ma Xinjian
1aa6e928ce
Cleanup tempfiles introduced by unit tests under pkg/
...
Signed-off-by: Ma Xinjian <maxj.fnst@cn.fujitsu.com>
4 years ago
Matthew Fisher
6eeec4a002
switched to stricter YAML parsing on plugin metadata files
...
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
4 years ago
Matt Butcher
809e2d999e
Merge pull request from GHSA-m54r-vrmv-hw33
...
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
4 years ago
Matt Butcher
e2da16f514
improve the HTTP detection for tar archives
...
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
4 years ago
Matt Butcher
b6bbe4f08b
Improve the extractor and add tests ( #8317 )
...
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
4 years ago
Matt Farina
512544b9ab
Fixing PAX Header handling ( #8086 )
...
* Fixing issue with PAX headers in plugin archive
PAX Headers can be added by some systems that create archives. Helm
should ignore them when extracting.
There are two PAX headers. One is global and the other is not. Both
are ignored. The test adds only the PAX global header because the
Go tar package is unable to write the header that is not global.
Closes #8084
Signed-off-by: Matt Farina <matt@mattfarina.com>
* Removing the PAX header test as it is not working
The PAX header test was making a WriteHeader call and ignoring the
error. When writing the type TypeXHeader it was causing an error
that was being silently ignored. The Go tar package cannot write
this type and produces an error when one tries to. The error reads
"cannot manually encode TypeXHeader, TypeGNULongName, or TypeGNULongLink
headers"
Signed-off-by: Matt Farina <matt@mattfarina.com>
* Adding check of returned error in test
Adding a check for the returned error to make sure a non-nil value
is not returned.
Signed-off-by: Matt Farina <matt@mattfarina.com>
5 years ago
Liu Ming
e1aaf995a6
refactor: alter constant `pluginFileName` to `PluginFileName`
...
in order to reuse the "plugin.yaml" value in installer package
and avoid magic value in installer.go
Signed-off-by: Liu Ming <hit_oak_tree@126.com>
5 years ago
Adam Reese
4a0dfbe53b
fix(pkg/cli): ensure correct configuration from kubeconfig file
...
Bind Helm flags to Kubernetes configuration loader to get a merged
config with kubeconfig.
Fixes : #7539
Signed-off-by: Adam Reese <adam@reese.io>
5 years ago
Adam Reese
1cdd0a2048
fix(pkg/plugin): copy plugins directly to the data directory ( #7962 )
...
Copy plugins from the cache rather than create a symlink.
fixes : #7206
Signed-off-by: Adam Reese <adam@reese.io>
5 years ago
ZouYu
df9cf87cbe
add unit test for function FindPlugins
...
Signed-off-by: ZouYu <zouy.fnst@cn.fujitsu.com>
5 years ago
Yaakov Selkowitz
df20164cd2
Fix tests on arm64 and ppc64le ( #7500 )
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
5 years ago
Vivian Kong
82823a6634
Allow tests to run on s390x ( #7096 )
...
Signed-off-by: Vivian Kong <vivkong@ca.ibm.com>
5 years ago
Josh Soref
02ad2b1187
Spelling ( #7258 )
...
* spelling: constraint
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: cryptographic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: dependency
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: doesnot
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: don't
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: unexpected
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: dreadnought
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: default
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: envvars
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: evaluates
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: execute
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: extractor
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: frobnitz
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: generated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: implementation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: jabba
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: keywords
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: kubernetes
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: override
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: package
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: parsable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: progress
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: recursively
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: release
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: cache
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: representing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: serializer
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: subchart
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: utilities
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
5 years ago
Taylor Thomas
fca14bcb76
feat(plugin): Ports file mode preservation for tarballs from v3
...
This is a port of #5428 and readds a unit test for the `Extract` method
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
5 years ago
Matt Farina
9bc7934f35
Updating the module for v3 as the major version
...
Signed-off-by: Matt Farina <matt@mattfarina.com>
5 years ago
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>
5 years ago
Adam Reese
d3805a1d54
ref(pkg/cli): refactor environment variable setup
...
This change sets proper defaults based on environment variables for
global settings and plugin environments.
Signed-off-by: Adam Reese <adam@reese.io>
5 years ago
Matt Farina
1ea53d8934
Unifity environment variable naming and use
...
Signed-off-by: Matt Farina <matt@mattfarina.com>
5 years ago
Adam Reese
1779ad5302
ref(cmd/helm): remove init command
...
Signed-off-by: Adam Reese <adam@reese.io>
5 years ago
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>
5 years ago
Matthew Fisher
186f6c512f
fix(plugin): add HELM_HOME back
...
This allows Helm 2 plugins that used HELM_HOME as a scratchpad to continue to work the same in Helm 3.
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
5 years ago
Matthew Fisher
c728611e5a
feat(cli): support XDG base directory specification
...
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
5 years ago
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>
5 years ago
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>
5 years ago
Adam Reese
295092cd7d
ref(pkg/action): refactoring dup code and linter fixes
...
Signed-off-by: Adam Reese <adam@reese.io>
6 years ago
Adam Reese
895e9192d4
feat(*): use vanity import helm.sh/helm
...
Signed-off-by: Adam Reese <adam@reese.io>
6 years ago
Matthew Fisher
2571dbf82f
ref: remove pkg/helm, pkg/hapi, pkg/tiller
...
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
6 years ago
Adam Reese
21d3a40f3b
feat(tests): replace gometalinter with golangci-lint
...
Signed-off-by: Adam Reese <adam@reese.io>
6 years ago
Adam Reese
f791421fab
feat(Makefile): add formatting target
...
Signed-off-by: Adam Reese <adam@reese.io>
6 years ago
Martin Hickey
86d8596763
Feature(Plugins): Enable platform specific commands ( #5176 )
...
* Add logic for platform specific commands to plugins
* Add plugins doc updated to incorporate platform specific commands
* Add condition for os match: If OS matches and there is no more specific match, the command
will be executed
6 years ago
Adam Reese
4f26b658d8
change copyright to "Copyright The Helm Authors"
6 years ago
Adam Reese
726e3c41be
feat(*): print stacktrace on error with debug enabled
7 years ago
Adam Reese
c50813af54
ref(*): remove local repository (dead code)
7 years ago
Adam Reese
19398a2ef1
feat(*): store release History in same namespace as release
...
https://github.com/kubernetes-helm/community/blob/master/helm-v3/003-state.md#namespacing-changes
7 years ago
Adam Reese
358746fee6
ref(*): remove HELM_HOST
7 years ago
Adam Reese
496ca54183
ref(*): bypass grpc for helm client
7 years ago
Adam Reese
fa611fe285
fix(plugins): support installing plugins by relative path ( #3568 )
...
Support installing plugins by relative path
```
helm plugins install .
```
7 years ago
Adam Reese
c314e2e2f1
fix(plugins): support newer git ( #3571 )
...
Newer gits don't like checking out an empty string.
```
empty string is not a valid pathspec. please use . instead if you meant to match all paths
```
7 years ago
oilbeater
0764d95a03
defer in loop may cause resource leak
...
defer statement executes only when function return, and the resource still be hold during loop. Release the resource manually when not needed.
7 years ago
Johan Lyheden
4831089500
Add tests to HTTPInstaller, update plugin documentation
7 years ago