cmctl icon indicating copy to clipboard operation
cmctl copied to clipboard

cmctl always reports v0.0.0 in the user-agent header

Open wallrj opened this issue 4 months ago • 0 comments

I downloaded cmctl from https://github.com/cert-manager/cmctl/releases/download/v2.1.1/cmctl_linux_amd64

When I ran cmctl version with verbose logging, I noticed the request header: User-Agent: cmctl/v0.0.0 (linux/amd64) kubernetes/$Format.

Should contain User-Agent: cmctl/v2.1.1 (linux/amd64) I think. Not sure that kubernetes/$Format is?

$ cmctl version -o yaml -v 7
I1002 13:58:57.933697  170011 loader.go:395] Config loaded from file:  /home/richard/.kube/config
I1002 13:58:57.934433  170011 round_trippers.go:463] GET https://8663C9323E9D091F75D47483636E8A5A.gr7.us-west-2.eks.amazonaws.com/apis/apiextensions.k8s.io/v1
I1002 13:58:57.934462  170011 round_trippers.go:469] Request Headers:
I1002 13:58:57.934468  170011 round_trippers.go:473]     User-Agent: cmctl/v0.0.0 (linux/amd64) kubernetes/$Format
I1002 13:58:57.934484  170011 round_trippers.go:473]     Accept: application/json, */*
I1002 13:58:59.203450  170011 round_trippers.go:574] Response Status: 200 OK in 1268 milliseconds
I1002 13:58:59.204064  170011 round_trippers.go:463] GET https://8663C9323E9D091F75D47483636E8A5A.gr7.us-west-2.eks.amazonaws.com/apis/apiextensions.k8s.io/v1/customresourcedefinitions/certificates.cert-manager.io
I1002 13:58:59.204123  170011 round_trippers.go:469] Request Headers:
I1002 13:58:59.204139  170011 round_trippers.go:473]     Accept: application/json, */*
I1002 13:58:59.204146  170011 round_trippers.go:473]     User-Agent: cmctl/v0.0.0 (linux/amd64) kubernetes/$Format
I1002 13:58:59.371767  170011 round_trippers.go:574] Response Status: 200 OK in 167 milliseconds
clientVersion:
  compiler: gc
  gitCommit: 479a118e3dfe3d29d9a5b23abe04ca46327735a1
  gitTreeState: ""
  gitVersion: v2.1.1
  goVersion: go1.23.1
  platform: linux/amd64
serverVersion:
  detected: v1.15.3
  sources:
    crdLabelVersion: v1.15.3

wallrj avatar Oct 02 '24 13:10 wallrj