Skip to content

feat: add KEP-0174 for label and annotation propagation to sandbox pods#439

Open
chw120 wants to merge 2 commits intokubernetes-sigs:mainfrom
chw120:kep-0174-metadata-propagation
Open

feat: add KEP-0174 for label and annotation propagation to sandbox pods#439
chw120 wants to merge 2 commits intokubernetes-sigs:mainfrom
chw120:kep-0174-metadata-propagation

Conversation

@chw120
Copy link
Contributor

@chw120 chw120 commented Mar 19, 2026

This PR introduces KEP-174, which proposes a standardized mechanism to propagate labels and annotations from top-level user requests (SandboxClaim) down to the final compute resources (Pod).

Working on #174

@netlify
Copy link

netlify bot commented Mar 19, 2026

Deploy Preview for agent-sandbox canceled.

Name Link
🔨 Latest commit fb05884
🔍 Latest deploy log https://app.netlify.com/projects/agent-sandbox/deploys/69bc86e2b555a600089d888d

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 19, 2026
@k8s-ci-robot
Copy link
Contributor

Hi @chw120. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 19, 2026
// ...
AdditionalSandboxMetadata AdditionalSandboxMetadata `json:"additionalSandboxMetadata,omitempty"`
// Another option is to create AdditionalPodMetadata instead of depending on sandboxv1alpha1.
AdditionalPodMetadata sandboxv1alpha1.PodMetadata `json:"additionalPodMetadata,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you need additional metadata for both sandbox and pod ?
because sandbox additional metadata will propagate to the pod.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I got this wrong. You're keeping labels/annotations at the sandbox separate from that of the pod. ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it will give the users options to add the custom metadata to sandbox level, pod level, or both levels.

#### Implementation Guidance

1. The SandboxClaim controller propagates additional metadata to the assigned Sandbox resource.
2. The Sandbox controller merges these values with the base template and injects them into the final Pod.
Copy link
Contributor

Choose a reason for hiding this comment

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

how are conflicts handled ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it's in "Safety Principle: No Overrides" section, that if a key exists with different values, the request will be rejected with an error.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: aditya-shantanu, chw120
Once this PR has been reviewed and has the lgtm label, please assign janetkuo for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants