From 6b8cbf4f4c0e2a8e7a98bd7c8346b958e638ba57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Fri, 23 Aug 2024 17:32:06 +0200 Subject: [PATCH] fix: wrong version logged on startup (#729) 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. --- .goreleaser.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 21f7beb4..cbfcd8f0 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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]