If set, 'uninstall' command will wait until all the resources are deleted before returning.
It will wait for as long as --timeout
closes#2378
Signed-off-by: Mike Ng <ming@redhat.com>
This subcommand will display manifests under `crds/` if some exist.
This also changes the behaviour of `show all` to include CRDs.
Signed-off-by: Mario Valderrama <woldy401@gmail.com>
Fix typos
Remove condition arround time.Sleep
Because a negative or zero duration causes Sleep to return immediately.
Signed-off-by: Stephane Moser <moser.sts@gmail.com>
Cobra's bash completion V2 has the following benefits:
- aligned with the completion logic for the other shells
- provides completion descriptions as for the other shells
- uses a 300-line shell script (versus 4K lines for V1)
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
Cobra provides powershell auto-completion out of the box. This commit
teaches helm how to use it.
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
**What*
Without this commit, you can't pipe the password into `helm repo add`:
```
$ echo password | helm repo add repo-name https://repo-url --username username
Password:
Error: inappropriate ioctl for device
```
This commit introduces `--password-stdin`:
```
$ echo password | helm repo add repo-name https://repo-url --username username --password-stdin
"repo-name" has been added to your repositories
```
**Why**
There are two reasons I see for adding this:
* I personally would expect that it's possible to pipe the password into
`helm repo add` but that's currently not the case. If I understand it
correctly, you currently either need to pass the password via a cli
parameter (`--password`) or use a expect/send mechanism.
* Subcommands like `helm registry login` already support
`--password-stdin`. The cli interfaces should be consistent regarding
which options they support.
**Notes**
I basically just copy-pasted code from `cmd/helm/registry_login.go`.
Signed-off-by: André Schröder <andre.schroedr@gmail.com>
Testing that a bad completion directive was being replaced by the
default one was actually testing Cobra's behaviour. This is unnecessary
especially since that behaviour changed in the 1.2.0 release. Helm
tests should focus on testing Helm's behaviour.
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
This is a port to helm v3 of #5182.
A little more flexible than the v2 version, it allows to specify a list
of repositories that should be updated.
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
managedFields were a changed that landed in 1.18. This is an array
under metadata with managedFields. The kubernetes client pkgs that
Helm uses automatically add them.
This change added a manager for the managedFields. The flow for
deciding on the name to use is:
1. An explicit name if one is chosen
2. The base name of the first os.Arg (the binary name) if no name
explicitly set.
3. unknown if no name set and name cannot be detected
The name is at the package level as there is no other place to easily
set it for Helm v3. Since the name is for the binary or app it should
be ok to set app wide.
Signed-off-by: Matt Farina <matt.farina@suse.com>
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>
Current documentation list all available template vars, but does not provide an example of a template string that demonstrates template substitution. I had to look it up in the unit test.
Signed-off-by: Iaroslav Sheptykin <i.sheptykin@neusta.de>
The 'uninstall' command can accept more than one release name as
arguments; this commit teaches the completion logic to respect this.
At the same time, the commit adds tests for the commands using the
modified code path.
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
The example given in the help out of the list command seems random, not a valid time format for golang.
Signed-off-by: Mert Inan <inanme@gmail.com>
Signed-off-by: mert <mert.inan@sky.uk>
Ref: HIP 0008
When completing output formats, extra information will be shown
for shells that support completions (fish, zsh). For example:
$ helm status -o <TAB>
json -- Output result in JSON format
table -- Output result in human-readable format
yaml -- Output result in YAML format
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
Ref: HIP 0008
When completing a version, extra information will be shown for
shells that support completions (fish, zsh). For example:
$ helm upgrade nginx stable/grafana --version <TAB>
0.8.4 -- Created: March 30, 2018
0.8.5 -- App: 5.0.4, Created: April 10, 2018
1.0.0 -- App: 5.0.4, Created: April 11, 2018 (deprecated)
1.10.0 -- App: 5.1.2, Created: June 1, 2018
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
Ref: HIP 0008
When completing a revision, extra information will be shown for
shells that support completions (fish, zsh). For example:
$ helm get manifest nginx --revision <TAB>
1 -- App: 1.19.1, Chart: nginx-6.0.2
2 -- App: v0.34.1, Chart: nginx-ingress-1.41.2
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
Ref: HIP 0008
When completing a kube-context, extra information will be shown for
shells that support completions (fish, zsh). For example:
$ helm --kube-context <TAB>
acc -- accept
default -- k3d-k3s-default
lab -- lab
lab2 -- cluster.local
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
Ref: HIP 0008
When completing a plugin name, extra information will be shown for
shells that support completions (fish, zsh). For example:
$ helm plugin uninstall <TAB>
2to3 -- migrate and cleanup Helm v2 configuration and releases in-place to Helm v3
diff -- Preview helm upgrade changes as a diff
fullstatus -- provide status of resources part of the release
github -- Install or upgrade Helm charts from GitHub repos
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
Ref: HIP 0008
When completing a release name, extra information will be shown for
shells that support completions (fish, zsh). For example, if I have
two releases: "nginx" and "nginx2", completion would yield:
$ helm history n<TAB>
nginx -- nginx-6.0.2 -> deployed
nginx2 -- nginx-ingress-1.41.2 -> deployed
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
The 'plugin update' and 'plugin uninstall' commands can accept more than
one plugin name as arguments; this commit teaches the completion logic
to respect this.
Also, the commit adds go test for completion of the plugin commands.
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
The "helm completion zsh" and "helm completion fish" commands accept the
"--no-descriptions" flag, therefore we should not disable the addition
of "[flags]" to the usage line when printing help.
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
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>
The recent addition of oci:// to specify dependencies in the
Chart.yaml dependencies and with helm pull missed handling for the
dependency build command. This command was failing to handle OCI.
This change adds support for the dep build command following the
same pattern used to add oci:// functionality.
Signed-off-by: Matt Farina <matt@mattfarina.com>
* Reduce linting severity for users of out-of-date kubernetes
Fixes#8596
Signed-off-by: Joe Julian <me@joejulian.name>
* add more verbose deprecation info
Signed-off-by: Joe Julian <me@joejulian.name>
* use new upstream deprecations
Signed-off-by: Joe Julian <me@joejulian.name>
* do not error for custom resources
Signed-off-by: Joe Julian <me@joejulian.name>
* Define deprecation version in lint rules by LDFLAG
Signed-off-by: Joe Julian <me@joejulian.name>
* make comment clearer
Signed-off-by: Joe Julian <me@joejulian.name>
* Extend the k8s version discovery and constants to chartutil
Signed-off-by: Joe Julian <me@joejulian.name>
* remove awk dependency
Signed-off-by: Joe Julian <me@joejulian.name>
* align k8s version constant names between capabilities.go and deprecations.go
Signed-off-by: Joe Julian <me@joejulian.name>
* show the error if the unexpected happens
Signed-off-by: Joe Julian <me@joejulian.name>
* bump k8sVersionMinor and golden chart templates for k8s 1.20
Signed-off-by: Joe Julian <me@joejulian.name>
* bump for tests to match 1.20.1
Signed-off-by: Joe Julian <me@joejulian.name>
* Replace Helm Hub with Artifact Hub
Signed-off-by: Scott Rigby <scott@r6by.com>
* Update link to new doc entry for Monocular compatible search API
Signed-off-by: Scott Rigby <scott@r6by.com>
* Add struct for Artifact Hub data, and return correct URL for both artifact hub instances and backwards compatibility for Monocular search API
Signed-off-by: Scott Rigby <scott@r6by.com>
* Keep default endpoint hub.helm.sh, so the helm org controls the domain. At least until artifacthub moves to CNCF incubation
Signed-off-by: Scott Rigby <scott@r6by.com>
* 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>
Note, klog is now set to v2. This is because k8s 1.19 uses klog v2.
v1.0.0, which was previously used, also had a bug in the flag
initialization which we were using. Helm was pulling klog v2.2.0
prior to this for use with k8s. Helm was using the wrong version
of the library to initialize the flags. Updating that fixes the
issues that could arise there.
Signed-off-by: Matt Farina <matt@mattfarina.com>