Files
chart/docs/schema/dict.md
Stavros Kois 42ea4d99ed NAS-118965 / 23.10 / Update documentation (#998)
* update *.md formatting

* upgrade string schema

* add some extra fields

* add some extra options

* add int

* full variable expample

* add boolean

* expand

* add dict

* typo

* add list

* more docs

* add show_if operators

* change description

* add some notes
2023-04-12 15:53:22 +03:00

29 lines
1.9 KiB
Markdown

# Dict Schema
## Example of dict schema options
```yaml
- variable: dict_variable
label: Dict Variable
description: Description of dict variable
schema:
type: dict
additional_attrs: true
show_if: [[ "some_variable", "=", "some_value" ]]
attrs:
- variable: string_variable
label: String Variable
description: Description of string variable
schema:
type: string
```
Following attributes can be added to `dict` schema to enforce validation when a chart release is being created/edited:
Those attributes are set in the schema during the chart development and are not user configurable.
| Attribute | Type | Default | Description |
| :----------------- | :----------: | :-----: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `additional_attrs` | `boolean` | `false` | When set to `true`, allows additional variables to be added. |
| `attrs` | `dict` | unset | Define variables within the dict |
| `show_if` | `expression` | unset | When set to an [expression](show_if.md#expression-syntax) that evaluates to true, it will make the variable visible and effective. If it evaluates to false, it will be hidden and it won't be passed to the helm chart |