Skip to content

strip operator-owned labels and annotations from pod template - #398

Open
benldrmn wants to merge 2 commits into
mainfrom
fix/strip-owned-metadata
Open

strip operator-owned labels and annotations from pod template#398
benldrmn wants to merge 2 commits into
mainfrom
fix/strip-owned-metadata

Conversation

@benldrmn

Copy link
Copy Markdown
Collaborator

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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