Skip to content

[PR-14] Admission Fast Paths and Bounded External Checks #382

Closed as not planned
Closed as not planned

Description

@amuraru

Delivery bundle: C: Convergence, APIs, and gated scalability. See #395 and #368 for the four-PR stack.

Parent: #394
Roadmap: #368
Plan item: PR-14
Priority: P2
Dependencies: PR-03; PR-12 before moving checks to reconciliation

Kubernetes support: Rolling upstream-maintained minors; use the oldest/newest boundaries pinned in config/kubernetes-versions.env. See #368 for the current policy. Unrun jobs are not passed validation.

Problem Statement

Evidence: Topic ValidateUpdate ignores the old object; checkKafka performs live admin calls for create/update, including metadata-only updates. Duplicate detection uses cached lists and cannot establish atomic uniqueness.

Proposed Solution

Files: pkg/webhooks/kafkatopic_validator.go, validator tests, pkg/kafkaclient/ adapters, topic reconciliation/conditions if checks move there, generated webhook config, Helm webhook template/values/schema.

Interface contract: Compare old/new validation-relevant inputs. Preserve adoption and managedBy transitions; a managedBy change is not an irrelevant metadata update. Bound all retained external checks and configure explicit webhook timeouts.

  • Add request-count tests showing a finalizer/irrelevant-label update avoids unnecessary Kafka calls, while spec and management-mode changes retain required checks.
  • Add unavailable-Kafka, cancellation, deletion/finalization, and adoption tests; specify which requests remain fail-closed.
  • Document the non-atomic uniqueness limitation. Do not claim APIReader alone prevents concurrent duplicate creates; any atomic reservation mechanism requires separately approved scope.
  • Move external availability checks to reconciliation only after PR-12 supplies useful status and the admission-contract change is approved. Otherwise retain bounded checks and ship only safe fast paths.
  • Validate with go test ./pkg/webhooks ./controllers ./controllers/tests; exercise real webhook admission in Kind, including broker outage and configured timeout behavior.

Done when: Admission avoids redundant work and external availability dependencies are intentional, bounded, and documented.

Delivery: Four consolidated PRs, approved November 16, 2026: A -> B -> C; D branches from A. Foundation is #395. The 22 PR-XX identifiers are work-item IDs, not separate PRs. Preserve every work-item acceptance criterion and native dependency. No gated experiment is automatically enabled, and no issue is complete merely because one PR references it. D must satisfy its native #375 gate, including lifecycle-domain signals assigned to B; branching from A does not waive that merge prerequisite. Write focused regression tests first; record exact commands/results and run make check plus this issue's real-cluster/measurement gates.

Native dependency gate: Unconditionally blocked by #371. The #380 dependency applies only if live admission checks move into reconciliation. Keep metadata/admission fast-path work independently deliverable; add #380 as a native blocker only if that broader scope is selected.

Alternatives Considered

Twenty-two individual PRs add unnecessary integration overhead, while one omnibus PR obscures correctness and rollout boundaries. Deliver this scope in its approved dependency-aligned bundle. Do not expand into deferred consistency, storage, or concurrency changes without their own decision gates.

Additional Context

Baseline: 95138e0d; detailed roadmap scope: #368, section PR-14. The roadmap #368 and its native sub-issues are the planning source of truth. No planning document is committed in the final PR diffs. Re-read affected source and overlapping work before implementation. Historical baseline test passes are not validation of this change.

Activity

  1. added theissue type on Nov 16, 2026
  2. amuraru commented on Nov 17, 2026

    @amuraru
    Author

    Safe metadata-only admission fast paths and bounded retained checks move to #394 under #368. Preserve adoption/managedBy and fail-closed behavior; no asynchronous availability contract or conditions prerequisite. Superseded, not implemented.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions