Skip to content

feat(webhooks): add stargz runtime injector webhook#7042

Open
lingdie wants to merge 2 commits into
labring:mainfrom
lingdie:feat/stargz-runtime-injector-webhook
Open

feat(webhooks): add stargz runtime injector webhook#7042
lingdie wants to merge 2 commits into
labring:mainfrom
lingdie:feat/stargz-runtime-injector-webhook

Conversation

@lingdie

@lingdie lingdie commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a mutating admission webhook that injects runtimeClassName: stargz for Pods whose images come from configured internal registries
  • Skip Devbox Pods automatically via devbox.sealos.io/v1alpha2 Devbox controller ownerReferences
  • Include node deploy script (deploy-stargz-runtime.sh), cluster apply script, kustomize manifests, and info-level webhook logs for troubleshooting

Test plan

  • go test ./internal/webhook/...
  • Deploy webhook with apply-cluster-stargz-webhook.sh or deploy/manifest.yaml
  • Verify public registry Pod is not mutated (runtimeClassName empty)
  • Verify internal registry Pod gets runtimeClassName: stargz
  • Verify Devbox Pod is skipped
  • Verify webhook logs show skip/inject reason on Pod create

@lingdie lingdie requested a review from a team as a code owner July 3, 2026 03:35
@pull-request-size

Copy link
Copy Markdown

Whoa! Easy there, Partner!

This PR is too big. Please break it up into smaller PRs.

Introduce a mutating admission webhook that injects runtimeClassName stargz
for Pods using configured internal registries, with devbox pod skip, deploy
scripts, and kustomize manifests for cluster rollout.

Co-authored-by: Cursor <cursoragent@cursor.com>
@lingdie lingdie force-pushed the feat/stargz-runtime-injector-webhook branch from 3c6dca3 to e470e51 Compare July 3, 2026 03:39
Apply gci, gofumpt, and golines formatting and remove unused nolint directives.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant