Skip to content

Fix missing gitMajor and gitMinor

Halfa requested to merge fix-version into master

We recently realized that hepto doesn't set the Major and Minor version in its internal structures. This leads to the following behavior when querying the version with kubectl version --output=yaml

# [...]
serverVersion:
  buildDate: "1970-01-01T00:00:00Z"
  compiler: gc
  gitCommit: $Format:%H$
  gitTreeState: ""
  gitVersion: v1.27.4
  goVersion: go1.22.0
  major: ""
  minor: ""
  platform: linux/amd64

Despite a TODO in the K8s source marking them as to be deprecated, they seem to be indeed widely used, by at least ArgoCD and cloudnativepostgres.

Merge request reports