deploy: fix cephLogDir passing to storageclass via helm

cephLogDir: is a storage class option that is passed to rbd-nbd daemon.
cephLogDirHostPath: is a nodeplugin daemonset level option that helps in
                   using the right host-path while bind-mounting

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
Prasanna Kumar Kalever 2021-09-01 17:54:42 +05:30 committed by mergify[bot]
parent 47dc9cf28d
commit 314516cedd
7 changed files with 20 additions and 7 deletions

View File

@ -138,7 +138,7 @@ charts and their default values.
| `provisionerSocketFile` | The filename of the provisioner socket | `csi-provisioner.sock` | | `provisionerSocketFile` | The filename of the provisioner socket | `csi-provisioner.sock` |
| `pluginSocketFile` | The filename of the plugin socket | `csi.sock` | | `pluginSocketFile` | The filename of the plugin socket | `csi.sock` |
| `kubeletDir` | kubelet working directory | `/var/lib/kubelet` | | `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` | | `driverName` | Name of the csi-driver | `rbd.csi.ceph.com` |
| `configMapName` | Name of the configmap which contains cluster configuration | `ceph-csi-config` | | `configMapName` | Name of the configmap which contains cluster configuration | `ceph-csi-config` |
| `externallyManagedConfigmap` | Specifies the use of an externally provided configmap | `false` | | `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.thickProvision` | Specifies whether thick provision should be enabled | `false` |
| `storageclass.imageFeatures` | Specifies RBD image features | `layering` | | `storageclass.imageFeatures` | Specifies RBD image features | `layering` |
| `storageClass.mounter` | Specifies RBD mounter | `""` | | `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.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.encrypted` | Specifies whether volume should be encrypted. Set it to true if you want to enable encryption | `""` |
| `storageClass.encryptionKMSID` | Specifies the encryption kms id | `""` | | `storageClass.encryptionKMSID` | Specifies the encryption kms id | `""` |

View File

@ -175,7 +175,7 @@ spec:
type: DirectoryOrCreate type: DirectoryOrCreate
- name: ceph-logdir - name: ceph-logdir
hostPath: hostPath:
path: {{ .Values.cephLogDir }} path: {{ .Values.cephLogDirHostPath }}
type: DirectoryOrCreate type: DirectoryOrCreate
- name: host-dev - name: host-dev
hostPath: hostPath:

View File

@ -42,7 +42,7 @@ spec:
readOnly: true readOnly: true
- pathPrefix: '/lib/modules' - pathPrefix: '/lib/modules'
readOnly: true readOnly: true
- pathPrefix: '{{ .Values.cephLogDir }}' - pathPrefix: '{{ .Values.cephLogDirHostPath }}'
readOnly: false readOnly: false
- pathPrefix: '{{ .Values.kubeletDir }}' - pathPrefix: '{{ .Values.kubeletDir }}'
readOnly: false readOnly: false

View File

@ -18,6 +18,9 @@ parameters:
{{- if .Values.storageClass.mounter }} {{- if .Values.storageClass.mounter }}
mounter: {{ .Values.storageClass.mounter }} mounter: {{ .Values.storageClass.mounter }}
{{- end }} {{- end }}
{{- if .Values.storageClass.cephLogDir }}
cephLogDir: {{ .Values.storageClass.cephLogDir }}
{{- end }}
{{- if .Values.storageClass.dataPool }} {{- if .Values.storageClass.dataPool }}
dataPool: {{ .Values.storageClass.dataPool }} dataPool: {{ .Values.storageClass.dataPool }}
{{- end }} {{- end }}

View File

@ -287,6 +287,14 @@ storageClass:
# mounter: rbd-nbd # mounter: rbd-nbd
mounter: "" 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. # (optional) Prefix to use for naming RBD images.
# If omitted, defaults to "csi-vol-". # If omitted, defaults to "csi-vol-".
# volumeNamePrefix: "foo-bar-" # volumeNamePrefix: "foo-bar-"
@ -403,7 +411,7 @@ pluginSocketFile: csi.sock
# kubelet working directory,can be set using `--root-dir` when starting kubelet. # kubelet working directory,can be set using `--root-dir` when starting kubelet.
kubeletDir: /var/lib/kubelet kubeletDir: /var/lib/kubelet
# Host path location for ceph client processes logging, ex: rbd-nbd # Host path location for ceph client processes logging, ex: rbd-nbd
cephLogDir: /var/log/ceph cephLogDirHostPath: /var/log/ceph
# Name of the csi-driver # Name of the csi-driver
driverName: rbd.csi.ceph.com driverName: rbd.csi.ceph.com
# Name of the configmap used for state # Name of the configmap used for state

View File

@ -40,11 +40,11 @@ the respective NodeUnstage(unmap).
In case if you need a customized log path, you should do below: In case if you need a customized log path, you should do below:
- Edit the daemonset templates to change the `cephLogDir` - Edit the daemonset templates to change the ceph log directory host-path
- If you are using helm charts, then you can use key `cephLogDir` - 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) - For standard templates edit [csi-rbdplugin.yaml](../deploy/rbd/kubernetes/csi-rbdplugin.yaml)

View File

@ -73,6 +73,7 @@ parameters:
# By default host-path /var/log/ceph of node is bind-mounted into # 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 # csi-rbdplugin pod at /var/log/ceph mount path. See docs/rbd-nbd.md
# for available configuration options. # for available configuration options.
# This is to configure target bindmount path used inside container.
# cephLogDir: /var/log/ceph # cephLogDir: /var/log/ceph
# (optional) Prefix to use for naming RBD images. # (optional) Prefix to use for naming RBD images.