github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/helm/templates/addons/csi-s3-addon.yaml (about) 1 apiVersion: extensions.kubeblocks.io/v1alpha1 2 kind: Addon 3 metadata: 4 name: csi-s3 5 labels: 6 {{- include "kubeblocks.labels" . | nindent 4 }} 7 "kubeblocks.io/provider": community 8 {{- if .Values.keepAddons }} 9 annotations: 10 helm.sh/resource-policy: keep 11 {{- end }} 12 spec: 13 description: Container Storage Interface (CSI) driver for S3 volumes 14 type: Helm 15 16 helm: 17 {{- include "kubeblocks.addonChartLocationURL" ( dict "name" "csi-s3" "version" (default .Chart.Version .Values.versionOverride) "values" .Values) | indent 4 }} 18 {{- include "kubeblocks.addonChartsImage" . | indent 4 }} 19 20 installOptions: 21 {{- if hasPrefix "oci://" .Values.addonChartLocationBase }} 22 version: {{ default .Chart.Version .Values.versionOverride }} 23 {{- end }} 24 25 installValues: 26 secretRefs: 27 - name: {{ include "kubeblocks.fullname" . }}-cloud-provider 28 key: csi-s3 29 30 {{- $cloudProvider := (include "kubeblocks.cloudProvider" .) }} 31 {{- if eq $cloudProvider "huaweiCloud" }} 32 setValues: 33 - kubeletPath=/mnt/paas/kubernetes/kubelet 34 {{- end }} 35 36 valuesMapping: 37 jsonMap: 38 tolerations: tolerations 39 extras: 40 - name: daemonset 41 jsonMap: 42 tolerations: daemonsetTolerations 43 44 defaultInstallValues: 45 - enabled: true 46 {{- with .Values.tolerations }} 47 tolerations: {{ toJson . | quote }} 48 {{- end }} 49 50 installable: 51 {{- $autoInstall := (get ( get ( .Values | toYaml | fromYaml ) "csi-s3" ) "enabled") }} 52 {{- /* auto install csi-s3 if it's required by backup repos */ -}} 53 {{- if .Values.backupRepo.create }} 54 {{- if eq .Values.backupRepo.accessMethod "Mount" }} 55 {{- if eq .Values.backupRepo.storageProvider "s3" "oss" "minio" "obs" "cos" "gcs" }} 56 {{- $autoInstall = true }} 57 {{- end }} 58 {{- end }} 59 {{- end }} 60 autoInstall: {{ $autoInstall }}