Commit f3ff4f75 authored by Vitaliy Filippov's avatar Vitaliy Filippov
Browse files

Fix Helm templates for empty bucket parameter

parent 6331bb84
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -11,7 +11,9 @@ provisioner: ru.yandex.s3.csi
parameters:
  mounter: geesefs
  options: "{{ .Values.storageClass.mountOptions }}"
{{- if .Values.storageClass.singleBucket }}
  bucket: "{{ .Values.storageClass.singleBucket }}"
{{- end }}
  csi.storage.k8s.io/provisioner-secret-name: {{ .Values.secret.name }}
  csi.storage.k8s.io/provisioner-secret-namespace: {{ .Release.Namespace }}
  csi.storage.k8s.io/controller-publish-secret-name: {{ .Values.secret.name }}
+2 −2
Original line number Diff line number Diff line
@@ -47,8 +47,8 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
	prefix := ""

	// check if bucket name is overridden
	if nameOverride, ok := params[mounter.BucketKey]; ok {
		bucketName = nameOverride
	if params[mounter.BucketKey] != "" {
		bucketName = params[mounter.BucketKey]
		prefix = volumeID
		volumeID = path.Join(bucketName, prefix)
	}