Skip to content

fix(csi): take the sidecar verbosity from the module logLevel - #225

Merged
duckhawk merged 1 commit into
mainfrom
fix/csi-sidecar-verbosity-from-log-level
Oct 11, 2026
Merged

duckhawk merged 1 commit into
mainfrom
fix/csi-sidecar-verbosity-from-log-level

Conversation

@duckhawk

Copy link
Copy Markdown
Member

Description

The CSI sidecars rendered by helm_lib_csi_controller_manifests (provisioner, attacher, resizer, snapshotter) and helm_lib_csi_node_manifests (node-driver-registrar) no longer run with a fixed --v=5. Their klog verbosity now comes from the module logLevel, through the new helm_lib_module_klog_verbosity helper:

logLevel --v
ERROR 0
WARN 1
INFO (default, also when the module has no logLevel) 2
DEBUG 4
TRACE 5

Chart version 1.72.29.

Every module that renders these defines changes its sidecars from --v=5 to --v=2 by default, including modules without a logLevel setting. --v=5 is still available with logLevel: TRACE.

Why do we need it, and what problem does it solve?

At --v=5, an idle module writes a lot of log lines that carry no information. On a 17-node cluster, csi-nfs wrote 135,000 lines in two hours with no volume operations. node-driver-registrar alone writes seven lines per health check every 10 s, and the controller sidecars log every lease renewal and every failed lease acquisition on the standby replica. Setting logLevel in the ModuleConfig did not change any of that, because the sidecars ignored it.

--v=2 is the upstream default for production.

What is the expected result?

  • Without logLevel, or with logLevel: INFO, the sidecar containers of csi-controller and csi-node get --v=2.
  • With logLevel: DEBUG they get --v=4; with TRACE they get --v=5.
  • kubectl logs ds/csi-node -c node-driver-registrar stops printing the health-check lines at the default level.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

The CSI sidecars (provisioner, attacher, resizer, snapshotter and
node-driver-registrar) ran with a fixed --v=5 whatever the module was
configured with. At that level node-driver-registrar alone writes seven
lines per health check and the controller sidecars log every lease
renewal, so an idle module fills the logs with noise and logLevel in
ModuleConfig changes nothing.

helm_lib_module_klog_verbosity maps the module logLevel to a klog level:
ERROR 0, WARN 1, INFO 2, DEBUG 4, TRACE 5. A module without logLevel gets
INFO, so the sidecars now run at --v=2, the upstream production default,
and TRACE keeps the old --v=5 for debugging.

Bump chart version to 1.72.29.

Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
@duckhawk
duckhawk merged commit c56fc5b into main Oct 11, 2026
4 checks passed
@duckhawk
duckhawk deleted the fix/csi-sidecar-verbosity-from-log-level branch October 11, 2026 06:03
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.

2 participants