replicatedhq / ship

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

ship init: bufio.Scanner: token too long #812

Open wstrange opened 5 years ago

wstrange commented 5 years ago

When running ship init on a chart with a very large secret (approx a 122KB secret), ship init errors out with:

execute render step: execute plan: execute templating: unable to validate chart dir: failed to read lines from file .ship/tmp/chartrendered/openidm/templates/secrets.yaml: bufio.Scanner: token too long

Steps to reproduce the behavior

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

ebramanti commented 5 years ago

@wstrange This is due to this block, a Scanner is unable to read a single line of text greater than the MaxScanTokenSize.

If there is any way to multi-line this secret, that might be a temporary workaround. To actually resolve this it looks like a custom buffer will be needed.

wstrange commented 5 years ago

We are using a helm template to include the secrets:

{{ (.Files.Glob "secrets/*").AsSecrets| indent 2 }}

I'll have to see if there is some template magic that can multiline this...