-
Notifications
You must be signed in to change notification settings - Fork 253
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
base: master
Are you sure you want to change the base?
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 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: huangmingxia 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2829 +/- ##
==========================================
- Coverage 50.40% 50.39% -0.01%
==========================================
Files 279 279
Lines 34194 34189 -5
==========================================
- Hits 17235 17231 -4
- Misses 15595 15597 +2
+ 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! |
|
@huangmingxia: The following test failed, say
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.