github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/helm/templates/storageprovider/obs.yaml (about) 1 # obs is a storage provider for [Huawei OBS](https://www.huaweicloud.com/product/obs.html) object storage. 2 apiVersion: storage.kubeblocks.io/v1alpha1 3 kind: StorageProvider 4 metadata: 5 name: obs 6 labels: 7 {{- include "kubeblocks.labels" . | nindent 4 }} 8 spec: 9 csiDriverName: ru.yandex.s3.csi 10 csiDriverSecretTemplate: | 11 accessKeyID: {{ `{{ index .Parameters "accessKeyId" }}` }} 12 secretAccessKey: {{ `{{ index .Parameters "secretAccessKey" }}` }} 13 {{ `{{- $region := index .Parameters "region" }}` }} 14 {{ `{{- $endpoint := index .Parameters "endpoint" }}` }} 15 {{ `{{- if not $endpoint }}` }} 16 {{ `{{- $endpoint = (printf "https://obs.%s.myhuaweicloud.com" $region) }}` }} 17 {{ `{{- end }}` }} 18 endpoint: {{ `{{ $endpoint }}` }} 19 20 storageClassTemplate: | 21 provisioner: ru.yandex.s3.csi 22 parameters: 23 mounter: geesefs 24 # you can set mount options here, for example limit memory cache size (recommended) 25 options: {{ `{{ printf "--memory-limit 1000 --dir-mode 0777 --file-mode 0666 %s --subdomain" (index .Parameters "mountOptions") }}` }} 26 bucket: {{ `{{ index .Parameters "bucket" }}` }} 27 csi.storage.k8s.io/provisioner-secret-name: {{ `{{ .CSIDriverSecretRef.Name }}` }} 28 csi.storage.k8s.io/provisioner-secret-namespace: {{ `{{ .CSIDriverSecretRef.Namespace }}` }} 29 csi.storage.k8s.io/controller-publish-secret-name: {{ `{{ .CSIDriverSecretRef.Name }}` }} 30 csi.storage.k8s.io/controller-publish-secret-namespace: {{ `{{ .CSIDriverSecretRef.Namespace }}` }} 31 csi.storage.k8s.io/node-stage-secret-name: {{ `{{ .CSIDriverSecretRef.Name }}` }} 32 csi.storage.k8s.io/node-stage-secret-namespace: {{ `{{ .CSIDriverSecretRef.Namespace }}` }} 33 csi.storage.k8s.io/node-publish-secret-name: {{ `{{ .CSIDriverSecretRef.Name }}` }} 34 csi.storage.k8s.io/node-publish-secret-namespace: {{ `{{ .CSIDriverSecretRef.Namespace }}` }} 35 36 datasafedConfigTemplate: | 37 [storage] 38 type = s3 39 provider = HuaweiOBS 40 env_auth = false 41 access_key_id = {{ `{{ index .Parameters "accessKeyId" }}` }} 42 secret_access_key = {{ `{{ index .Parameters "secretAccessKey" }}` }} 43 region = {{ `{{ index .Parameters "region" }}` }} 44 endpoint = {{ `{{ printf "obs.%s.myhuaweicloud.com" .Parameters.region }}` }} 45 root = {{ `{{ index .Parameters "bucket" }}` }} 46 chunk_size = 50Mi 47 48 parametersSchema: 49 openAPIV3Schema: 50 type: "object" 51 properties: 52 region: 53 type: string 54 description: "OBS region, e.g. cn-north-4" 55 bucket: 56 type: string 57 description: "OBS bucket" 58 endpoint: 59 type: string 60 description: "OBS endpoint (optional)" 61 mountOptions: 62 type: string 63 description: "mount options for geesefs" 64 accessKeyId: 65 type: string 66 description: "OBS access key" 67 secretAccessKey: 68 type: string 69 description: "OBS secret key" 70 71 required: 72 - bucket 73 - region 74 - accessKeyId 75 - secretAccessKey 76 77 credentialFields: 78 - accessKeyId 79 - secretAccessKey