You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…manifests (#2455)
Resolves#2367
This addresses an issue where a configmap or other k8s resource can contain script files that fails parsing by the envsubst library.
The specific issue that failed in this example was the envsubst attempting to replace ${BASH_REMATCH[1]} in a config map. This is likely a bug in the library since it was throwing an MissingClosingBrace error.
Background
k8s manifests DO NOT support any default templating language out of the box. To support environment variables you would read directly from a configmap / secret to reference those values.
Helm is a very popular package manager for k8s and supports a robust templating language. The templating language uses Go text templating language as its foundation with some additional features built on top.
Kustomize is another very popular way to provide customization on top of k8s manifests without templates.
It previously supported a vars feature that has now been deprecated and replaced by replacements.
Breaking Change
This commit would be considered a breaking change for AKS support. Prior to this update simple environment substitution was being performed on all *.yaml manifest files.
Blind replacement of any bash style variable could have unintended consequences and cause runtime error when variables are not available within azd environment.
Now, devs must opt-in by renaming there manifests to *.tmpl.yaml and have access to Go text templating within their manifests.
This feature would be considered an incremental journey towards a fully featured templating & packaging system like Helm since the syntax is the same. The templating syntax used here is the same as used in Helm)
In addition to the opt-in text templates k8s devs still have the ability to directly pull values from config maps / secrets as needed.
Output from
azd version
Describe the bug
azd deployment fails on mongodb configmap yaml
To Reproduce
use the attached mangodb configmap yaml and attempt to deploy with azd deploy and it fails with the following error message:
Expected behavior
azd deploy is expected to either handle the yaml file which is formatted properly
ratings-mongodb-configmap.yaml.txt
The text was updated successfully, but these errors were encountered: