Skip to content

feat: Refuse zap development mode - #6

Merged
0xmc merged 1 commit into
mainfrom
feat/refuse-dev-mode
Oct 15, 2026
Merged

0xmc merged 1 commit into
mainfrom
feat/refuse-dev-mode

Conversation

@0xmc

@0xmc 0xmc commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Closes #5.

AssertStandardLogger now fails on a literal Development: true or UseDevMode(true) in controller-runtime's zap options in non-test source. Development mode, inherited from the kubebuilder scaffold by thirty-one binaries, logs console text at debug level in production and makes DPanic panic. The error names that cost and points to the zap-devel flag, which still turns development mode on for local runs.

Test plan

  • CI task passes on the Go floor, the latest Go, and the newest controller-runtime
  • Five deliberate breaks of the check each fail a test, including treating false as true
  • After merge, tag v0.3.0

🤖 Generated with Claude Code

Most controllers hard-code controller-runtime zap's development mode from the
kubebuilder scaffold, so production logs console text at debug level and
DPanic panics. AssertStandardLogger now refuses it in non-test source.

Key changes:
- flag a literal Development: true or UseDevMode(true) in zap options
- explain the cost and point to --zap-devel for local runs
- document the refusal in the README

Closes #5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xmc
0xmc requested a review from a team as a code owner October 15, 2026 15:34
@0xmc
0xmc merged commit d56a173 into main Oct 15, 2026
1 check passed
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.

Refuse zap development mode in production code

2 participants