strip operator-owned labels and annotations from pod template - #398
strip operator-owned labels and annotations from pod template#398benldrmn wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21af87e85b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| annotations := make(map[string]string, len(sandbox.Spec.PodTemplate.Annotations)) | ||
| maps.Copy(annotations, sandbox.Spec.PodTemplate.Annotations) | ||
| maps.DeleteFunc(annotations, func(k, _ string) bool { | ||
| return strings.HasPrefix(k, gvisorAnnotationPrefix) |
There was a problem hiding this comment.
Preserve safe gVisor flag annotations
For CRD-created sandboxes that set safe per-pod gVisor annotations such as dev.gvisor.flag.strace or dev.gvisor.flag.debug for troubleshooting, this predicate now silently drops them because it removes every dev.gvisor.* key, not just the operator-owned overlay2, qdisc, and rootfs restore annotations. The existing code path deliberately copied template annotations through to the pod, and runsc has an allowlist for safe dev.gvisor.flag.* overrides, so this is a behavior regression; please strip only the specific operator-owned keys/prefixes that can bypass Isola policy.
Useful? React with 👍 / 👎.
No description provided.