Skip to content

operator: memleak with identities of deleted Pods retained in memory #2647

Description

v1.2.3, hubble control plane, EKS + VPC CNI, 3 nodes / 169 pods.

retina-operator RSS grows linearly, 27 → 68 MiB over 15 days, no plateau.

The operator holds one entry per allocated identity in IdentityManager.labelIdentities and in the underlying CachingIdentityAllocator local keys. It is freed only when a Pod delete event is matched in the store (handlePodDelete); anything missed is retained for the process lifetime. Every CronJob Pod allocates a unique identity (job-name/controller-uid labels) — ~4500/day on this cluster.

Evidence: the operator still syncs identities of Jobs that finished days ago, whose CiliumIdentity is long gone:

level=warn caller=identitybackend/identity.go:184 msg="Unable update CRD identity information with a reference for this node" error="identity (id:\"5277\",key:\"[... k8s:job-name=nats-backup-29773815]\") does not exist"

The job-name suffix is minutes-since-epoch: that Job ran 2 days earlier, and the oldest one still referenced is 10 days old. The CiliumIdentity CRs themselves are GC'd correctly (252 live).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions