mirror of
https://github.com/truenas/charts.git
synced 2026-02-03 02:23:49 +08:00
* 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
1.8 KiB
1.8 KiB
Questions.yaml structure
This file have some top level attributes:
- Groups
- Portals
- Questions
Groups
Groups can be defined to "group" questions together. This is useful when you have a lot of questions and want to split them into logical groups.
groups:
- name: "Group 1"
description: "Description of group 1"
- name: "Group 2"
description: "Description of group 2"
nameis what will be used to reference the group in thequestions.yamlfile.descriptionis a what will be displayed in the UI.
Groups can only be referenced by the top level variables in
questionsattribute.
Portals
Portals can be defined to display a button on the UI that will open a new tab to a specific URL.
portals:
button_name:
protocols:
- https
host:
- example.com
ports:
- 443
path: /path/to/something
You can define more than 1 portal. But the name of the portal must be unique.
Portals support some variables that can be used to dynamically generate the URL.
$variable-VARIABLE_NAME.NESTED_VARIABLE_NAMEwill be replaced by the value of the variableNESTED_VARIABLE_NAMEunder the variableVARIABLE_NAME. (Variables are defined in thequestionsattribute)$kubernetes-resource_configmap.RESOURCE_NAME.RESOURCE_KEYwill be replaced by the value of the keyRESOURCE_KEYin the configmap namedRESOURCE_NAME.$node_ipwill be replaced by the IP of the node where the app is running.
Questions
Questions are the main attribute of the questions.yaml file. It is used to define the questions that will be displayed in the UI.
questions:
- variable: variable_name
label: Friendly Name
group: "Group 1"
description: "Description of the variable"
schema:
type: string
default: "something"