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>
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>