Skip to content

feat(csi): make plugin directory configurable - #239

Open
sysakdemy wants to merge 1 commit into
juicedata:mainfrom
sysakdemy:fix/csi-plugin-dir-configurable
Open

feat(csi): make plugin directory configurable#239
sysakdemy wants to merge 1 commit into
juicedata:mainfrom
sysakdemy:fix/csi-plugin-dir-configurable

Conversation

@sysakdemy

Copy link
Copy Markdown

Summary

This PR makes the CSI plugin directory configurable in the Helm chart instead of hardcoding csi-plugins.

A new Helm value is introduced:

  • pluginDir (default: csi-plugins)

The CSI driver templates now use:

{{ .Values.kubeletDir }}/{{ .Values.pluginDir }}/{{ include "driverName" . }}/

This preserves the current default behavior while allowing OpenShift/OKD environments to use plugins.

Closes #229

Why

On OKD/OpenShift 4, the kubelet plugin directory is typically:

{{ .Values.kubeletDir }}/plugins/

Using the hardcoded csi-plugins path prevents CSI driver registration, which can lead to:

  • csi-node CrashLoopBackOff
  • PVC mount failures
  • workload startup failures due to missing registered CSI driver

Changes

  • Added pluginDir to values.yaml with default value csi-plugins
  • Replaced hardcoded csi-plugins paths in CSI-related templates with {{ .Values.pluginDir }}
  • Updated chart documentation (README values table) to include pluginDir

Backward compatibility

  • ✅ Default behavior is unchanged (pluginDir: csi-plugins)
  • ✅ Existing deployments that do not set pluginDir continue to work as before

How to use

Default (no change required):

helm upgrade --install juicefs-csi . \
  --namespace kube-system

OpenShift/OKD:

helm upgrade --install juicefs-csi . \
  --namespace kube-system \
  --set pluginDir=plugins

Validation

  • Rendered templates with default values and confirmed csi-plugins is still used
  • Rendered templates with --set pluginDir=plugins and confirmed plugins is used in:
    • CSI plugin hostPath
    • DRIVER_REG_SOCK_PATH
  • Verified chart templates remain valid

@sysakdemy

Copy link
Copy Markdown
Author

Hi, could you please review this PR when you have time?
This change makes CSI plugin directory configurable for OKD/OpenShift compatibility.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make CSI plugin directory configurable in the Helm chart

1 participant