While deving at a Microsoft Open Hack my group discovered this useful piece of information in this issue comment: https://github.com/helm/helm/issues/1796#issuecomment-311385728
We found it very useful for our Blue Green CD pipeline and thought others might find it useful as well.
Signed-off-by: Ethan Arrowood <ethan.arrowood@gmail.com>
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
Add possibility to put "--safe" argument to install and
upgrade command that restores the state of cluster in
case of failed install/upgrade attempt
Signed-off-by: Alexander Nesterenko <nestorf250@gmail.com>
As noted in Slack by a community member, release names with periods are
considered usable. Switching to RFC 1123 subdomain verification
continues to block bad release names like BAD_NAME, but allows names
like good.name to continue working.
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
* Refactor test run to separate method
This will allow us to parallelise it more easily
Signed-off-by: Frank Hamand <frankhamand@gmail.com>
* Add --parallel flag to helm test
(No functionality in this commit)
Signed-off-by: Frank Hamand <frankhamand@gmail.com>
* Run helm tests in parallel with --parallel flag
Signed-off-by: Frank Hamand <frankhamand@gmail.com>
* Add a mutex to helm test message streams
This is to protect against data races when running tests in parallel.
Signed-off-by: Frank Hamand <frankhamand@gmail.com>
* Add tests for --parallel flag
Signed-off-by: Frank Hamand <frankhamand@gmail.com>
* Add concurrency limit for parallel helm tests
Signed-off-by: Frank Hamand <frankhamand@gmail.com>
* Add test for concurrency limit
Signed-off-by: Frank Hamand <frankhamand@gmail.com>
* Fix rebase introduced errors
Signed-off-by: Frank Hamand <frankhamand@gmail.com>
Make the current check for the number of templates on create more
resilient by using a varible to store the expected number
of templates. In addition, fix the error message so that it displays
the correct number expected of templates.
Closes#5009
Signed-off-by: Henry Nash <henry.nash@uk.ibm.com>
When a user specifies value overrides for list values out of order,
strvals.listItem panics. Change strvals.listItem to handle this case by
re-initializing nil values to a new map.
Closes#4503
Co-authored-by: Cameron Childress <cameron@cchildress.org>
Co-authored-by: Kevin Collette <hal.collette@gmail.com>
Co-authored-by: Connor McKelvey <connormckelvey@gmail.com>
Co-authored-by: Dan Winter <dan.j.winter@gmail.com>
Signed-off-by: Dan Winter <dan.j.winter@gmail.com>
Signed-off-by: Cameron Childress <cameron@cchildress.org>
Signed-off-by: Kevin Collette <hal.collette@gmail.com>
Signed-off-by: Connor McKelvey <connormckelvey@gmail.com>
When 'helm <install|upgrade> --render-subchart-notes ...' is run, this will include
the notes from the subchart when rendered via Tiller.
Closes#2751
Signed-off-by: jgleonard <jgleonard@gmail.com>
* feat(helm): add $HELM_KEY_PASSPHRASE environment variable for signing helm charts
If $HELM_KEY_PASSPHRASE is set then helm package sign command will not prompt the
user to enter the passphrase for the private key
Signed-off-by: Anumita Shenoy <ansheno@microsoft.com>
* docs(helm): added documentation for HELM_KEY_PASSPHRASE
Added description for HELM_KEY_PASSPHRASE
Signed-off-by: Anumita Shenoy <ansheno@microsoft.com>
* fix(helm): fix regression with TLS flags/envvars
This change fixes some of the assumptions made in an earlier commit. Helm's TLS flags and environment variables were not respected because they were parsed well before execution (during settings.AddFlagsTLS()), causing erroneous behaviour at runtime. By re-introducing environment.Init(), Helm can properly parse environment variables at the correct time.
One change that had to occur in this PR is the fact that we need to call settings.Init() each time we call settings.AddFlagsTLS(). This is because each command owns its own FlagSet, so we need to parse each flagset to read and propagate the environment variables correctly.
I also noticed that we were maintaining two separate variables for each TLS value. Refactoring out some of the older code to all use the settings object makes the code much cleaner to read and fixes an issue where setting a flag or environment variable would propagate to the settings object, but we'd be reading from tlsEnable.
I've also added some unit tests to ensure this regression doesn't occur again.
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
* fix bug where os.ExpandEnv() on the default value causes differing behaviour
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
* add more context to the TODO/FIXME messages
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
* fix(helm): Use env to locate bash
Leverage '/usr/bin/env bash` for find bash instead of hardcoding
'/bin/bash' since some *nix OSes have it installed elsewhere.
Signed-off-by: Robert James Hernandez <rob@sarcasticadmin.com>
* test(helm): Adding case for versions short flag
When git sha is empty if being built from tarball running 'helm version
--short' should just ignore '--short' since sha is empty. Adding test
to ensure this is the case.
Signed-off-by: Robert James Hernandez <rob@sarcasticadmin.com>
* fix(helm): ignore short flag when sha is empty
Signed-off-by: Robert James Hernandez <rob@sarcasticadmin.com>
* Avoid importing k8s.io/kubernetes from pkg/helm
When writing a helm client (e.g. a helm plugin) that talks to tiller importing k8s.io/helm/pkg/helm to get the grpc client is key.
This pkg should not have a dependency to the k8s.io/kubernetes to avoid pulling in a lot of code that is only used within tiller and blow up binary sizes.
Signed-off-by: Fabian Ruff <fabian@progra.de>
* Add references to pull request in errors message
Signed-off-by: Fabian Ruff <fabian@progra.de>
* copy helper function from pkg/storage/driver
Signed-off-by: Fabian Ruff <fabian@progra.de>
* Move storage errors to seperate package
Signed-off-by: Fabian Ruff <fabian@progra.de>
* Keep old error variables for backward compatibility
Signed-off-by: Fabian Ruff <fabian@progra.de>
When using "helm repo add" with "--username" and without "--password",
hide user's input with a password prompt. This allows users to not
expose their passwords to the command line history.