[release-4.22] OCPBUGS-90550: Fix node label matching in triggerReconciliation#721
Conversation
Replace reflect.DeepEqual with proper label selector matching. This ensures the operator correctly creates IngressNodeFirewallNodeState objects for nodes added after the operator starts. The previous implementation used DeepEqual which required exact label match. The new implementation uses labels.SelectorFromSet which properly handles label selectors per Kubernetes semantics.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@openshift-cherrypick-robot: Jira Issue OCPBUGS-86839 has been cloned as Jira Issue OCPBUGS-90550. Will retitle bug to link to clone. 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. |
|
@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-90550, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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. |
|
/jira refresh |
|
@smulje: This pull request references Jira Issue OCPBUGS-90550, which is invalid:
Comment 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. |
|
/jira refresh |
|
@smulje: This pull request references Jira Issue OCPBUGS-90550, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (core-networking-bot@redhat.com), skipping review request. 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. |
|
@openshift-cherrypick-robot: 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. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danwinship, openshift-cherrypick-robot 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 |
Testing Done1. Created vanilla cluster with cluster-botLaunched a 4.22 cluster using cluster-bot. 2. Patched to use custom image with fixPrevent CVO from managing the operator deployment: oc patch clusterversion version --type='merge' -p '{"spec":{"overrides":[{"kind":"Deployment","group":"apps","name":"ingress-node-firewall-controller-manager","namespace":"openshift-ingress-node-firewall","unmanaged":true}]}}'
# clusterversion.config.openshift.io/version patched
Scale down CVO to prevent reversion:
oc scale --replicas=0 deployment/cluster-version-operator -n openshift-cluster-version
# deployment.apps/cluster-version-operator scaled
Get the CSV name:
oc get csv -n openshift-ingress-node-firewall
# NAME DISPLAY VERSION PHASE
# ingress-node-firewall.v4.22.0-202606081046 Ingress Node Firewall Operator 4.22.0-202606081046 Succeeded
Patch CSV to use custom image with the fix:
oc patch csv ingress-node-firewall.v4.22.0-202606081046 \
-n openshift-ingress-node-firewall \
--type='json' \
-p='[{"op": "replace", "path": "/spec/install/spec/deployments/0/spec/template/spec/containers/0/image", "value":"quay.io/smulje/ingress-node-firewall-operator:fix-node-matching"}]'
# clusterserviceversion.operators.coreos.com/ingress-node-firewall.v4.22.0-202606081046 patched
3. Verified pod is using the custom image
oc get pod -l control-plane=controller-manager \
-n openshift-ingress-node-firewall \
-o jsonpath='{.items[0].spec.containers[0].image}' && echo
# quay.io/smulje/ingress-node-firewall-operator:fix-node-matching
**Confirmed operator is running with the patched image containing the node label matching fix.**
4. Scaled nodes and verified IngressNodeFirewallNodeState creation
Scaled up worker nodes and verified that IngressNodeFirewallNodeState objects are correctly created for nodes added after the operator starts.
**Fix verified - nodes added post-operator startup now correctly trigger IngressNodeFirewallNodeState creation.**/verified by @smulje |
|
@smulje: This PR has been marked as verified by 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. |
8fb302e
into
openshift:release-4.22
|
@openshift-cherrypick-robot: Jira Issue OCPBUGS-90550: All pull requests linked via external trackers have merged: All linked pull requests have the 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. |
|
@openshift-cherrypick-robot: new pull request created: #724 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. |
This is an automated cherry-pick of #719
/assign smulje
/cherrypick release-4.21 release-4.20 release-4.19 release-4.18