- Documentation
Code Pipeline
User guide
Application delivery (K8s YAML and OAM)
Application orchestration
K8s YAML
Use placeholders and variables
K8s YAML
Use placeholders and variables
Use placeholders and variables
The system provides system image placeholders, preset placeholders, and custom placeholders to help you quickly orchestrate applications. This article introduces features related to placeholders and explains how to use placeholders and variables.
Background information
- Users can dynamically specify the target image address at runtime, making it easier to upgrade application images, perform differentiated deployment across multiple environments, and address other similar scenarios.
- A preset placeholder is a system-defined placeholder. The value of a preset placeholder cannot be modified.
- Custom placeholders are placeholders set by the user. A value source can be a variable (system preset parameter, custom parameter) or a constant. By using custom placeholders together with variables, you can achieve differentiated deployment of application orchestration across different environments.
- The system provides commonly used custom placeholders by default, such as namespace, port, and replicas, and has already preset recommended default values. You can add, modify, or delete custom placeholders as needed.
Prerequisites
- The environment has been created. This example creates development environment 1 and test environment 1.
- The variables have already been created in advance. This example creates the custom parameter Label.
Procedure
The following takes adding a custom placeholder label to enable different Deployment labels for development and test environments as an example:
- Log in to the current application.
- Select workspace in the left navigation bar.
- Click the target workspace name to enter the selected workspace.
- Select Application Delivery > Application Management in the left navigation bar.
- Click the target application card to open the selected application.
- Click Application Orchestration. Switch to the Application Orchestration tab.
- Click edit to enter the application orchestration page.
- In the YAML editing area, enter run: "{{ .Values.label }} " below the metadata.labels.run parameter.
- Click Extract placeholder, and the custom placeholder area on the right will display the newly added custom placeholder label.
- Set the information for the custom placeholder label.
- Click Confirm, and set the active environment in the pop-up dialog box. In this example, development environment 1 and test environment 1, which were created in advance, are selected.
- After completing the settings, click Create.
What to do next
Enable the custom configuration parameter Label in development environment 1 and assign it the value aaa, and in test environment 1 and assign it the value bbb. In other words, this is a set of configurations, each arranged in a different environment with distinct Deployment labels. When deploying development environment 1, assign aaa to label; when deploying test environment 1, assign bbb to label.
Last updated: 2025.09.10 17:37:26