Skip to content

CONVENTIONS: require stripped binaries for DaemonSets, recommend for all#2021

Open
sdodson wants to merge 2 commits into
openshift:masterfrom
sdodson:conventions-strip-binaries
Open

CONVENTIONS: require stripped binaries for DaemonSets, recommend for all#2021
sdodson wants to merge 2 commits into
openshift:masterfrom
sdodson:conventions-strip-binaries

Conversation

@sdodson
Copy link
Copy Markdown
Member

@sdodson sdodson commented May 26, 2026

Summary

  • Adds a new Binary Size section to CONVENTIONS.md
  • MUST strip binaries for DaemonSets (every node pulls the image, so size has outsized impact)
  • SHOULD strip all other component binaries
  • Documents how to strip Go binaries (go build -ldflags '-s -w')
  • Details what stripping does and does not affect:
    • Unaffected: pprof profiling, stack traces, logging, metrics
    • Affected: external debuggers (dlv/gdb), core dump analysis — neither expected against production binaries

Motivation

There is no existing guidance in the repo about stripping binaries. Given the direct impact on node disk usage, image pull times, and upgrade duration — especially for DaemonSets deployed to every node — this should be codified as a convention.

Discussion

Opened for discussion at the next architecture call.

Test plan

  • Review convention language for accuracy and completeness
  • Confirm alignment with existing build practices across OpenShift components

🤖 Generated with Claude Code

DaemonSet images are pulled to every node, so binary size has an outsized
impact on disk usage, pull times, and upgrade duration. Add a convention
requiring stripped binaries (go build -ldflags '-s -w') for DaemonSets
and recommending it for all other components, with details on what
stripping does and does not affect (pprof, stack traces, debuggers, core
dumps).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci openshift-ci Bot requested review from flavianmissi and jcantrill May 26, 2026 02:40
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 26, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign patrickdillon for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

DaemonSets that gate NodeReady (SDN/CNI, kube-proxy) are directly
delayed by oversized images. Other DaemonSets contend for disk I/O
and network bandwidth during pulls, further slowing bootstrapping.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 26, 2026

@sdodson: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant