UNCLASSIFIED - NO CUI

Bug: Base templates add strange newlines

The specific spot this issue was identified is with the script/cypress base templates. When using the base template and the secretEnvs values like so:

          secretEnvs:
            - name: cypress_adminpassword
              valueFrom:
                secretKeyRef:
                  name: gitlab-gitlab-initial-root-password
                  key: password

The templating added an odd newline and the resulting yaml came out as:

      env:
        -
          name: cypress_adminpassword
          valueFrom:
            secretKeyRef:
              key: password
              name: gitlab-gitlab-initial-root-password

While Helm is lenient and lets this work, Flux is more strict. This issue did not occur with the overrides template. Unsure of the actual cause or how many values this might affect in the templating, but I would suggest:

  • do we need extra trimming or similar?
  • does the override do something special that trims newlines for us?