@@ -156,18 +156,17 @@ and also by using available environment variables in your scripts and [values](h
3. any [custom variable](https://docs.gitlab.com/ee/ci/variables/#for-a-project)
(ex: `${SECRET_TOKEN}` that you have set in your project CI/CD variables)
While your scripts may simply use any of those variables, your [values](https://helm.sh/docs/chart_best_practices/values/) files can use **variable substitution**
with the syntax `${VARIABLE_NAME}`.
Each of those patterns will be dynamically replaced in your files by the template right before using it.
#### Variables substitution mechanism (in values files)
> :warning:
>
> In order to be properly replaced, variables in your YAML value files shall be written with curly braces (ex: `${MYVAR}` and not `$MYVAR`).
> Multiline variables must be surrounded by double quotes and you might have to disable line-length rule of yamllint as they are rewritten on a single line.
While your scripts may freely use any of the available variables, your [values files](https://helm.sh/docs/chart_best_practices/values/)
can use a **variable substitution** mechanism implemented by the template:
- Using the syntax `${VARIABLE_NAME}` or `%{VARIABLE_NAME}`.
:warning: Curly braces (`{}`) are mandatory in the expression (`$VARIABLE_NAME` won't be processed).
- Each of those expressions will be **dynamically expanded** in your resource files with the variable value, right before being used.
- Variable substitution expressions **must be contained in double-quoted strings**.
The substitution implementation takes care of escaping characters that need to be (double quote `"`, backslash `\`, tab `\t`, carriage return `\n` and line feed `\r`).
- Variable substitution can be prevented by appending `# nosubst` at the end of any line.