Add StatefulSet CacheBackend support#112
Conversation
Codex reviewFiles reviewed
FindingsBlockingNone. Should-fixinternal/controller/cachebackend_controller.go:1026 — Verify: StatefulSet storage edits after creation are not reconciled or surfaced. The update path intentionally leaves internal/controller/cachebackend_controller.go:767 — StatefulSet backends still get the Deployment restart-cascade polling cadence. The StatefulSet branch explicitly skips internal/controller/cachebackend_controller.go:1950 — StatefulSet readiness from Nitinternal/controller/cachebackend_controller.go:1962 — The Per-category coverage
Verdictchanges-requested |
|
Addressed in a560a88.
Verification:
|
Codex reviewFiles reviewed
FindingsBlockingNone. Should-fixinternal/controller/cachebackend_controller.go:353 — Deployment-to-StatefulSet persistent kind switches silently strand the old shared PVC. Because internal/controller/cachebackend_controller.go:1420 — Nitconfig/samples/recipe-persistent-cache.yaml:49 — The inline comment still says “Single replica is required for a PVC-backed (ReadWriteOnce) backend.” In this sample it is true because Per-category coverage
Verdictchanges-requested |
|
Addressed in f5fe047.
Verification:
|
Codex reviewFiles reviewed
FindingsBlockinginternal/controller/cachebackend_controller.go:1088 — StatefulSet PVC template drift compares live defaulted PVC specs against un-defaulted desired specs — A real apiserver defaults fields inside Should-fixinternal/controller/cachebackend_controller.go:869 — Verify: per-replica StatefulSet PVC retention is intentional and documented — The StatefulSet spec does not set docs/reference-stack/scripts/default_install_smoke.sh:1691 — StatefulSet storage smoke stops before asserting the CacheBackend status surface — The new smoke proves the StatefulSet and PVCs exist, but not that NitNone. Per-category coverage
Verdictchanges-requested |
|
Addressed in f9bfbc1.
Verification:
|
Codex reviewFiles reviewed
FindingsBlockingNone. Should-fix
Nit
Per-category coverage
Verdictchanges-requested |
|
Addressed in ed1b9e3.
Verification:
|
Codex reviewFiles reviewed
FindingsBlocking
Should-fixNone. Nit
Per-category coverage
Verdictchanges-requested |
|
Addressed in e6b4535.
Verification:
|
Codex reviewFiles reviewedapi/v1alpha1/
config/crd/bases/
config/rbac/
config/samples/
docs/design/
docs/reference-stack/scripts/
internal/controller/
FindingsBlockingNone. Should-fixapi/v1alpha1/cachebackend_types.go:567 — api/v1alpha1/cachebackend_types.go:637 — api/v1alpha1/cachebackend_types.go:645 — internal/controller/cachebackend_controller.go:745 — StatefulSet backends skip the cache-server restart cascade entirely. Since this PR makes StatefulSet a managed backend that engines can be injected against, a StatefulSet pod restart/replacement leaves existing LMCache engine clients with the same stale socket/EPIPE failure the Deployment cascade was added to repair. NitNone. Per-category coverage
Verdictchanges-requested |
|
Addressed in 2484b08.
Verification:
|
Codex reviewFiles reviewed
FindingsBlockingNone. Should-fixdocs/design/cachebackend-api.md:28 — The spec table still says docs/design/cachebackend-api.md:29 — The NitNone. Per-category coverage
Verdictchanges-requested |
|
Addressed in 49c82e5.
Verification:
|
Codex reviewFiles reviewed
FindingsBlockingNone. Should-fixinternal/controller/cachebackend_controller.go:636 — Immutable StatefulSet storage drift returns before HPA reconciliation. If the same edit removes or changes internal/controller/cachebackend_controller.go:1444 — The immutable-storage path clears NitNone. Per-category coverage
Verdictchanges-requested |
|
Addressed in 9564625.
Verification:
|
Codex reviewFiles reviewed
FindingsBlockingNone. Should-fixinternal/controller/cachebackend_controller.go:1326 — StatefulSet PVC name length is not validated for the new NitNone. Per-category coverage
Verdictchanges-requested |
|
Addressed in 88509f4.
Verification:
|
Codex reviewFiles reviewed
FindingsBlockingNone. Should-fixinternal/webhook/v1alpha1/cachebackend_webhook.go:913 — Document the new StatefulSet PVC-name admission rule — This adds a user-visible validation failure for persistent StatefulSet backends, but NitNone. Per-category coverage
Verdictchanges-requested |
|
Addressed in b0e082a.
Verification:
|
Codex reviewFiles reviewed
FindingsBlockingNone. Should-fixNone. NitNone. Per-category coverage
Verdictapprove |
Summary
Adds StatefulSet support for managed CacheBackend workloads.
deploymentKind: StatefulSetnow reconciles an owned StatefulSet, targets it from HPA, reports readiness from ready replicas, and usesvolumeClaimTemplatesfor per-replica PVCs whenspec.storage.pvcis set.Also updates generated RBAC/CRD docs, samples, design docs, controller/unit/envtest coverage, and install-smoke assertions for the StatefulSet persistent-storage path.
Linked issues
CAC-115
Checklist
Vendor-neutral naming (required — see CONTRIBUTING.md)
oci/oracle/*.oci.com/oraclecloud.comin any API group, CRD group, proto package, gRPC service/package, Kubernetes namespace, image registry, Helm chart, or Go module path.pkg/adapters/.../) — never in core controllers, CRD types, the proto contract, or default config.make install-hooksonce, then it runs on every commit).Quality
make buildandmake testpass locally.make lintclean (gofmt + go vet).make manifests generateproduces no drift (generated code committed)..status, CLI, gRPC/HTTP, install bundle/RBAC, samples)? If so, the install-smoke gate asserts it (see CONTRIBUTING.md).Contracts (only if touching CRDs or proto)
v1alpha1consumers (engines, gateway clients).proto/changed,docs/design/grpc-contract.mdis updated to match (the pre-commit hook enforces this).