Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kubernetes_platform): Update kubernetes_platform go package to include node affinities and pod (anti)affinities #10583

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

cjidboon94
Copy link
Contributor

Description of your changes:
Part of #9768 and #9682

This PR adds Node Affinities and Pod Affinities and Anti-Affinities to the kubernetes platform proto file. It also regenerates the Golang stub.

To quote @droctothorpe mentioned in his PR

This PR follows the piece-meal approach that @Tomcli led by example with in #10357 and clarified in #10357 (comment).
We will submit a follow up PR that updates driver.go and another PR that updates the SDK.

All the relevant information about node affinities and pod (anti)affinity is captured in the NodeAffinity and PodAffinity proto messages and should be enough to generate all possible node- and podaffinities.

Checklist:

Copy link

google-cla bot commented Mar 18, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link

Hi @cjidboon94. Thanks for your PR.

I'm waiting for a kubeflow 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.

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/test-infra repository.

@Tomcli
Copy link
Member

Tomcli commented Mar 18, 2024

/ok-to-test

Copy link
Member

@Tomcli Tomcli left a comment

Choose a reason for hiding this comment

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

/lgtm
/assign @chensun

@cjidboon94
Copy link
Contributor Author

I see there's still a few things missing in the proto. There's no way to distinguish between matchExpressions/matchLabels/matchFields (currently assumed it was all just matchExpressions). And there's some namespace selection stuff that are missing for PodAffinity. Willl add these tomorrow

https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#podaffinityterm-v1-core
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#nodeselectorterm-v1-core

@google-oss-prow google-oss-prow bot removed the lgtm label Mar 19, 2024
Copy link
Member

@Tomcli Tomcli left a comment

Choose a reason for hiding this comment

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

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Mar 19, 2024
Copy link
Member

@chensun chensun left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chensun

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

The pull request process is described here

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

@rimolive
Copy link
Member

@cjidboon94 Can you please rebase this PR?

@cjidboon94
Copy link
Contributor Author

@cjidboon94 Can you please rebase this PR?

Done

Copy link

@cjidboon94: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
kfp-kubernetes-execution-tests 61cede0 link false /test kfp-kubernetes-execution-tests

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/test-infra repository. I understand the commands that are listed here.

@rimolive
Copy link
Member

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Mar 26, 2024
@google-oss-prow google-oss-prow bot merged commit 4f8cae2 into kubeflow:master Mar 26, 2024
9 of 10 checks passed
petethegreat pushed a commit to petethegreat/pipelines that referenced this pull request Mar 27, 2024
…nclude node affinities and pod (anti)affinities (kubeflow#10583)

* feat(kubernetes_platform): Update kubernetes_platform go package to include nodeaffinities and pod (anti)affinities

Signed-off-by: Cornelis Boon <[email protected]>

* rename affinity objects and fields to match k8s spec semantics

Signed-off-by: Cornelis Boon <[email protected]>

* rename *AffinityRule -> *AffinityTerm and add missing affinity data

Signed-off-by: Cornelis Boon <[email protected]>

---------

Signed-off-by: Cornelis Boon <[email protected]>
petethegreat pushed a commit to petethegreat/pipelines that referenced this pull request Mar 29, 2024
…nclude node affinities and pod (anti)affinities (kubeflow#10583)

* feat(kubernetes_platform): Update kubernetes_platform go package to include nodeaffinities and pod (anti)affinities

Signed-off-by: Cornelis Boon <[email protected]>

* rename affinity objects and fields to match k8s spec semantics

Signed-off-by: Cornelis Boon <[email protected]>

* rename *AffinityRule -> *AffinityTerm and add missing affinity data

Signed-off-by: Cornelis Boon <[email protected]>

---------

Signed-off-by: Cornelis Boon <[email protected]>
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.

4 participants