github truenas/truenas-csi v1.3.0
v1.3.0 - Prometheus metrics, Helm chart, and a block volume expand fix

latest release: v1.4.0
one month ago

Adds a Prometheus metrics endpoint and a Helm chart, and fixes expansion of
block volumes that carry a partition table.

Block volume expansion no longer fails on partitioned devices (#60)

Expanding a Block-mode PVC that had a partition table on it failed the node
expansion, which fails kubelet's MapVolume and leaves the pod unable to start.
Every KubeVirt VM disk has a partition table, so a resize could leave a block
volume unusable.

The driver was handing the raw device to the filesystem resizer, which reports a
partition table as an unsupported format. Raw block volumes now stop at the
device rescan, which is the only part of expansion they need. Filesystem volumes
still fail loudly when the filesystem cannot be grown, rather than reporting
success while leaving the filesystem short of the device.

Prometheus metrics (#30)

The driver can now serve a /metrics endpoint, disabled by default:

  • truenas_csi_grpc_requests_total{method,code} and truenas_csi_grpc_request_duration_seconds{method}
  • truenas_csi_volume_operations_total{protocol,operation,status}
  • truenas_csi_api_calls_total{method,status} and truenas_csi_api_call_duration_seconds{method}
  • truenas_csi_api_connected and truenas_csi_api_reconnects_total
  • the standard Go and process collectors

Enable it by setting metricsAddr in the truenas-csi-config ConfigMap, or
metrics.enabled=true with Helm. The CSI sidecars now expose their own metrics
on ports 8081-8084. deploy/monitoring/ adds the metrics Service, an example
ServiceMonitor, and a Grafana dashboard. Full reference in
docs/metrics.md.

Per-volume usage metrics were already available from kubelet
(kubelet_volume_stats_*) and need no configuration.

Helm chart (#22)

helm repo add truenas-csi https://raw.githubusercontent.com/truenas/truenas-csi/master/charts
helm install truenas-csi truenas-csi/truenas-csi \
  --namespace truenas-csi --create-namespace \
  --set truenas.url=wss://YOUR-TRUENAS-IP \
  --set truenas.apiKey=YOUR-API-KEY \
  --set truenas.defaultPool=tank \
  --set truenas.insecureSkipTLS=true

The chart supports a Secret you manage yourself (truenas.existingSecret, for
ExternalSecrets or Sealed Secrets), extra manifests through extraObjects,
StorageClass and VolumeSnapshotClass creation, and single values for settings
that previously needed edits in several places: kubeletDir for K3s and
MicroK8s, and driverName, which drives the CSIDriver object, the provisioner
name and the kubelet socket paths together.

deploy/truenas-csi-driver.yaml is unchanged and still supported. A make verify-chart
target renders the chart and compares it against the manifest so the two install
paths cannot drift apart. See the chart
reference
.

Upgrading

Existing installs upgrade by pulling the new image; nothing needs
reconfiguration, and the metrics endpoint stays off until you ask for it.

Moving an existing kubectl apply install to the Helm chart is possible in
place: the chart keeps the same object names and pod selector labels. See the
upgrade notes in the chart reference.

Images

  • quay.io/truenas_solutions/truenas-csi:v1.3.0
  • quay.io/truenas_solutions/truenas-csi-operator:v1.3.0
  • quay.io/truenas_solutions/truenas-csi-operator-bundle:v1.3.0
  • ghcr.io/truenas/truenas-csi:v1.3.0

This release is not yet Red Hat certified. v1.1.2 remains the certified release
in the OpenShift catalog.

Don't miss a new truenas-csi release

NewReleases is sending notifications on new releases.