Merge pull request #6425 from AndiDog/helm-template-no-reachability-check

Fix reachability check which must be disabled for `helm template` (unless `--validate` is specified)
This commit is contained in:
Matthew Fisher 2019-09-24 08:36:53 -07:00 committed by GitHub
commit 3e891dbde9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,8 +147,11 @@ func (i *Install) installCRDs(crds []*chart.File) error {
//
// If DryRun is set to true, this will prepare the release, but not install it
func (i *Install) Run(chrt *chart.Chart, vals map[string]interface{}) (*release.Release, error) {
if err := i.cfg.KubeClient.IsReachable(); err != nil {
return nil, err
// Check reachability of cluster unless in client-only mode (e.g. `helm template` without `--validate`)
if !i.ClientOnly {
if err := i.cfg.KubeClient.IsReachable(); err != nil {
return nil, err
}
}
if err := i.availableName(); err != nil {