dhi.io/ceph-csi-operator-chart
Deploys the Ceph CSI Operator, which manages the Ceph CSI drivers for RBD, CephFS, NFS, and NVMe-oF storage on Kubernetes.
All examples in this guide use the public chart and images. If you've mirrored the repository for your own use (for example, to your Docker Hub namespace), update your commands to reference the mirrored chart instead of the public one.
For example:
dhi.io/<repository>:<tag><your-namespace>/dhi-<repository>:<tag>For more details about customizing the chart to reference other images, see the documentation.
To optionally mirror a chart to your own third-party registry, you can follow the instructions in How to mirror an image for either the chart, the image, or both.
The same regctl tool that is used for mirroring container images can also be used for mirroring Helm charts, as Helm
charts are OCI artifacts.
For example:
regctl image copy \
"${SRC_CHART_REPO}:${TAG}" \
"${DEST_REG}/${DEST_CHART_REPO}:${TAG}" \
--referrers \
--referrers-src "${SRC_ATT_REPO}" \
--referrers-tgt "${DEST_REG}/${DEST_CHART_REPO}" \
--force-recursive
The Docker Hardened Images that the chart uses require authentication. To allow your Kubernetes cluster to pull those images, you need to create a Kubernetes secret with your Docker Hub credentials or with the credentials for your own registry.
Follow the authentication instructions for DHI in Kubernetes.
For example:
kubectl create namespace ceph-csi-operator-system
kubectl create secret docker-registry helm-pull-secret \
--namespace ceph-csi-operator-system \
--docker-server=dhi.io \
--docker-username=<Docker username> \
--docker-password=<Docker token> \
--docker-email=<Docker email>
To install the chart, use helm install. Make sure you use helm login to log in before running helm install.
Optionally, you can also use the --dry-run flag to test the installation without actually installing anything.
helm install my-ceph-csi-operator oci://dhi.io/ceph-csi-operator-chart --version <version> \
-n ceph-csi-operator-system \
--set "imagePullSecrets[0].name=helm-pull-secret"
Replace <version> accordingly. If the chart is in your own registry or repository, replace dhi.io with your own
registry and namespace. Replace helm-pull-secret with the name of the image pull secret you created earlier.
The operator's pod should show up and running almost immediately:
$ kubectl -n ceph-csi-operator-system get pods -l app.kubernetes.io/instance=my-ceph-csi-operator
NAME READY STATUS RESTARTS AGE
my-ceph-csi-operator-ceph-csi-operator-chart-controller-manager-6d9f7c-x2 1/1 Running 0 20s
The chart installs the operator and its custom resource definitions only. Confirm that the CRDs are registered:
$ kubectl get crd | grep csi.ceph.io
cephconnections.csi.ceph.io
clientprofilemappings.csi.ceph.io
clientprofilereplications.csi.ceph.io
clientprofiles.csi.ceph.io
drivers.csi.ceph.io
operatorconfigs.csi.ceph.io
The operator creates the Ceph CSI controller and node plugin workloads from Driver custom resources. This chart does
not create them, and it does not create the service accounts and RBAC those workloads run with. The upstream
ceph-csi-drivers Helm chart creates all of these, together with the CephConnection, ClientProfile, and
StorageClass resources. See the
upstream drivers chart documentation.
The Ceph CSI Operator starts the driver and sidecar containers from its built-in image defaults, which point at upstream
images. To run them from Docker Hardened Images, put the image references in a ConfigMap and reference it from the
OperatorConfig resource, which applies to every driver, or from a single Driver resource:
apiVersion: v1
kind: ConfigMap
metadata:
name: dhi-csi-images
namespace: ceph-csi-operator-system
data:
plugin: dhi.io/cephcsi:<tag>
provisioner: dhi.io/csi-provisioner:<tag>
attacher: dhi.io/csi-attacher:<tag>
resizer: dhi.io/csi-resizer:<tag>
snapshotter: dhi.io/csi-snapshotter:<tag>
registrar: dhi.io/csi-node-driver-registrar:<tag>
addons: dhi.io/csi-addons-k8s-sidecar:<tag>
---
apiVersion: csi.ceph.io/v1
kind: OperatorConfig
metadata:
name: ceph-csi-operator-config
namespace: ceph-csi-operator-system
spec:
driverSpecDefaults:
imageSet:
name: dhi-csi-images
Replace each <tag> with a tag published for that image. Keys you leave out keep the built-in default. The Driver and
OperatorConfig resources have no image pull secret field, so the nodes must be able to pull these images: mirror them
to a registry the nodes can read, or add the pull secret to the service accounts the driver pods run as.
By default the operator watches every namespace. Restrict it to a single namespace with the
controllerManager.manager.env.watchNamespace value:
helm install my-ceph-csi-operator oci://dhi.io/ceph-csi-operator-chart --version <version> \
-n ceph-csi-operator-system \
--set "imagePullSecrets[0].name=helm-pull-secret" \
--set controllerManager.manager.env.watchNamespace=ceph-csi-operator-system
On OpenShift, enable the SecurityContextConstraints the CSI drivers need:
helm install my-ceph-csi-operator oci://dhi.io/ceph-csi-operator-chart --version <version> \
-n ceph-csi-operator-system \
--set "imagePullSecrets[0].name=helm-pull-secret" \
--set openshift.enabled=true