How to identify Barman version being used by Barman Plugin in the running CNPG cluster ?
It was possible to find out Barman version with Barman Native with the command like:
kubectl -n $name_space exec -it $cluster_name-1 -- barman-cloud-backup --version
Is there a way to find out Barman version with Barman Plugin ?
There isn't a built-in or documented way to check the Barman version used by the Barman Plugin in a running CNPG cluster, unlike with Barman Native where you could run barman-cloud-backup --version. The plugin containers use a Go binary as their entrypoint and do not expose the Barman CLI utilities directly, so exec'ing into the container won't work for version queries. The Barman version is tied to the sidecar image (e.g., ghcr.io/cloudnative-pg/plugin-barman-cloud-sidecar), but the image labels do not specify the version, and the operational logic is encapsulated in the plugin binary itself. For now, you may need to rely on release notes or image tags to infer the version, or check if the plugin logs output version info at startup.
Reference
To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.
Is it possible to add ghcr.io/cloudnative-pg/plugin-barman-cloud-sidecar image label with Barman version ?``
Release notes usually don't have Barman version info.
Image tags don't have Barman version info.
Besides, I might run image testing version.
I was not able to find Barman version in the plugin logs output at startup.
So, from my point of view, ability to find out Barman version used by Barman plugin can be useful.
I was able to do it:
[alexey@wsl2 ~]$ kubectl get pod -n $oname-system -o jsonpath="{.items[].spec['initContainers', 'containers'][].name}" |
tr -s '[[:space:]]' '\n' |
sort |
uniq -c
1 barman-cloud
3 bootstrap-controller
1 manager
1 minio
3 plugin-barman-cloud
3 postgres
[alexey@wsl2 ~]$ kubectl -n $oname-system exec -it $cluster_name-1 -c postgres -- barman-cloud-backup --version OCI runtime exec failed: exec failed: unable to start container process: exec: "barman-cloud-backup": executable file not found in $PATH: unknown command terminated with exit code 127
[alexey@wsl2 ~]$ kubectl -n $oname-system exec -it $cluster_name-1 -c plugin-barman-cloud -- barman-cloud-backup --version barman-cloud-backup 3.16.1