Skip to content

Deployment failures when no Helm releases are present in cluster #60

Open
@dfernandezm

Description

@dfernandezm

Describe the bug
Empty releases from Helm break deployments

To Reproduce
Steps to reproduce the behavior:

  1. Have a cluster with no releases installed
  2. Try to deploy something
  3. You'll see an error:
...
Internal IPs for nodes in cluster are: [10.132.15.224 10.132.0.26]
Adding property: externalIps -> {10.132.15.224\,10.132.0.26}Helm Set Params map[externalIps:{10.132.15.224\,10.132.0.26}]Checking chart folder: .git
Checking chart folder: startup-daemonset
Checking chart folder: traefik
Checking chart folder: traefik-dev
Found chart for app [traefikdev] -> [traefikdev]
Executing [ helm list --output json ]
[]

Output:
[]


2021/01/17 20:21:00 Error parsing json to struct [91 93 10 10] json: cannot unmarshal array into Go value of type deploy.ReleasesList

Expected behavior
Deployment should carry on ignoring empty list of releases

Additional context
The output of helm list --output json should be checked as string instead of trying to directly umarshal as JSON.

func (hd *helmDeployer) ParseReleasesList(jsonString string) ReleasesList {

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions