Manage configuration templates

更新时间:
复制 MD 格式

When multiple applications or environments share common configuration data -- database connection strings, feature flags, environment variables, or credentials -- re-entering the same settings for each deployment is error-prone and time-consuming. Enterprise Distributed Application Service (EDAS) configuration templates let you save this data once and import it to facilitate application configuration management (ACM) and Kubernetes cluster configuration.

Supported template formats

Configuration templates support the following data formats:

FormatTypical use
JSONStructured configuration, API responses
XMLLegacy application settings
YAMLKubernetes-native configuration
PropertiesJava application settings
Custom textFree-form configuration files
Key-value pairSimple environment variables

Prerequisites

Before you begin, make sure that you have:

  • An Alibaba Cloud account with EDAS activated

  • Permissions to manage Kubernetes configurations in EDAS

Create a configuration template

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Kubernetes Configurations > Configuration Template.

  3. On the Template Configuration Management page, click Create configuration template.

  4. In the Create configuration template panel, configure the following parameters and click Yes.

After creation, the template name appears on the Template Configuration Management page.

Verify the result

On the Template Configuration Management page, confirm that the new template is listed. Click Edit to review the template content and verify it matches your intended configuration.

Modify a configuration template

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Kubernetes Configurations > Configuration Template.

  3. On the Template Configuration Management page, find the target template and click Edit in the operation column.

  4. In the panel that appears, update the parameters and click Yes.

Delete a configuration template

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Kubernetes Configurations > Configuration Template.

  3. On the Template Configuration Management page, find the target template and click Delete in the operation column.

  4. In the confirmation dialog, click Yes.

Quotas and limits

ItemLimit
Template file size1,024 KB
Template name uniquenessEach template name must be unique across all templates
Supported formatsJSON, XML, YAML, Properties, custom text, key-value pair

Use templates in Kubernetes workloads

After you create configuration templates, import them into Kubernetes workloads:

  • ConfigMap: When you set up a ConfigMap for an application, import a template to populate non-sensitive configuration data such as environment variables or application settings.

  • Secret: When you set up a Secret for an application, import a template to populate sensitive data such as API keys or database passwords.

Note

In Kubernetes, ConfigMaps store non-sensitive configuration data. Secrets store sensitive data such as passwords and API keys. Choose the appropriate type based on data sensitivity.

For more information about deploying applications with Kubernetes configurations, see the EDAS application deployment documentation.