We do embed the version of cert-manager in each of the binaries using -ldflags. Unfortunately, the version string can never be printed out because the following line, which is the only line where we make use of util.AppVersion, isn't reachable:
|
Short: fmt.Sprintf("Automated TLS controller for Kubernetes (%s) (%s)", util.AppVersion, util.AppGitCommit), |
The reason is because Short will only ever be printed if that command is a subcommand, and Short will only appear when calling --help on the root command. But since NewServerCommand is the root command, Short can't be printed out.
Example:
$ docker run -it --rm quay.io/jetstack/cert-manager-controller:v1.18.2 --help | head
cert-manager is a Kubernetes addon to automate the management and issuance of
TLS certificates from various issuing sources.
It will ensure certificates are valid and up to date periodically, and attempt
to renew certificates at an appropriate time before expiry.
Usage:
controller [flags]
/kind feature
We do embed the version of cert-manager in each of the binaries using
-ldflags. Unfortunately, the version string can never be printed out because the following line, which is the only line where we make use ofutil.AppVersion, isn't reachable:cert-manager/cmd/controller/app/start.go
Line 76 in bdd12d6
The reason is because
Shortwill only ever be printed if that command is a subcommand, andShortwill only appear when calling--helpon the root command. But sinceNewServerCommandis the root command,Shortcan't be printed out.Example:
/kind feature