Fix Markdown rendering of indented code blocks (#814)

... by using plain indented code blocks instead of indented fenced
code blocks.

While here also fix list rendering and add missing Go template escaping
in inline `values` map example.

Signed-off-by: Stoned Elipot <stoned.elipot@gmail.com>
This commit is contained in:
stoned 2023-04-19 00:19:49 +02:00 committed by GitHub
parent 4aeb0ff6f2
commit b1f1d28fa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 28 deletions

View File

@ -111,40 +111,41 @@ releases:
``` ```
Release Templating supports the following parts of release definition: Release Templating supports the following parts of release definition:
- basic fields: `name`, `namespace`, `chart`, `version` - basic fields: `name`, `namespace`, `chart`, `version`
- boolean fields: `installed`, `wait`, `waitForJobs`, `verify` by the means of additional text - boolean fields: `installed`, `wait`, `waitForJobs`, `verify` by the means of additional text
fields designed for templating only: `installedTemplate`, `waitTemplate`, `verifyTemplate` fields designed for templating only: `installedTemplate`, `waitTemplate`, `verifyTemplate`
```yaml
# ... # ...
installedTemplate: '{{`{{ eq .Release.Namespace "kube-system" }}`}}' installedTemplate: '{{`{{ eq .Release.Namespace "kube-system" }}`}}'
waitTemplate: '{{`{{ eq .Release.Labels.tag "safe" | not }}`}}' waitTemplate: '{{`{{ eq .Release.Labels.tag "safe" | not }}`}}'
# ... # ...
```
- `set` block values: - `set` block values:
```yaml
# ... # ...
setTemplate: setTemplate:
- name: '{{`{{ .Release.Name }}`}}' - name: '{{`{{ .Release.Name }}`}}'
values: '{{`{{ .Release.Namespace }}`}}' values: '{{`{{ .Release.Namespace }}`}}'
# ... # ...
```
- `values` and `secrets` file paths: - `values` and `secrets` file paths:
```yaml
# ... # ...
valuesTemplate: valuesTemplate:
- config/{{`{{ .Release.Name }}`}}/values.yaml - config/{{`{{ .Release.Name }}`}}/values.yaml
secrets: secrets:
- config/{{`{{ .Release.Name }}`}}/secrets.yaml - config/{{`{{ .Release.Name }}`}}/secrets.yaml
# ... # ...
```
- inline `values` map: - inline `values` map:
```yaml
# ... # ...
valuesTemplate: valuesTemplate:
- image: - image:
tag: `{{ .Release.Labels.tag }}` tag: '{{`{{ .Release.Labels.tag }}`}}'
# ... # ...
```
Previously, we've been using YAML anchors for release template inheritance. Previously, we've been using YAML anchors for release template inheritance.
It turned out not work well when you wanted to nest templates for complex use cases and/or you want a fine control over which fields to inherit or not. It turned out not work well when you wanted to nest templates for complex use cases and/or you want a fine control over which fields to inherit or not.