Updated on 2023-08-11 GMT+08:00

CCE.Storage.EVS

Element Description

The CCE.Storage.EVS element corresponds to an Elastic Volume Service (EVS) disk under CCE storage management. This type of resources must be used together with CCE clusters.

Element Properties

Table 1 Property Description

Property

Required

Descripiton

size

No

Storage space size, in GB. The default value is 80.

Type: integer

Default: 10

Value Constraint: From 1 to 511800.

Suggestion: Set the value based on specifications and requirements.

availabilityZone

Yes

AZ where the node is located

Type: HuaweiCloud.ECS.AvailabilityZone.Name

Value Description: Indicates the AZ where the to-be-created ECS is located. The name of the AZ needs to be specified, for example, cn-north-1a. See the Regions and Endpoints.

Value Constraint: The value varies depending on the belonged region. For details, visit https://developer-intl.huaweicloud.com/en-us/endpoint.

Suggestion: Use the get_input function to pass this parameter. Its value can then be automatically selected when you create a stack on the AOS console. For details about the AZ of each region, visit https://developer-intl.huaweicloud.com/en-us/endpoint.

k8sManifest

No

K8s-native manifest object of the EVS, based on which you can create EVS resources to replace other configuration items

Type: dict

Value Constraint: The value must meet the Kubernetes specifications.

Suggestion: For details, see the sample or CCE documentation.

name

No

Name of the CCE EVS file system, which is mounted to the container

Type: string

Value Constraint: The value contains 1 to 24 characters and must start with a letter and end with a digit. Only lowercase letters, digits, and hyphens (-) are allowed. The following regular specification must be met: (^$)|(^[a-z]([-a-z0-9]*[a-z0-9])?$)".

Suggestion: None

clusterId

No

ID of the cluster which is associated with the SFS file system

Type: HuaweiCloud.CCE.Cluster.Id

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.

volumeId

No

the existing volume id which need mount

Type: string

Value Description: Supports customization.

Value Constraint: The value must satisfy the UUID rule and support a maximum of 64 characters.

Suggestion: None

diskType

Yes

disk type

Type: HuaweiCloud.EVS.Volume.Type.Name

Value Description: Supports customization.

Value Constraint: SATA: common I/O EVS disks; SAS: high I/O EVS disks; SSD: ultra-high I/O EVS disks

Suggestion: None

deleteVolume

No

delete volume resource when delete pvc

Type: boolean

Default: False

Value Constraint: Supports true false

Suggestion: None

namespace

No

Namespace in a cluster where a resource is located

Type: string

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.

Relationships Between Elements

Table 2 Relationship description

Description

Target

DependsOn

AOS.Batch

DependsOn

DCS.Redis

DependsOn

RDS.MySQL

DependsOn

CCE.Storage.EVS

DependsOn

OBS.Bucket

DependsOn

CCE.Storage.SFS

DependsOn

CCE.ConfigMap

DependsOn

CCE.Job

DependsOn

CCE.Storage.OBS

DependsOn

CCE.DaemonSet

DependsOn

CCE.Secret

DependsOn

CCE.Service

DependsOn

CCE.Ingress

DependsOn

CCE.StatefulSet

DependsOn

CCE.NodePool

DependsOn

CCE.Deployment

DependsOn

CCE.Pod

DependsOn

RDS.PostgreSQL

ContainedIn

CCE.Cluster

Return Value

Property

Type

Description

status

string

Status of the EVS file system

clusterId

string

ID of the cluster which is associated with the EVS file system

refID

string

UID of the EVS file system

refName

string

Name of the EVS file system

Blueprint Example

Example 1:

tosca_definitions_version: huaweicloud_tosca_version_1_0
inputs:
  storage-name:
    default: my-evc-storage
  size:
    default: 100  
node_templates:
  my-storage:
    type: HuaweiCloud.CCE.Storage.EVS
    properties:
      name: {get_input: storage-name}
      size: {get_input: size}
      diskType: SATA

Example 2: Custom K8s Manifest for Orchestration

  • For clusters of version 1.15, the example configuration of the YAML file is as follows:
    tosca_definitions_version: huaweicloud_tosca_version_1_0 
    node_templates:
      my-storage:
        type: HuaweiCloud.CCE.Storage.EVS
        properties:
          apiVersion: v1
          kind: PersistentVolumeClaim
          metadata:
            labels:
              failure-domain.beta.kubernetes.io/region: cn-north-1
              failure-domain.beta.kubernetes.io/zone: cn-north-1a
            annotations:
              everest.io/disk-volume-type: SATA
            name: cce-evs-k7yigsvm-1nku
            namespace: default
          spec:
            accessModes:
            - ReadWriteOnce
            resources:
              requests:
                storage: 10Gi
            storageClassName: csi-disk
  • For clusters of version 1.13 or earlier, the example configuration of the YAML file is as follows:
    tosca_definitions_version: huaweicloud_tosca_version_1_0
    node_templates:
      my-storage:
        type: HuaweiCloud.CCE.Storage.EVS
        properties:
          apiVersion: v1
          kind: PersistentVolumeClaim
          metadata:
            labels:
              failure-domain.beta.kubernetes.io/region: cn-north-1
              failure-domain.beta.kubernetes.io/zone: cn-north-1a
            annotations:
              volume.beta.kubernetes.io/storage-class: sata
              volume.beta.kubernetes.io/storage-provisioner: flexvolume-huawei.com/fuxivol
            name: cce-evs-k7yigsvm-1nku
            namespace: default
          spec:
            accessModes:
            - ReadWriteOnce
            resources:
              requests:
                storage: 10Gi