replicatedhq / ship

A better way to deploy Kubernetes Helm charts
https://www.replicated.com/ship
Apache License 2.0
637 stars 70 forks source link

ship init UI hangs on step 5 on helm ds/ chart #800

Closed wstrange closed 5 years ago

wstrange commented 5 years ago

Expected behavior

Step 5 in UI shows me the yaml files to be templated to create overlays

Actual behavior

UI hangs, and does not show any values. Going to the next screen displays a message to go back and complete step 5.

Information

ship init https://github.com/ForgeRock/forgeops/tree/master/helm/ds

Steps to reproduce the behavior

mkdir ds cd ds ship init https://github.com/ForgeRock/forgeops/tree/master/helm/ds

Note: the secrets are quite large. You can omit rendering of secrets by editing the values.yaml in the first step, and set:

useDefaultSecrets: false

The error still occurs - so the issue does not appear to be related to the way that helm includes the secrets

nictrix commented 5 years ago

@wstrange Try these steps out as a workaround:

  1. run ship init as you were
  2. Go past the Helm part in the browser (stay on step 4)
  3. Edit the base/ds.yaml file on the command line and remove this in the yaml: initContainers: - as its a null value causing the problem.
  4. Go back to the ship browser step 5 and finish your Kustomization.
laverya commented 5 years ago

Ha that was exactly what I was going to be looking for! (null value created by the helm chart that kustomize fails when parsing)

I'll add it to our list of "null values we hackily patch" https://github.com/replicatedhq/ship/blob/9f9fe11928a8dec4397960e2c38efd1fdc853add/pkg/lifecycle/render/helm/template.go#L63 to keep you from having to do that in the future. At some point we'll have a better solution for this (kustomize should eventually accept anything that kubectl does, which will solve the problem rather nicely) but now is not yet that time

nictrix commented 5 years ago

@laverya Cool! Also I think you may want to look at the other issue I just opened, it seems related to the null value problem: https://github.com/replicatedhq/ship/issues/801

Based on the regex code, there might need to be further hacks as args does not come out correctly for that issue.

laverya commented 5 years ago

The null value problem for forgeops is caused by the helm chart only populating the initContainers list if 'restore' is enabled, and leaving an empty list there otherwise - I'm adding a PR to fix that there (in addition to patching that set of values in ship, of course)

I haven't had the chance to dig into #801 yet, but I will soon!

wstrange commented 5 years ago

Thanks a bunch!!!