ceph-csi-cephfs

by joaquinito2051

Helm chartv0.2.1App 3.14.2

Container Storage Interface (CSI) driver, provisioner, snapshotter and resizer for Ceph cephfs

About this chart

ceph-csi-cephfs

The ceph-csi-cephfs chart adds cephFS volume support to your cluster.

Install from release repo

Add chart repository to install helm charts from it

helm repo add ceph-csi https://ceph.github.io/csi-charts

Install from local Chart

we need to enter into the directory where all charts are present

cd charts

Note: charts directory is present in root of the ceph-csi project

Install Chart

To install the Chart into your Kubernetes cluster(For helm 3.x):

Create the namespace where Helm should install the components with

kubectl create namespace ceph-csi-cephfs

Run the installation

helm install --namespace "ceph-csi-cephfs" "ceph-csi-cephfs" ceph-csi/ceph-csi-cephfs

After installation succeeds, you can get a status of Chart

helm status --namespace "ceph-csi-cephfs" "ceph-csi-cephfs"

Upgrade Chart

If you want to upgrade your Chart, use the following commands.

helm repo update ceph-csi
helm upgrade --namespace ceph-csi-cephfs ceph-csi-cephfs ceph-csi/ceph-csi-cephfs

For upgrading to a specific version, provide the flag --version and the version.

Do not forget to include your values, if they differ from the default values. We recommend not to use --reuse-values in case there are new defaults AND compare your currently used values with the new default values.

Enabling encryption support

To enable FSCrypt support, you will need to include the KMS configuration in encryptionKMSConfig.

Here is a values.yaml example using a Kubernetes secret (kubernetes KMS)

encryptionKMSConfig:
    encryptionKMSType: "metadata"
    secretName: "cephfs-encryption-passphrase" # This secret needs to contain the passphrase as the key `encryptionPassphrase`
    secretNamespace: "my-namespace"
storageClass:
    encrypted: true
    encryptionKMSID: kubernetes

Least privilege secret access

If you use the metadata and let RBAC created by the chart, permissions will be given to access only the secret referenced in the encryptionKMSConfig. This is something important to keep in mind, as a manual change to the config to point to another secret or add further KMS config will not be authorized. If you wish to give CephCSI a global secret access to the cluster, you may set rbac.leastPrivileges to false, and permissions will be granted globally via a ClusterRole.

Known Issues Upgrading

  • When upgrading to version >=3.7.0, you might encounter an error that the CephFS CSI Driver cannot be updated. Please refer to issue for more details. This is due to the CSIDriver resource not being updatable. To work around this you can delete the CSIDriver object by running:

    kubectl delete csidriver cephfs.csi.ceph.com
    

    Then rerun your helm upgrade command.

Delete Chart

If you want to delete your Chart, use this command

helm uninstall "ceph-csi-cephfs" --namespace "ceph-csi-cephfs"

If you want to delete the namespace, use this command

kubectl delete namespace ceph-csi-cephfs

Configuration

The following table lists the configurable parameters of the ceph-csi-cephfs charts and their default values.

ParameterDescriptionDefault
rbac.createSpecifies whether RBAC resources should be createdtrue
rbac.leastPrivilegesSpecifies whether RBAC resources should be created with a restricted scope when supported (only secrets supported currently)true
serviceAccounts.nodeplugin.createSpecifies whether a nodeplugin ServiceAccount should be createdtrue
serviceAccounts.nodeplugin.nameThe name of the nodeplugin ServiceAccount to use. If not set and create is true, a name is generated using the fullname""
serviceAccounts.provisioner.createSpecifies whether a provisioner ServiceAccount should be createdtrue
serviceAccounts.provisioner.nameThe name of the provisioner ServiceAccount of provisioner to use. If not set and create is true, a name is generated using the fullname""
csiConfigConfiguration for the CSI to connect to the cluster[]
encryptionKMSConfigConfiguration for the encryption KMS{}
commonLabelsLabels to apply to all resources{}
logLevelSet logging level for csi containers. Supported values from 0 to 5. 0 for general useful logs, 5 for trace level verbosity.5
sidecarLogLevelSet logging level for csi sidecar containers. Supported values from 0 to 5. 0 for general useful logs, 5 for trace level verbosity.1
logSlowOperationIntervalLog slow operations at the specified rate. Operation is considered slow if it outlives its deadline.30s
nodeplugin.nameSpecifies the nodeplugin namenodeplugin
nodeplugin.updateStrategySpecifies the update Strategy. If you are using ceph-fuse client set this value to OnDeleteRollingUpdate
nodeplugin.priorityClassNameSet user created priorityClassName for csi plugin pods. default is system-node-critical which is highest prioritysystem-node-critical
nodeplugin.imagePullSecretsSpecifies imagePullSecrets for containers[]
nodeplugin.profiling.enabledSpecifies whether profiling should be enabledfalse
nodeplugin.registrar.image.repositoryNode-Registrar image repository URLregistry.k8s.io/sig-storage/csi-node-driver-registrar
nodeplugin.registrar.image.tagImage tagv2.13.0
nodeplugin.registrar.image.pullPolicyImage pull policyIfNotPresent
nodeplugin.plugin.image.repositoryNodeplugin image repository URLquay.io/cephcsi/cephcsi
nodeplugin.plugin.image.tagImage tagcanary
nodeplugin.plugin.image.pullPolicyImage pull policyIfNotPresent
nodeplugin.podSecurityContextSpecifies pod-level security context.{}
nodeplugin.annotationsSpecifies DaemonSet level annotations.{}
nodeplugin.podAnnotationsSpecifies pod-level annotations.{}
nodeplugin.nodeSelectorKubernetes nodeSelector to add to the Daemonset{}
nodeplugin.tolerationsList of Kubernetes tolerations to add to the Daemonset{}
nodeplugin.forcecephkernelclientSet to true to enable Ceph Kernel clients on kernel < 4.17 which support quotastrue
nodeplugin.kernelmountoptionsComma separated string of mount options accepted by cephfs kernel mounter quotas""
nodeplugin.fusemountoptionsComma separated string of mount options accepted by ceph-fuse mounter quotas""
provisioner.nameSpecifies the name of provisionerprovisioner
provisioner.replicaCountSpecifies the replicaCount3
provisioner.timeoutGRPC timeout for waiting for creation or deletion of a volume60s
provisioner.clusternameCluster name to set on the subvolume""
provisioner.setmetadataSet metadata on volumetrue
provisioner.priorityClassNameSet user created priorityClassName for csi provisioner pods. Default is system-cluster-critical which is less priority than system-node-criticalsystem-cluster-critical
provisioner.enableHostNetworkSpecifies whether hostNetwork is enabled for provisioner pod.false
provisioner.imagePullSecretsSpecifies imagePullSecrets for containers[]
provisioner.profiling.enabledSpecifies whether profiling should be enabledfalse
provisioner.provisioner.image.repositoryS

Deploy ceph-csi-cephfs with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ceph-csi-cephfs on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartceph-csi-cephfs is pinned at v0.2.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply