ship icon indicating copy to clipboard operation
ship copied to clipboard

ship init: bufio.Scanner: token too long

Open wstrange opened this issue 5 years ago • 2 comments

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

  • Ship version: ...
ship version
{
    "version": "0.31.0",
    "buildTime": "2019-01-22T04:56:56Z"
}

Steps to reproduce the behavior

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

wstrange avatar Jan 30 '19 16:01 wstrange

@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.

ebramanti avatar Jan 31 '19 23:01 ebramanti

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...

wstrange avatar Feb 01 '19 00:02 wstrange