Skip to content

0.14.0: capsule/tenants controller never starts — *v1.ResourceQuota cache never syncs, so no Tenant is ever reconciled (silent, admission keeps working) #2102

Description

@antoinemichea

Bug description

On 0.14.0 the capsule/tenants controller never starts its workers: its cache never becomes
synced, the manager exits after cacheSyncTimeout, the second replica takes the lease and dies the
same way. The result is that no Tenant is ever reconciled, while admission keeps working — so
the failure is silent.

{"level":"error","logger":"setup","msg":"problem running manager",
 "error":"failed to wait for capsule/tenants caches to sync kind source: *v1.ResourceQuota:
 timed out waiting for cache to be synced for kind source: *v1.ResourceQuota"}

Starting workers ... "controller":"capsule/tenants" never appears in the logs — not once in
~2 hours and 9 container restarts.

Impact

  • observedGeneration stays behind generation: we changed spec.namespaceOptions.quota on three
    Tenants and the change was never observed (13/11, 3/1, 3/1).
  • Tenant Ready conditions stay frozen on whatever they were.
  • New namespaces get no RoleBindings and no ResourceQuota — the practical breaking point for us,
    since our CI creates tenant namespaces continuously.
  • Admission keeps working (the webhook server starts independently of the cache), so from the
    outside the operator looks healthy. Nothing alerts.

Ruled out by measurement

Hypothesis Check Result
Too many objects 103 ResourceQuotas, 158 namespaces, 4 Tenants not a volume issue
Missing RBAC kubectl auth can-i list/watch/get resourcequotas --all-namespaces --as=system:serviceaccount:capsule-system:capsule all yes
Watched API missing deviceclasses, gatewayclasses, runtimeclasses, storageclasses, resourcequotas, limitranges all served
Slow LIST LIST per kind impersonating the controller SA (largest: 5188 RoleBindings) all immediate
Slow nodes moved both replicas to faster nodes identical crashes
cacheInvalidation (chart forces 0h30m0s, API default is 24h) set to 24h, clean restart no change
cacheSyncTimeout too low raised 4m10m only delays the crash 4m → 10m

Only other signal: a single klog line "Unexpected error when reading response body" err="context deadline exceeded" (request.go:1196).

Decisive evidence

Rolling back to 0.13.9 with the same values, same nodes, same cluster, same object counts:
Starting workers ... "controller":"capsule/tenants" appears within seconds, all 4 Tenants go
Ready with generation == observedGeneration, zero errors, zero restarts. So this is specific to
0.14.0, not to our configuration.

Environment

  • Capsule 0.14.0 (Helm chart 0.14.0) → rolled back to 0.13.9
  • Kubernetes 1.35 (Talos), cert-manager for webhook TLS, 2 replicas, leader election on
  • manager.options: clientConnectionQPS: 100, clientConnectionBurst: 150, --workers=1
  • 4 Tenants (largest: 97 namespaces), ~103 tenant namespaces, 5188 RoleBindings cluster-wide
  • webhooks.hooks.globalresourcequotas.enabled: false (no GlobalResourceQuota in use)

Happy to provide full manager logs or run any instrumented build — we can reproduce by simply
bumping back to 0.14.0.

Possibly related to the stale-namespace issue we filed separately: #2101.

Activity

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions