From a94bf2ae7e84d3f6393b1f5aaa053d979e85f1f8 Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Mon, 25 May 2026 11:28:13 -0400 Subject: [PATCH] OCPBUGS-83863: Strip debug symbols from Go binaries Add -s -w to ldflags in .promu.yml to strip DWARF debug info and symbol tables. This typically reduces binary size by 20-30%, which reduces container image pull time during node scale-up. rh-pre-commit.version: 2.4.0 rh-pre-commit.check-secrets: ENABLED --- .promu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.promu.yml b/.promu.yml index d0d602b6a6..e2db4dfa1d 100644 --- a/.promu.yml +++ b/.promu.yml @@ -8,6 +8,7 @@ build: binaries: - name: node_exporter ldflags: | + -s -w -X github.com/prometheus/common/version.Version={{.Version}} -X github.com/prometheus/common/version.Revision={{.Revision}} -X github.com/prometheus/common/version.Branch={{.Branch}}