Skip to content

Chart ceph-csi-cephfs doesn't support encryption #4470

Open
@acolombier

Description

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 or kernel. for rbd its
    krbd or rbd-nbd) : rbd-nbd
  • Kubernetes cluster version : 1.26
  • Ceph cluster version : 17.2.7 quincy (stable)

Steps to reproduce

Steps to reproduce the behavior:

  1. Install the chart
  2. 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
  3. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions