-
Notifications
You must be signed in to change notification settings - Fork 273
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
0.13: [Bug]: deploy actions resolve template strings in manifests in a way that breaks for multi-line strings #5266
Labels
Comments
I recently ran into this and had to b64 encode some jwt tokens, would be nice to get this fixed |
stefreak
added a commit
that referenced
this issue
Dec 12, 2024
…anifest files Template strings in Kubernetes manifest files are partially resolved for legacy reasons. The partial resolve behaviour has been changed to improve sanity in #6685 but for kubernetes manifest files, we need to have a version of the old behaviour. The expected legacy behaviour looks like this: - If template strings reference variables that do not exist there is no error - If a template string contains multiple template expressions, each expression can be partially resolved. - Template expressions are evaluated before parsing yaml, which means that valid yaml with template expressions can be resolved to invalid yaml (e.g. if variable values contain special characters) This legacy behaviour can lead to quite some surprises and UX problems, for example #5266 I would suggest that we remove this functionality in 0.14.
github-merge-queue bot
pushed a commit
that referenced
this issue
Dec 12, 2024
…anifest files (#6713) * fix(template): establish backwards bug-compatibility for kubernetes manifest files Template strings in Kubernetes manifest files are partially resolved for legacy reasons. The partial resolve behaviour has been changed to improve sanity in #6685 but for kubernetes manifest files, we need to have a version of the old behaviour. The expected legacy behaviour looks like this: - If template strings reference variables that do not exist there is no error - If a template string contains multiple template expressions, each expression can be partially resolved. - Template expressions are evaluated before parsing yaml, which means that valid yaml with template expressions can be resolved to invalid yaml (e.g. if variable values contain special characters) This legacy behaviour can lead to quite some surprises and UX problems, for example #5266 I would suggest that we remove this functionality in 0.14. * test: fix running tests on macos this commit fixes the "cannot find dockerfile" error that plagued us on macos * test: add integ tests for legacyAllowPartial behaviour in kubernetes manifests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Garden Bonsai (0.13) Bug
Current Behavior
Error cannot parse yaml with multiline string in variable templated to a manifest file
Expected behavior
Should work.
Reproducible example
manifest:
deploy action:
Workaround
Works with inline manifest
Suggested solution(s)
Resolve variables after parsing
Additional context
Your environment
garden version
latest mainThe text was updated successfully, but these errors were encountered: