Add unique label to pooled pods#378
Conversation
✅ Deploy Preview for agent-sandbox canceled.
|
|
Hi @antonipp. 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 Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
yongruilin
left a comment
There was a problem hiding this comment.
@janetkuo do you think it is a valid proposal?
a23a8e6 to
6fdc461
Compare
natasha41575
left a comment
There was a problem hiding this comment.
proposal seems sound to me
/lgtm
|
/assign @janetkuo |
|
@antonipp: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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. I understand the commands that are listed here. |
|
/retest |
Signed-off-by: Anton Ippolitov <anton.ippolitov@datadoghq.com>
6fdc461 to
fc2f0dd
Compare
|
New changes are detected. LGTM label has been removed. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: antonipp The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Description
This PR ensures that all Pods created by the WarmPool controller start with a unique label. This should be aligned well with the goals for all Sandboxes to have a unique and stable identity (https://github.com/kubernetes-sigs/agent-sandbox?tab=readme-ov-file#desired-sandbox-characteristics)
In our case, we need this for enforcing different Cilium Network Policies on each unique Sandbox once it's claimed from a Pool (CNPs rely on labels for selecting the Pods).
Note that it seems that someone else already had that idea:
agent-sandbox/extensions/controllers/sandboxwarmpool_controller.go
Line 252 in 1df7e4d
but the code which was commented out wouldn't work because the
podabove usesGenerateNamesopod.Namewould be emptyTesting
Deployed to a cluster, created a WarmPool, verified that pods had the expected label: