Skip to content

Reduce Secret watch pressure on seeds by splitting ManagedResource data #61

@rfranzke

Description

@rfranzke

/area control-plane
/area scalability
/area performance
/kind poc
/label teamsize/medium

What is the topic about?:

Problem

gardener-resource-manager stores rendered manifests in Secret objects referenced by ManagedResource.spec.secretRefs. This was deliberate — ManagedResources can contain Kubernetes Secret resources that must be encrypted at rest in etcd.

However, this means all manifest data (Deployments, Services, RBAC, etc.) lives in Secrets, even when it contains nothing sensitive. On a seed cluster, this leads to:

  • A large number of Secrets in etcd (roughly 1:1 with ManagedResources)
  • Elevated memory and network I/O for every pod that watches Secrets (even if it only cares about a handful)
  • Unnecessary etcd pressure from watch events on non-sensitive data

Proposed Solution

Split the ManagedResource data store by sensitivity:

  1. Sensitive manifests (i.e., Kubernetes Secret resources) stay in Secret objects — encrypted at rest as today.
  2. Non-sensitive manifests (everything else) move to a new dedicated custom resource (e.g., ManagedResourceData or similar) that is not in the Secret watch surface.

gardener-resource-manager would be adapted to read from both sources. During reconciliation, it already knows which resource types it is deploying, so the split can be determined at write time by the deploying controller.

Tasks

  1. Audit Secret watchers on seeds: Identify which pods in seed clusters are watching Secret resources (e.g., shoot-dns-service in control plane namespaces, extension controllers, cert-manager, etc.). Measure the memory and network I/O impact of the current Secret volume on these pods. This provides the data to justify the change and quantifies the expected benefit.
  2. Design the new resource type: Define a CRD for non-sensitive ManagedResource data. Decide on schema, naming, and namespace scoping.
  3. Adapt gardener-resource-manager: Support reading manifests from both Secret refs (sensitive) and the new CRD refs (non-sensitive). Maintain backward compatibility with existing spec.secretRefs.
  4. Adapt deploying controllers: Modify the controllers that create ManagedResources (e.g., in pkg/component/) to split manifests by sensitivity at write time.
  5. Migration path: Ensure a smooth transition — existing ManagedResources with all data in Secrets must continue to work. Consider a phased rollout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Q2/2026This topic is relevant for the hackathon in Q2/2026.area/control-planeControl plane relatedarea/performancePerformance (across all domains, such as control plane, networking, storage, etc.) relatedarea/scalabilityScalability relatedkind/pocProof of concept or prototypeteamsize/mediumA team of 3 people.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions