Updated on 2025-07-10 GMT+08:00

Overview

A component template is a specification file that describes ServiceStage components and defines resources (such as ConfigMaps, Secrets, and Services) and configurations required for component running.

You can use a component template to provision components, resources required for component running, and configuration files to quickly create and upgrade components.

This practice provides the component template package template-package-demo.zip and image package demo-app.tar. Table 1 describes the component template files contained in the component template package. The image package is the source of the component package for creating and deploying components and is defined by the image field in the deployment.yaml file in Table 1.

For details, see Component Template Description.

Table 1 Component template file description

Template File

Description

spec.yaml

Definition file, which describes the component file location and Kubernetes creation sequence. The file name cannot be changed.

variables.yaml

Variable file, which declares the variable information contained in the template package. The file name cannot be changed.

values.yaml

Value file, which contains the default values of variables. The file name cannot be changed.

comp_demo

Directory where the component file is located. The directory name is specified by spec.yaml.

comp_demo/ss-config.yaml

Configuration file definition. The file name can be customized.

comp_demo/ss-component.yaml

Component definition. The file name can be customized.

comp_demo/deployment.yaml

Kubernetes resource definition. The file name can be customized.

comp_demo/configmap.yaml

comp_demo/hpa.yaml

comp_demo/role.yaml

comp_demo/rolebinding.yaml

comp_demo/secret.yaml

comp_demo/service.yaml

comp_demo/service-account.yaml

This practice describes how to use a component template to quickly create and upgrade components.