Chart ceph-csi-cephfs
doesn't support encryption #4470
Open
Description
opened on Mar 3, 2024
Describe the bug
The helm chart ceph-csi-cephfs
doesn't support encryption out of the box.
- It doesn't contain the volume mount for the encryption configuration as per the RBD one
- It is lacking
configmap/read
permission and POD_NAMESPACE envvar to read config directly (not sure this is still the way to go)
Environment details
- Image/version of Ceph CSI driver :
quay.io/cephcsi/cephcsi:v3.10.2
- Helm chart version :
3.10.2
- Kernel version :
N/D
- Mounter used for mounting PVC (for cephFS its
fuse
orkernel
. for rbd its
krbd
orrbd-nbd
) :rbd-nbd
- Kubernetes cluster version :
1.26
- Ceph cluster version :
17.2.7 quincy (stable)
Steps to reproduce
Steps to reproduce the behavior:
- Install the chart
- Create a custom storageClass with encryption, for example
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: cephfs-encrypted provisioner: cephfs.csi.ceph.com parameters: clusterID: {{ .Values.ceph.storageClass.clusterID }} csi.storage.k8s.io/controller-expand-secret-name: csi-cephfs-secret csi.storage.k8s.io/controller-expand-secret-namespace: {{ .Release.Namespace }} csi.storage.k8s.io/node-stage-secret-name: csi-cephfs-secret csi.storage.k8s.io/node-stage-secret-namespace: {{ .Release.Namespace }} csi.storage.k8s.io/provisioner-secret-name: csi-cephfs-secret csi.storage.k8s.io/provisioner-secret-namespace: {{ .Release.Namespace }} csi.storage.k8s.io/fstype: ext4 fsName: encrypted encrypted: "true" encryptionKMSID: "kubernetes" reclaimPolicy: Delete volumeBindingMode: Immediate allowVolumeExpansion: true mountOptions: - debug --- apiVersion: v1 kind: ConfigMap data: kubernetes: |- { "encryptionKMSType": "metadata", "secretName": "cephfs-encryption-passphrase", "secretNamespace": "{{ .Release.Namespace}}" } metadata: name: csi-kms-connection-details --- apiVersion: v1 stringData: encryptionPassphrase: mypassphrase kind: Secret metadata: name: cephfs-encryption-passphrase type: Opaque
- Create a PVC with that
storageClass
Actual results
The PVC cannot be created due to missing envvar POD_NAMESPACE
. Once added, it creates it, but the nodeplugin cannot mount it due envvar and configmap access denied.
Expected behavior
The PVC gets created and can be mounted by nodeplugin.
Logs
Omitted
Additional context
N/A
Activity