Skip to content

fix: keep CachedImage names within the 63-char label limit - #196

Merged
Breee merged 4 commits into
mainfrom
fix/cachedimage-name-label-limit
Oct 23, 2026
Merged

Breee merged 4 commits into
mainfrom
fix/cachedimage-name-label-limit

Conversation

@Breee

@Breee Breee commented Oct 23, 2026

Copy link
Copy Markdown
Member

Pull Pods were rejected for CachedImageSet children with names > 63 chars (label value limit).

  • CEL: reject CachedImage / CachedImageSet names > 63 chars
  • Child naming: <image>-<tag>-<hash> (hash covers parent + ref), capped at 63
  • Existing children with a stale name are recreated once
  • Unit, envtest and chainsaw e2e (cachedimageset-long-names) coverage

Note: unit tests not run locally; relying on CI.

Wachter, Julian added 4 commits October 23, 2026 16:15
CachedImage names are used as the drop.corewire.io/cachedimage label on pull
Pods, and CachedImageSet names as the drop.corewire.io/imageset label on
children. Child names could reach 253 chars, so pull Pod creation was
rejected ("must be no more than 63 bytes").

- Reject CachedImage and CachedImageSet names over 63 chars via CEL.
- Name children <image>-<tag>-<hash> (hash covers parent + ref), capped at 63.
- Recreate existing children whose name no longer matches.
- Add unit, envtest and chainsaw e2e coverage.
Resolves govulncheck findings GO-2026-6599..6809 (crypto/x509, crypto/tls,
net/http, http2, html/template, net/textproto).
The manager cached every Pod, Secret and full Node in the cluster. On a
cluster with ~3000 Pods and 144 build Nodes (large status.images) it was
OOMKilled at the 128Mi limit within seconds of starting.

- Pod and Secret informers are limited to the pod namespace (all reads
  already target only that namespace).
- Node status.images (never read) is dropped from the cache.
- managedFields are stripped from all cached objects.
v2.13.2 cannot load go1.27.3 export data (typecheck failures in stdlib
imports).
@Breee
Breee merged commit 2cde00e into main Oct 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant