-
Notifications
You must be signed in to change notification settings - Fork 2.4k
I cannot check the version of the running binary (controller, cainjector, webhook, acmesolver, and startupapicheck) #8067
Copy link
Copy link
Closed
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Description
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:
cert-manager/cmd/controller/app/start.go
Line 76 in bdd12d6
| 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.