Skip to content

[WIP] Broker CR reconciler#1638

Draft
hidalgopl wants to merge 4 commits into
mainfrom
pb/broker-cr-reconciler
Draft

[WIP] Broker CR reconciler#1638
hidalgopl wants to merge 4 commits into
mainfrom
pb/broker-cr-reconciler

Conversation

@hidalgopl

Copy link
Copy Markdown
Contributor

No description provided.

hidalgopl and others added 3 commits July 2, 2026 14:44
Flesh out the Broker controller to manage pod lifecycle (create, adopt,
shadow), PVC provisioning, status conditions, and broker ID resolution
via the admin API. Pod-mutating actions are gated by the
operator.redpanda.com/roll-grant annotation whose config-checksum must
match the desired pod template checksum, keeping the Broker controller
a dumb executor while the cluster controller serialises rolls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement executeDecommission in the Broker reconciler: check
DecommissionBrokerStatus, initiate if not yet started, block on last
broker (RFC Q2). Add broker-crd.feature acceptance test covering the
full lifecycle: pod adoption from orphan-deleted StatefulSet, roll-grant
gating, broker ID resolution, and decommission to completion.

Temporarily flip --enable-broker and --experimental defaults to true
for testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…roller

Detect checksum drift between desired pod template and running pod.
When a valid roll-grant is held and checksums diverge, enable
maintenance mode on the broker via admin API, then delete the pod so
the next reconcile recreates it from the updated spec. Adoption now
stamps the checksum annotation on the pod to prevent a spurious
delete+recreate cycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hidalgopl hidalgopl marked this pull request as draft July 2, 2026 18:49
@secpanda

secpanda commented Jul 2, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

…d finalizer, PV remediation, drain

Restructure BrokerReconciler.Reconcile into a state struct + ordered
sub-reconciler chain matching the RedpandaReconciler style. Add:
- brokerReconciliationState / brokerReconcilerFn types
- Finalizer with decommission-on-delete and rollback-safe removal
- PV node-affinity remediation via pvcunbinder.DeadNodePVCs
- Maintenance mode drain before pod rotation (ensureDrained)
- Post-decommission pod + PVC cleanup
- Broker ID continuity check and maintenance mode disable
- Extended status conditions (PodScheduled, BrokerRegistered,
  ConfigOutdated, StorageBound)
- Roll-grant deadline validation
- Integration test suite and acceptance test steps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants