NFS StorageProvider renders a missing nfsSubDir as "<no value>"

Open Beginner friendly
#11,067 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@ldming is already working on this.

Since Nov 4, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
helm, kubernetes

Research direction

The bug is in the Helm template at deploy/helm/templates/storageprovider/nfs.yaml, which always renders subDir from .Parameters.nfsSubDir. Start by reading that template to see how the StorageClass parameters are built, then wrap the subDir line in a conditional so it is emitted only when nfsSubDir is non-empty. Done means a BackupRepo that omits nfsSubDir produces a StorageClass with no subDir parameter, and no <no value> or null appears.

Written by the indexing model from the issue text.

Description

kind/bug

Description

The NFS StorageProvider template always renders subDir from .Parameters.nfsSubDir. The field is optional and has no default. When a BackupRepo omits it, the generated StorageClass parameter is the literal <no value>, and backup files are stored in a directory with that name.

An empty string is not a usable substitute. The same template line renders it as YAML null, which cannot be stored in StorageClass parameters.

Expected behavior

When nfsSubDir is omitted or empty, the StorageClass should not contain subDir. Backups should use the NFS share itself.

Steps to reproduce

Create a BackupRepo with storageProviderRef: nfs and a config that sets nfsServer and nfsShare but not nfsSubDir. Inspect the generated StorageClass parameters.

Environment

  • KubeBlocks: main and 1.0.3-beta.10
  • Template: deploy/helm/templates/storageprovider/nfs.yaml

Additional context

The template should emit subDir only when nfsSubDir is non-empty.

Dominant language
Go
Stars
3.1k
Forks
282
Avg merge
1d 4h
Merged PRs (30d)
61

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apecloud/kubeblocks

All issues in apecloud/kubeblocks

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.