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

Use a uniquely identifying selector based on recommended labels for Kueue deployment #1695

Merged
merged 6 commits into from Mar 5, 2024

Conversation

astefanutti
Copy link
Member

@astefanutti astefanutti commented Feb 6, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR proposes to change the default label selector currently used by the Kueue deployment from:

control-plane: controller-manager

to the following selector, that uses Kubernetes recommended labels to uniquely identify Kueue Pods:

app.kubernetes.io/name: kueue
app.kubernetes.io/component: controller

Which issue(s) this PR fixes:

Fixes #1685

Special notes for your reviewer:

The script that updates the Helm charts has to be adapted to apply parameterised labels selectors.

Does this PR introduce a user-facing change?

Use recommended labels and a uniquely identifying selector for Kueue deployment resources.

ACTION REQUIRED: You need to recreate the Kueue deployment if you had it previously installed,
 as the label selector field is immutable.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Feb 6, 2024
Copy link

netlify bot commented Feb 6, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 0915e3b
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/65e6d12828f25d00084a6b53

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 6, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @astefanutti. 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.

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.

@k8s-ci-robot k8s-ci-robot added 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. labels Feb 6, 2024
@alculquicondor
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 9, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 13, 2024
@astefanutti astefanutti marked this pull request as ready for review February 13, 2024 18:18
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 13, 2024
Copy link
Contributor

@mimowo mimowo left a comment

Choose a reason for hiding this comment

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

Generally lgtm, some asks for explanations as I'm not that familiar with the helm scripts yet

charts/kueue/templates/_helpers.tpl Show resolved Hide resolved
charts/kueue/templates/prometheus/monitor.yaml Outdated Show resolved Hide resolved
config/components/prometheus/monitor.yaml Show resolved Hide resolved
hack/update-helm.sh Show resolved Hide resolved
@astefanutti
Copy link
Member Author

/test pull-kueue-test-e2e-main-1-27

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 27, 2024
@astefanutti
Copy link
Member Author

/test pull-kueue-test-integration-main

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

Overall lgtm
I left comments for some nits.
/approve

Makefile Outdated Show resolved Hide resolved
config/components/visibility/service.yaml Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 2, 2024
@astefanutti
Copy link
Member Author

/retest

@astefanutti
Copy link
Member Author

/test pull-kueue-verify-main

@alculquicondor
Copy link
Contributor

It looks like something went rogue in the bot.

@alculquicondor
Copy link
Contributor

PTAL kubernetes/test-infra#32152

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

Thank you!
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 5, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: astefanutti, tenzen-y

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

@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: da7d427c1e61473d95ef960c610b8dfd6c313c96

@k8s-ci-robot k8s-ci-robot merged commit bbcb47b into kubernetes-sigs:main Mar 5, 2024
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.7 milestone Mar 5, 2024
@astefanutti astefanutti deleted the pr-12 branch March 5, 2024 09:31
vsoch pushed a commit to researchapps/kueue that referenced this pull request Apr 18, 2024
…ueue deployment (kubernetes-sigs#1695)

* Use recommended labels and a uniquely identifying selector

* update-helm script applies k8s recommended labels

* Use kueue.labels as label selector in Helm ServiceMonitor chart

* Add app.kubernetes.io/instance label back to Helm kueue.selectorLabels

* Update config/components/visibility/service.yaml

Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>

* Update Makefile

Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>

---------

Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@k8s-ci-robot k8s-ci-robot added release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels May 8, 2024
@alculquicondor
Copy link
Contributor

I'm worried that this change can cause significant friction to upgrade.

Should we consider a revert? Is anyone familiar with how other projects have achieved this change with minimal disruption?

@tenzen-y
Copy link
Member

tenzen-y commented May 8, 2024

I'm worried that this change can cause significant friction to upgrade.

Should we consider a revert? Is anyone familiar with how other projects have achieved this change with minimal disruption?

Your concern is right. Actually, the apply command should be failed since updating the label is not allowed.
In my OSS experience, I usually follow the deprecation steps like:

  1. Support both (old and new) labels for 1 or 2 releases and notice breaking changes to users.
  2. After 1 or 2 releases pass away, old labels are removed.

@alculquicondor I'm curious about whether we can do a similar approach.
WDYT?

@alculquicondor
Copy link
Contributor

Overall, that sounds good, but: at some point, we will have to update the Deployment object. And that will always be a breaking change.
Unless, in addition to your plan, we create a new Deployment and change the existing one to have 0 replicas?

@tenzen-y
Copy link
Member

tenzen-y commented May 9, 2024

Overall, that sounds good, but: at some point, we will have to update the Deployment object. And that will always be a breaking change.

You're right.

Unless, in addition to your plan, we create a new Deployment and change the existing one to have 0 replicas?

That makes sense.

@alculquicondor
Copy link
Contributor

So for now, let's revert the selector change and add the old and new labels?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. 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.

Kueue deployment should use non-overlapping label selector
5 participants