This document describes the versioning strategy for tns-csi.
tns-csi follows Semantic Versioning (SemVer):
- MAJOR.MINOR.PATCH (e.g.,
v0.16.0) - Tags are prefixed with
v(e.g.,v0.16.0,v1.0.0)
The version is determined at build time and embedded in the binary. The version comes from:
- Git tags (preferred) - When building from a tagged commit, the version is the tag name
- Git describe - For non-tagged commits, format is
v0.16.0-3-gabc1234(3 commits after v0.16.0) - "dev" - Fallback when git is not available
Each build includes:
| Field | Description | Example |
|---|---|---|
| Version | Semantic version from git tag | v0.16.0 |
| Git Commit | Short SHA of the commit | abc1234 |
| Build Date | UTC timestamp of build | 2025-12-21T10:30:00Z |
| Go Version | Go compiler version | go1.26.0 |
| Platform | OS and architecture | linux/amd64 |
tns-csi-driver --show-versionOutput:
tns.csi.io version: v0.16.0
Git commit: abc1234
Build date: 2025-12-21T10:30:00Z
Go version: go1.26.0
Platform: linux/amd64
The driver exposes version info via HTTP:
# Port-forward to the controller pod
kubectl port-forward -n kube-system deployment/tns-csi-controller 8080:8080
# Query version endpoint
curl http://localhost:8080/versionResponse:
{
"version": "v0.16.0",
"gitCommit": "abc1234",
"buildDate": "2025-12-21T10:30:00Z",
"goVersion": "go1.26.0",
"platform": "linux/amd64"
}The version is logged at startup:
Starting TNS CSI Driver v0.16.0 (commit: abc1234, built: 2025-12-21T10:30:00Z)
Check which version is deployed:
helm list -n kube-systemWhen a version is released, Docker images are tagged with:
| Tag | Description | Stability |
|---|---|---|
v0.16.0 |
Exact version | Immutable |
0.5 |
Major.Minor | Points to latest patch |
0 |
Major only | Points to latest minor |
latest |
Most recent release | Mutable - not recommended for production |
CI builds from branches are tagged with the branch name:
main- Latest from main branchfeature-xyz- Feature branch builds
The Helm chart version is kept in sync with the application version:
| Chart.yaml Field | Value |
|---|---|
version |
0.16.0 (chart version, no v prefix) |
appVersion |
v0.16.0 (app version, with v prefix) |
The Helm chart resolves the image tag in this order:
- Explicit override:
--set image.tag=v0.16.0 - Chart's appVersion: Automatically uses
v0.16.0when installing--version 0.16.0
Always pin a specific version:
# Install specific chart version (uses matching image tag automatically)
helm install tns-csi oci://registry-1.docker.io/bfenski/tns-csi-driver \
--version 0.16.0 \
...Or explicitly set the image tag:
helm install tns-csi ./charts/tns-csi-driver \
--set image.tag=v0.16.0 \
...The latest tag and main branch builds are fine for development and testing:
helm install tns-csi ./charts/tns-csi-driver \
--set image.tag=latest \
--set image.pullPolicy=Always \
...Check current version before upgrading:
helm list -n kube-system
kubectl logs -n kube-system deployment/tns-csi-controller | head -1Upgrade to a new version:
helm upgrade tns-csi oci://registry-1.docker.io/bfenski/tns-csi-driver \
--version 0.16.0 \
--reuse-valuesWhen reporting issues, always include the full version information:
# Get version from logs
kubectl logs -n kube-system deployment/tns-csi-controller 2>&1 | head -5
# Or from the API
kubectl exec -n kube-system deployment/tns-csi-controller -- \
/usr/local/bin/tns-csi-driver --show-versionInclude in your issue:
- Version (e.g.,
v0.16.0) - Git commit (e.g.,
abc1234) - How you installed (Helm version, custom image, etc.)