Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use template functions to quote env vars #170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mcquinne
Copy link
Contributor

This allows helm to intelligently quote env var values, e.g. in order to pass json arrays as values

What I am changing

  • The way that helm-chart/eoapi/templates/services/configmap.yaml was rendering envValues prevented it from handling strings representing JSON arrays, which are used in several places for eoapi services.
  • For example, setting TIPG_DB_SCHEMAS: '["public", "pgstac"]' as described in the docs results in:
    • Error: UPGRADE FAILED: YAML parse error on eoapi/templates/services/configmap.yaml: error converting YAML to JSON: yaml: line 8: did not find expected key

How I did it

  • Using the builtin quote template function intelligently quotes input strings to prevent repeated, unescaped double-quotes

How you can test it

  • Set TIPG_DB_SCHEMAS: '["public", "pgstac"]' in values.yaml under vector.settings.envVars and run make deploy

Related Issues

  • N/A

This allows helm to intelligently quote env var values, e.g. in order to pass json arrays as values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants