Skip to content

Commit

Permalink
fix: wrong version logged on startup (#729)
Browse files Browse the repository at this point in the history
The k/cloud-provider library is logging a version on startup. This
version is expected to be set by Kubernetes build scripts, but we do not
use this.

Right now it looks like this:

```
controllermanager.go:169] Version: v0.0.0-master+$Format:%H$
```

With the fix, this will report the same version as we use for the
user-agent.
  • Loading branch information
apricote authored Aug 23, 2024
1 parent cc1b6b7 commit 6b8cbf4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ builds:
- -s
- -w
- -X github.com/hetznercloud/hcloud-cloud-controller-manager/hcloud.providerVersion={{ if not .IsSnapshot }}v{{ end }}{{ .Version }}
- -X k8s.io/component-base/version.gitVersion={{ if not .IsSnapshot }}v{{ end }}{{ .Version }}

dockers:
- build_flag_templates: [--platform=linux/amd64]
Expand Down

0 comments on commit 6b8cbf4

Please sign in to comment.