You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Separates Capsule’s core admission and namespace-profile controllers from replication workers, allowing independent scaling and failover. It also adds optional health checks that gate replication readiness.
Changes:
Introduces dedicated controller commands, shared startup configuration, and separate replication deployment and monitoring resources.
Adds health-check APIs, bounded observation batches, cached CEL expressions, durable progress, and health metrics.
Extends unit tests, benchmarks, outage/failover scenarios, and end-to-end CI triggers.
The design separates worker capacity from admission and retains impersonated target access. Validation was limited to source inspection; tests, benchmarks, and cluster upgrade checks were not run.
File
Description
security/threats.yaml
Updates the RBAC evidence path.
security/capabilities.yaml
Updates the RBAC implementation reference.
pkg/runtime/ssa/manager.go
Reports applied target generation and content revision.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved critical issues can falsely report unhealthy targets as healthy and allow old and new replication controllers to modify targets concurrently during rolling upgrades.
When multiple origins apply disjoint spec fields to the same Deployment, their separate inventory entries can retain different generations for the same target UID. The health observer requires exact generation equality for every entry, so a healthy combined rollout can time out and block dependents until another full apply refreshes the earlier reference. Finalize health references per physical target after all contributions complete, retain per-origin lifecycle tracking, and add a shared-target regression case.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
An in-flight replication race can cause premature Healthy/Ready reporting, while merged Deployment strategies can block installation or upgrades and duplicate health observations add unnecessary polling work.
No open issues 🎉
3 previously missed issues
In code that hasn't changed since last review
Fence scoped status publication against health-mode changes
A scoped replication that passes this cached health-disabled check can finish after health is enabled and overwrite health-tracked inventory with nil-Health entries, leaving the new checkpoint intact; the observer can then skip those targets and report Healthy/Ready prematurely. Fence scoped status publication against the live source UID, generation and health mode, preserving cleanup inventory while invalidating the checkpoint and requesting a full apply when an in-flight operation changes it. The same race affects the namespaced path at internal/controllers/resources/namespace_trigger.go:324–326.
Replace worker deployment strategy instead of deep-merging it
Deep-merging the entire manager also merges the two Deployment strategies. If core uses RollingUpdate with a rollingUpdate configuration and replications sets deploymentStrategy.type: Recreate, the worker retains core's rollingUpdate field. Kubernetes rejects that Deployment because rollingUpdate is forbidden with Recreate, so an otherwise valid pair of controller configurations cannot be installed or upgraded. Replace the worker's deploymentStrategy as a whole after this merge rather than inheriting core's strategy fields.
Memoize repeated health observations within each batch
When several inventory contributions share a target and health reference, this loop repeats the same target GET and evaluation for every contribution on each poll. Memoize observations by target GVK, namespace/name and health reference within each batch, while preserving the separate ownership records and bounded cursor traversal.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Late namespace-scoped status updates can overwrite health inventory while retaining a newer checkpoint, allowing targets to be reported Healthy/Ready without being checked.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The chart can fail to render during upgrades with reused legacy values, while the direct client ignores configured API limits and inherited monitor selectors can leave replication metrics unscraped.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because subtle retry-state and workload-identification interactions could bypass rollout health checks or indefinitely block replication startup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactors deployment into two dedicated deployments (one for replications and one core (admission). Upgrade should be without large interruptions.