Updated on 2023-12-13 GMT+08:00

CCE.Storage.OBS

Element Description

The CCE.Storage.OBS element corresponds to object storage volumes in the CCE storage management function. This type of resources must be used together with CCE clusters.

Element Properties

Table 1 Property Description

Property

Required

Descripiton

k8sManifest

No

K8s-native manifest object of the OBS, based on which you can create OBS 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

PVC name

Type: string

Value Description: Supports customization.

Value Constraint: Each PVC name must be unique in a namespace. The value must contain 1 to 24 characters and meet the following requirement: (^$) | (^[a-z] ([-a-z0-9]*[a-z0-9])?$).

Suggestion: Customize the value.

clusterId

No

ID of the cluster to which the resource belongs

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. Leave it blank, and specify the ID on the AOS console when creating a stack.

namespace

No

Namespace of the cluster to which the resource belongs

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: Customize the value based on the existing cluster or the cluster to be created.

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

deleteVolume

No

delete volume resource when delete pvc

Type: boolean

Default: False

Value Constraint: Supports true false

Suggestion: None

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

clusterId

string

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

refID

string

UID of the OBS file system

refName

string

Name of the OBS file system

Blueprint Example

Example 1:

tosca_definitions_version: huaweicloud_tosca_version_1_0
inputs:
  storage-name:
    default: my-evc-storage
node_templates:
  my-storage:
    type: HuaweiCloud.CCE.Storage.OBS
    properties:
      name: {get_input: storage-name}

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.OBS
        properties:
          apiVersion: v1
          kind: PersistentVolumeClaim
          metadata:
            annotations:
              everest.io/obs-volume-type: STANDARD
            name: cce-obs-k7yhr36u-iuu9
            namespace: default
          spec:
            accessModes:
            - ReadWriteMany
            resources:
              requests:
                storage: 1Gi
            storageClassName: csi-obs
  • 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.OBS
        properties:
          apiVersion: v1
          kind: PersistentVolumeClaim
          metadata:
            annotations:
              volume.beta.kubernetes.io/storage-class: obs-standard
              volume.beta.kubernetes.io/storage-provisioner: flexvolume-huawei.com/fuxiobs
            name: cce-obs-k7yhr36u-iuu9
            namespace: default
          spec:
            accessModes:
            - ReadWriteMany
            resources:
              requests:
                storage: 10Gi