Use volume ID as a prefix if the bucket is fixed in the storage class

With this, each volume will get its own prefix within the bucket if it
is configured in the storage class. This also ensures backwards
compatibility with older volumes that have been created in earlier
versions of csi-s3.
This commit is contained in:
Cyrill Troxler 2021-04-05 15:07:16 +02:00
parent 1b154cd051
commit 9ee2e2c977
17 changed files with 195 additions and 117 deletions

View file

@ -81,7 +81,8 @@ spec:
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: ctrox/csi-s3:v1.1.1
image: ctrox/csi-s3:dev
imagePullPolicy: Never
args:
- "--endpoint=$(CSI_ENDPOINT)"
- "--nodeid=$(NODE_ID)"

View file

@ -8,6 +8,8 @@ parameters:
# specify which mounter to use
# can be set to rclone, s3fs, goofys or s3backer
mounter: rclone
# to use an existing bucket, specify it here:
# bucket: some-existing-bucket
csi.storage.k8s.io/provisioner-secret-name: csi-s3-secret
csi.storage.k8s.io/provisioner-secret-namespace: kube-system
csi.storage.k8s.io/controller-publish-secret-name: csi-s3-secret

View file

@ -87,7 +87,8 @@ spec:
- name: socket-dir
mountPath: /var/lib/kubelet/plugins/ch.ctrox.csi.s3-driver
- name: csi-s3
image: ctrox/csi-s3:v1.1.1
image: ctrox/csi-s3:dev
imagePullPolicy: Never
args:
- "--endpoint=$(CSI_ENDPOINT)"
- "--nodeid=$(NODE_ID)"

View file

@ -1,12 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
namespace: kube-system
name: csi-s3-secret
stringData:
accessKeyID: <YOUR_ACCESS_KEY_ID>
secretAccessKey: <YOUR_SECRET_ACCES_KEY>
# For AWS set it to "https://s3.<region>.amazonaws.com"
endpoint: https://s3.eu-central-1.amazonaws.com
# If not on S3, set it to ""
region: <S3_REGION>