[release-4.7] Bug 1937214: Fix spurious reconciliation of NodePort services#570
Conversation
This commit improves log output when reconciling managed resources to include the diff between the current and updated resources when updating resources. * pkg/operator/controller/canary/route.go (updateCanaryRoute): Log the diff between the current and updated resources when updating the route. * pkg/operator/controller/ingress/cluster-role.go (ensureClusterRole): Move logging of updates from here... (updateClusterRole): ...to here. Log diff. * pkg/operator/controller/ingress/dns.go (ensureWildcardDNSRecord): Move logging of updates from here... (updateDNSRecord): ...to here. Log diff. * pkg/operator/controller/ingress/load_balancer_service.go (ensureLoadBalancerService): Move logging of updates from here... (updateLoadBalancerService): ...to here. Log diff. * pkg/operator/controller/ingress/monitoring.go (ensureServiceMonitor): Move logging of updates from here... (updateServiceMonitor): ...to here. Log diff. * pkg/operator/controller/ingress/nodeport_service.go (ensureNodePortService): Move logging of updates from here... (updateNodePortService): ...to here. Log diff. * pkg/operator/controller/ingress/poddisruptionbudget.go (ensureRouterPodDisruptionBudget): Move logging of updates from here... (updateRouterPodDisruptionBudget): ...to here. Log diff. * pkg/operator/controller/ingress/rsyslog_configmap.go (ensureRsyslogConfigMap): Move logging of updates from here... (updateRouterPodDisruptionBudget): ...to here. Log diff. * pkg/operator/controller/ingress/serviceca_configmap.go (ensureServiceCAConfigMap): Move logging of updates from here... (updateServiceCAConfigMap): ...to here. Log diff.
Ignore the clusterIPs field when comparing NodePort services to determine whether an update is required. Before this commit, the update logic would keep trying to revert the default value that the API set for the service's clusterIPs field. The clusterIPs field is new in Kubernetes 1.20 (OpenShift 4.7). This commit fixes bug 1936030. https://bugzilla.redhat.com/show_bug.cgi?id=1936030 * pkg/operator/controller/ingress/nodeport_service.go (nodePortServiceChanged): Ignore the service's clusterIPs field. * pkg/operator/controller/ingress/nodeport_service_test.go (TestNodePortServiceChanged): Verify that nodePortServiceChanged returns false if the only mutation is that the clusterIPs field's value has changed.
|
@openshift-cherrypick-robot: Bugzilla bug 1936030 has been cloned as Bugzilla bug 1937214. Retitling PR to link against new bug. 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/test-infra repository. |
|
@openshift-cherrypick-robot: This pull request references Bugzilla bug 1937214, 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 kubernetes/test-infra repository. |
|
/test e2e-aws-operator |
|
@Miciah: The specified target(s) for
Use
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/test-infra repository. |
|
/test e2e-aws-operator |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: openshift-cherrypick-robot, sgreene570 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 |
|
/bugzilla refresh Recalculating validity in case the underlying Bugzilla bug has changed. |
|
@openshift-bot: This pull request references Bugzilla bug 1937214, 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 kubernetes/test-infra repository. |
|
/bugzilla refresh Recalculating validity in case the underlying Bugzilla bug has changed. |
|
@openshift-bot: This pull request references Bugzilla bug 1937214, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 6 validation(s) were run on this bug
Requesting review from QA contact: 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/test-infra repository. |
|
/bugzilla cc-qa |
|
@lihongan: This pull request references Bugzilla bug 1937214, which is valid. 6 validation(s) were run on this bug
Requesting review from QA contact: 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/test-infra repository. |
|
@openshift-cherrypick-robot: All pull requests linked via external trackers have merged: Bugzilla bug 1937214 has been moved to the MODIFIED state. 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/test-infra repository. |
This is an automated cherry-pick of #567
/assign Miciah