diff --git a/charts/ceph-csi-rbd/README.md b/charts/ceph-csi-rbd/README.md index ef2cc6d51..72d1d44a5 100644 --- a/charts/ceph-csi-rbd/README.md +++ b/charts/ceph-csi-rbd/README.md @@ -138,7 +138,7 @@ charts and their default values. | `provisionerSocketFile` | The filename of the provisioner socket | `csi-provisioner.sock` | | `pluginSocketFile` | The filename of the plugin socket | `csi.sock` | | `kubeletDir` | kubelet working directory | `/var/lib/kubelet` | -| `cephLogDir` | Host path location for ceph client processes logging, ex: rbd-nbd | `/var/log/ceph` | +| `cephLogDirHostPath` | Host path location for ceph client processes logging, ex: rbd-nbd | `/var/log/ceph` | | `driverName` | Name of the csi-driver | `rbd.csi.ceph.com` | | `configMapName` | Name of the configmap which contains cluster configuration | `ceph-csi-config` | | `externallyManagedConfigmap` | Specifies the use of an externally provided configmap | `false` | @@ -151,6 +151,7 @@ charts and their default values. | `storageClass.thickProvision` | Specifies whether thick provision should be enabled | `false` | | `storageclass.imageFeatures` | Specifies RBD image features | `layering` | | `storageClass.mounter` | Specifies RBD mounter | `""` | +| `storageClass.cephLogDir` | ceph client log location, it is the target bindmount path used inside container | `"/var/log/ceph"` | | `storageClass.volumeNamePrefix` | Prefix to use for naming RBD images | `""` | | `storageClass.encrypted` | Specifies whether volume should be encrypted. Set it to true if you want to enable encryption | `""` | | `storageClass.encryptionKMSID` | Specifies the encryption kms id | `""` | diff --git a/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml b/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml index 76b45bf38..1ccc49d08 100644 --- a/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml +++ b/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml @@ -175,7 +175,7 @@ spec: type: DirectoryOrCreate - name: ceph-logdir hostPath: - path: {{ .Values.cephLogDir }} + path: {{ .Values.cephLogDirHostPath }} type: DirectoryOrCreate - name: host-dev hostPath: diff --git a/charts/ceph-csi-rbd/templates/nodeplugin-psp.yaml b/charts/ceph-csi-rbd/templates/nodeplugin-psp.yaml index fc10f134d..9fb310063 100644 --- a/charts/ceph-csi-rbd/templates/nodeplugin-psp.yaml +++ b/charts/ceph-csi-rbd/templates/nodeplugin-psp.yaml @@ -42,7 +42,7 @@ spec: readOnly: true - pathPrefix: '/lib/modules' readOnly: true - - pathPrefix: '{{ .Values.cephLogDir }}' + - pathPrefix: '{{ .Values.cephLogDirHostPath }}' readOnly: false - pathPrefix: '{{ .Values.kubeletDir }}' readOnly: false diff --git a/charts/ceph-csi-rbd/templates/storageclass.yaml b/charts/ceph-csi-rbd/templates/storageclass.yaml index e8cb6fc60..cccd56a29 100644 --- a/charts/ceph-csi-rbd/templates/storageclass.yaml +++ b/charts/ceph-csi-rbd/templates/storageclass.yaml @@ -18,6 +18,9 @@ parameters: {{- if .Values.storageClass.mounter }} mounter: {{ .Values.storageClass.mounter }} {{- end }} +{{- if .Values.storageClass.cephLogDir }} + cephLogDir: {{ .Values.storageClass.cephLogDir }} +{{- end }} {{- if .Values.storageClass.dataPool }} dataPool: {{ .Values.storageClass.dataPool }} {{- end }} diff --git a/charts/ceph-csi-rbd/values.yaml b/charts/ceph-csi-rbd/values.yaml index 1e967cc20..54b13acfb 100644 --- a/charts/ceph-csi-rbd/values.yaml +++ b/charts/ceph-csi-rbd/values.yaml @@ -287,6 +287,14 @@ storageClass: # mounter: rbd-nbd mounter: "" + # (optional) ceph client log location, eg: rbd-nbd + # By default host-path /var/log/ceph of node is bind-mounted into + # csi-rbdplugin pod at /var/log/ceph mount path. See docs/rbd-nbd.md + # for available configuration options. + # This is to configure target bindmount path used inside container. + # cephLogDir: /var/log/ceph + cephLogDir: "" + # (optional) Prefix to use for naming RBD images. # If omitted, defaults to "csi-vol-". # volumeNamePrefix: "foo-bar-" @@ -403,7 +411,7 @@ pluginSocketFile: csi.sock # kubelet working directory,can be set using `--root-dir` when starting kubelet. kubeletDir: /var/lib/kubelet # Host path location for ceph client processes logging, ex: rbd-nbd -cephLogDir: /var/log/ceph +cephLogDirHostPath: /var/log/ceph # Name of the csi-driver driverName: rbd.csi.ceph.com # Name of the configmap used for state diff --git a/docs/rbd-nbd.md b/docs/rbd-nbd.md index cadf0c400..15631309c 100644 --- a/docs/rbd-nbd.md +++ b/docs/rbd-nbd.md @@ -40,11 +40,11 @@ the respective NodeUnstage(unmap). In case if you need a customized log path, you should do below: -- Edit the daemonset templates to change the `cephLogDir` - - If you are using helm charts, then you can use key `cephLogDir` +- Edit the daemonset templates to change the ceph log directory host-path + - If you are using helm charts, then you can use key `cephLogDirHostPath` ``` - helm install --set cephLogDir=/var/log/ceph-csi/my-dir + helm install --set cephLogDirHostPath=/var/log/ceph-csi/my-dir ``` - For standard templates edit [csi-rbdplugin.yaml](../deploy/rbd/kubernetes/csi-rbdplugin.yaml) diff --git a/examples/rbd/storageclass.yaml b/examples/rbd/storageclass.yaml index 80b421412..6cc329403 100644 --- a/examples/rbd/storageclass.yaml +++ b/examples/rbd/storageclass.yaml @@ -73,6 +73,7 @@ parameters: # By default host-path /var/log/ceph of node is bind-mounted into # csi-rbdplugin pod at /var/log/ceph mount path. See docs/rbd-nbd.md # for available configuration options. + # This is to configure target bindmount path used inside container. # cephLogDir: /var/log/ceph # (optional) Prefix to use for naming RBD images.