Update April 2024
We now need this functionality to support T362788: Migrate Airflow to the dse-k8s cluster 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:
- Build a compatible version of the 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) : create-a-pool
- Setup Ceph client authentication for the CSI: #setup-ceph-client-authentication
- Generate a Ceph CSI ConfigMap object in dse-k8s that provides the monmap: #generate-ceph-csi-configmap
- Generate a Ceph CSI cephx Secret object in dse-k8s that provides the client authentication details: #generate-ceph-csi-cephx-secret
- Configure the Ceph CSI plugins in dse-k8s: #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: #create-a-storageclass
- Create a PersistentVolumeClaim object in dse-k8s: #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.