flatcar-linux-update-operator icon indicating copy to clipboard operation
flatcar-linux-update-operator copied to clipboard

Consider getting rid of version constraints from code

Open invidian opened this issue 3 years ago • 1 comments

We have #12 right now, where we have operator and agent version baked into binaries, but we don't really use it for anything except printing version right now, as it was mainly used for managing the DaemonSet, which was deprecated and has been removed in 085c8588fa1a8233add27f17d5c6180f2b551c2b.

invidian avatar Feb 17 '22 14:02 invidian

Things to consider:

  • Decide if version package should be exported.
  • Consider moving version code to cmd package.
  • Consider logging operator and agent version from operator code, rather than from CLI.
  • Set version constant to v0.8.1-dirty (basically to <likely next version>-next) to have at least some information for go build builds. This will be bumped and changed as part of the release process. This is what Lokomotive and Flexkube are doing and we didn't experience any major issues with it.
  • If available, use debug.ReadBuildInfo() for versioning for go get builds.
  • Keep setting version with make for detailed information.

invidian avatar Feb 23 '22 10:02 invidian