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