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>
The templating engine handles errors originating from the `required` and
`fail` template functions specially, cleaning up the error messages to
be more presentable to users. Go's text/template package unfortunately
does not make this straightforward to implement. Despite
template.ExecError implementing Unwrap, the error value returned from
the template function cannot be retrieved using errors.As. The wrapped
error in ExecError is a pre-formatted error string with the template
function's error string interpolated in with the original error value
erased. Helm works around this limitation by delimiting the
template-supplied message and extracting the message out of the
ExecError string with a regex.
Fix the parsing of `required` and `fail` error messages containing
newlines by setting the regex flag to make `.` match newline characters.
Signed-off-by: Cory Snider <csnider@mirantis.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>
Rename the package time
Redesgin the logic to make a FakeKubeClient wait for a ammount time.
Remove unneed logic in the PrintingKubeClient
Signed-off-by: Stephane Moser <moser.sts@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>
The 'helm.sh/resource-policy' annotation is only supported on top level
objects. The annotation is ignored if given on a nested object within a
list.
Ref #9829
Signed-off-by: Adam Reese <adam@reese.io>