Parameters
Template parameters​
Parameters let users customize specific parts of a template while keeping core settings consistent. When deploying resources from a parameterized template, the platform prompts users to enter values, which are injected into the Helm template using the .Values
syntax.
For example:
property: {{ .Values.exampleVariable }}
This lets users modify exampleVariable
during deployment.
Define parameters using the UI​
You can use the platform UI to add and organize parameters.
Click Add parameter in the template editor.
From the Section dropdown, choose or create a section (for example "Example Title") to group related parameters.
Enter a unique Identifier (variable). This is used as the variable key in the template (for example,
{{ .Values.variableName }}
).Select a Type for the parameter. Options include
String
,Number
,Boolean
,Password
,Multiline
.Provide a Label that describes the parameter in a readable way for end users.
Add a Description to explain what the parameter does.
Toggle the Required option if this parameter must be filled before deployment.
Use Allowed Options to limit user input to predefined values (e.g.,
some-value
,another-value
). Click + Add option to add more.Click Done to save the parameter.
Repeat these steps for each parameter. To delete a parameter, click the trash icon. To access advanced settings, use the Advanced... menu.
Use sections to group related parameters and improve the user experience during deployment.
YAML parameter definition​
Optionally, you can also define parameters directly in YAML. This can be useful for templates shared using Git or automated deployment workflows.
- variable: mylabelvalue
label: StatefulSet Label
description: Please select the value for the statefulset "my-label" key
options:
- one
- two
section: Labels
The platform renders this as a user input dialog when deploying the resource.
You can also use regular expression based validation for free-form fields:
- variable: anotherlabelvalue
label: AnImportantValue
description: Please enter this very important value
section: Important Values
required: true
validation: "^\w+{8,63}$"
Access parameter values in templates​
Access parameter values using Go template syntax:
labels:
my-label: "{{ .Values.mylabelvalue }}"
Platform-specific parameter values​
The platform also provides built-in parameter values based on the deployment context. These are available under the loft
key:
Context Object | Key | Description |
---|---|---|
Project | project | Name of the project that owns the deployment |
Space | space | Name of the space (if applicable) |
VirtualCluster | virtualClusterName | Name of the virtual cluster (if applicable) |
Cluster | cluster | Name of the physical Kubernetes cluster |
VirtualClusterNamespace | virtualClusterNamespace | Namespace of the virtual cluster |
You can use them in your template:
labels:
my-label: "{{ .Values.loft.virtualClusterName }}"