-
Notifications
You must be signed in to change notification settings - Fork 254
HIVE-2199: Drop prefix-based ownership checks in MachinePool controller #2829
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
Conversation
|
@huangmingxia: This pull request references HIVE-2199 which is a valid jira issue. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
/hold |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2829 +/- ##
==========================================
+ Coverage 50.40% 50.46% +0.06%
==========================================
Files 279 279
Lines 34194 34246 +52
==========================================
+ Hits 17235 17283 +48
- Misses 15595 15602 +7
+ Partials 1364 1361 -3
🚀 New features to boost your workflow:
|
1424218 to
f8ab8d0
Compare
|
This is looking good. Please remember to update the PR title/description and commit message. |
|
/retitle HIVE-2199: Drop prefix-based ownership checks in MachinePool controller |
|
@huangmingxia: This pull request references HIVE-2199 which is a valid jira issue. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
@2uasimojo Thank you very much for your review :) |
|
@huangmingxia Almost there. Need to update the commit message as well (which will unfortunately require a fresh push and CI run). The |
The isControlledByMachinePool function previously used a two-step approach: first checking for the machinePoolNameLabel, then falling back to prefix-based matching with HiveManagedLabel. This fallback logic was error-prone and could cause false positives. This commit simplifies the ownership detection to only check the machinePoolNameLabel, making it explicit and safer. Objects are now considered controlled by a MachinePool only if they have the hive.openshift.io/machine-pool label matching the pool name. Changes: - Remove prefix-based fallback logic from isControlledByMachinePool - Remove unused cd parameter from syncMachineAutoscalers function - Update all call sites to match the simplified function signatures - Update unit tests to reflect the label-only ownership model This ensures that MachineSets and MachineAutoscalers are only managed when they are explicitly labeled, preventing accidental modification or deletion of objects that happen to match naming patterns but aren't actually managed by Hive.
f8ab8d0 to
bc52047
Compare
|
@2uasimojo Ah, my bad - I missed that. Thanks for the reminder! |
|
/lgtm Ready when you are @huangmingxia |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 2uasimojo, huangmingxia The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@2uasimojo: Overrode contexts on behalf of 2uasimojo: ci/prow/security DetailsIn response to this:
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. |
|
/unhold |
|
/override ci/prow/security |
|
@huangmingxia: huangmingxia unauthorized: /override is restricted to Repo administrators, approvers in top level OWNERS file, and the following github teams:openshift: openshift-release-oversight openshift-staff-engineers openshift-sustaining-engineers. DetailsIn response to this:
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. |
|
@2uasimojo When you have a chance, could you please help override ci/prow/security again? Thank you very much. |
|
/override ci/prow/security |
|
I swear override used to stick as long as no intervening commits... |
|
@2uasimojo: Overrode contexts on behalf of 2uasimojo: ci/prow/security DetailsIn response to this:
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. |
|
It might be because I unheld the PR, which caused the job to be retriggered. Thanks again for your time. |
|
@huangmingxia: all tests passed! Full PR test history. Your PR dashboard. 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. |
What does this PR do
hive.openshift.io/machine-poollabel value equalsMachinePool.spec.name. The previous name-prefix / hive.openshift.io/managed fallback is removed.