kubernetes-csi/csi-driver-nfs

wrong chart intent when using multiple mountOptions

Closed this issue · 0 comments

What happened:
when using the multiple mount option in the helm chart value, it would get the following error.

YAML parse error on csi-driver-nfs/templates/storageclass.yaml: error converting YAML to JSON: yaml: line 18: did not find expected key","errorVerbose":"error converting YAML to JSON: yaml: line 18: did not find expected key
YAML parse error on csi-driver-nfs/templates/storageclass.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
        helm.sh/helm/v3@v3.13.3/pkg/releaseutil/manifest_sorter.go:146
helm.sh/helm/v3/pkg/releaseutil.SortManifests
        helm.sh/helm/v3@v3.13.3/pkg/releaseutil/manifest_sorter.go:106
helm.sh/helm/v3/pkg/action.(*Configuration).renderResources
        helm.sh/helm/v3@v3.13.3/pkg/action/action.go:168
helm.sh/helm/v3/pkg/action.(*Install).RunWithContext
        helm.sh/helm/v3@v3.13.3/pkg/action/install.go:304
github.com/fluxcd/helm-controller/internal/action.Install
        github.com/fluxcd/helm-controller/internal/action/install.go:62
github.com/fluxcd/helm-controller/internal/reconcile.(*Install).Reconcile
        github.com/fluxcd/helm-controller/internal/reconcile/install.go:92
github.com/fluxcd/helm-controller/internal/reconcile.(*AtomicRelease).Reconcile
        github.com/fluxcd/helm-controller/internal/reconcile/atomic_release.go:252
github.com/fluxcd/helm-controller/internal/controller.(*HelmReleaseReconciler).reconcileRelease
        github.com/fluxcd/helm-controller/internal/controller/helmrelease_controller.go:387
github.com/fluxcd/helm-controller/internal/controller.(*HelmReleaseReconciler).Reconcile
        github.com/fluxcd/helm-controller/internal/controller/helmrelease_controller.go:220
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
        sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:119
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
        sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:316
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:227
runtime.goexit
        runtime/asm_amd64.s:1650

What you expected to happen:
it should indent all of the mountOptions.

How to reproduce it:
using the following values.yaml.

storageClass:
  create: true
  name: csi-driver-nfs
  parameters:
    server: "1.1.1.1"
    share: "/share"
  reclaimPolicy: Delete
  volumeBindingMode: Immediate
  mountOptions:
    - nfsvers=4.1
    - async

Anything else we need to know?:

Environment:

  • CSI Driver version: 4.7.0
  • Kubernetes version (use kubectl version): 1.28.0
  • OS (e.g. from /etc/os-release): CentOS Stream 8
  • Kernel (e.g. uname -a): 4.18.0-547.el8.x86_64
  • Install tools: kubeadm