### Update April 2024
We now need this functionality to support {T362788} so it seems best to use this ticket to track the remaining work to get the persistent volumes working in dse-k8s.
=== **User Story**
>==== As a Wikimedia engineer, I want to be able to deploy a stateful application using the Persistent Volume Claim Kubernetes object so that I can ensure the application's data remains persistent even if the pod or container running the application is deleted or recreated.
### Implementation Plan
We will be following the guidance outlined here: https://docs.ceph.com/en/reef/rbd/rbd-kubernetes
The required steps are:
[x] Build a compatible version of the [[https://github.com/ceph/ceph-csi/|ceph-csi container image]] using blubber/kokkuri: https://gitlab.wikimedia.org/repos/data-engineering/ceph-csi
[] Create (or designate) a Ceph pool for use with the Container Storage Interface (CSI) : [[https://docs.ceph.com/en/reef/rbd/rbd-kubernetes/#create-a-pool|create-a-pool]]
[] Setup Ceph client authentication for the CSI: [[https://docs.ceph.com/en/reef/rbd/rbd-kubernetes/#setup-ceph-client-authentication|#setup-ceph-client-authentication]]
[] Generate a Ceph CSI ConfigMap object in dse-k8s that provides the monmap: [[https://docs.ceph.com/en/reef/rbd/rbd-kubernetes/#generate-ceph-csi-configmap|#generate-ceph-csi-configmap]]
[] Generate a Ceph CSI cephx Secret object in dse-k8s that provides the client authentication details: [[https://docs.ceph.com/en/reef/rbd/rbd-kubernetes/#generate-ceph-csi-cephx-secret|#generate-ceph-csi-cephx-secret]]
[] Configure the Ceph CSI plugins in dse-k8s: [[https://docs.ceph.com/en/reef/rbd/rbd-kubernetes/#configure-ceph-csi-plugins|#configure-ceph-csi-plugins]]
[] Create the required ServiceAccount and RBAC ClusterRole/ClusterRoleBinding Kubernetes objects
[] Create the ceph-csi provisioner and node plugins
[] Create a StorageClass object in dse-k8s: [[https://docs.ceph.com/en/reef/rbd/rbd-kubernetes/#create-a-storageclass|#create-a-storageclass]]
[] Create a PersistentVolumeClaim object in dse-k8s: [[https://docs.ceph.com/en/reef/rbd/rbd-kubernetes/#create-a-persistentvolumeclaim|#create-a-persistentvolumeclaim]]
=== **Acceptance Criteria**
- [] The engineer should be able to deploy a stateful application using the PersistentVolumeClaim Kubernetes object.
- [] The PersistentVolumeClaim should be serviced by the Ceph cluster
- [] The application's data should remain persistent even if the pod or container running the application is deleted or recreated.