CCE.StatefulSet
Element Description
The CCE.StatefulSet element is used to create stateful services for a Huawei CCE cluster.
Element Properties
Property |
Required |
Descripiton |
---|---|---|
namespace |
No |
Namespace in a cluster where a resource is located Type: string Value Description: Must be a valid namespace in the cluster, for example, default. Value Constraint: The value must start with a letter. Only lowercase letters, digits, and hyphens (-) are allowed. Suggestion: Log in to the CCE console, and choose Resource Management > Namespaces. View and select the target namespace. |
k8sManifest |
Yes |
Native manifest of the StatefulSet object of the Kubernetes Type: dict Value Description: This field can be customized. You are advised to use a public image (uploading an image to SWR and setting the image type to public). When updating the image, do not change the name and labels under metadata. If replicas under spec is specified using a get_input function, set type to integer. Value Constraint: This field cannot be empty. Suggestion: Customize the value. For details, visit https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/. |
clusterId |
No |
ID of the CCE cluster to which the resource belongs (the cluster version must be 1.7 or later) Type: HuaweiCloud.CCE.Cluster.Id Value Description: Indicates the ID of an existing or new container cluster. Value Constraint: The value must satisfy the UUID rule and support a maximum of 64 characters. Suggestion: Enter the cluster ID. Specifically, log in to the CCE console, and choose Resource Management > Clusters. Click the target cluster, and you can then obtain its cluster ID. Connect to the cluster object and use the get_reference function to obtain the cluster ID. |
Relationships Between Elements
Description |
Target |
---|---|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
DependsOn |
|
ContainedIn |
Return Value
Property |
Type |
Description |
---|---|---|
refName |
string |
Name of a stateful service |
refLabelsApp |
string |
Name of label app |
Blueprint Example
tosca_definitions_version: huaweicloud_tosca_version_1_0 inputs: statefulset-image-addr: default: "*.*.*.*:20202/***/redis:V1" description: "StatefulSet used image address." node_templates: ccess2u6: type: HuaweiCloud.CCE.StatefulSet properties: k8sManifest: kind: StatefulSet spec: replicas: 1 serviceName: statefulsettest template: spec: imagePullSecrets: - name: default-secret containers: - image: get_input: statefulset-image-addr terminationMessagePath: '/dev/termination-log' ports: - containerPort: 80 protocal: TCP name: mystatefulset-123 imagePullPolicy: IfNotPresent metadata: labels: app: statefulsettest name: mystatefulset selector: matchLabels: app: statefulsettest apiVersion: 'apps/v1' metadata: labels: 'cce/appgroup': mystatefulset name: statefulsettest
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot