-
Notifications
You must be signed in to change notification settings - Fork 192
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
OCPBUGS-30833: Added a check for loadBalancerClass for built-in load balancing service. #3142
Conversation
Hi @jdhirst. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
/assign @pacevedom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I left one small comment.
@@ -154,7 +154,7 @@ func (c *LoadbalancerServiceController) updateServiceStatus(key string) error { | |||
klog.Infof("Service %s does not exist anymore", key) | |||
} else { | |||
svc := obj.(*corev1.Service) | |||
if svc.Spec.Type != corev1.ServiceTypeLoadBalancer { | |||
if svc.Spec.Type != corev1.ServiceTypeLoadBalancer || (svc.Spec.LoadBalancerClass != nil && *svc.Spec.LoadBalancerClass != "microshift-internal") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the controller is too open now (thanks for catching that!), this might be a bit too restrictive. This controller acts not just on MicroShift-owned resources, but also on any LoadBalancer
service
owned by applications.
By requiring the loadBalancerClass
to match an expected value, MicroShift would be imposing that need to already deployed services and they would fail to pick up IPs again. This would happen in an upgrade, for example. Also, requiring this value in application's manifests would break compatibility with OpenShift and would require specific configuration for apps to run on MicroShift.
Instead of checking a specific value of the loadBalancerClass
, I would check for emptiness instead.
From the docs:
If you specify .spec.loadBalancerClass, it is assumed that a load balancer implementation that matches the specified class is watching for Services. Any default load balancer implementation (for example, the one provided by the cloud provider) will ignore Services that have this field set.
I would drop the second part of the new check and that should work in all cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reviewing my request! Yep, that makes perfect sense! I updated the PR with only the check for nil now 😄
/retitle OCPBUGS-30833: Added a check for loadBalancerClass for built-in load balancing service. |
@jdhirst: This pull request references Jira Issue OCPBUGS-30833, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In 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 |
@dhellmann: This pull request references Jira Issue OCPBUGS-30833, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: In 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. |
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified to be working by QE.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jdhirst, pacevedom 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 |
/ocpbugs cc-qa |
/label qe-approved |
@jdhirst: This pull request references Jira Issue OCPBUGS-30833, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: In 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. |
Details of the pre-merge testing can be found in JIRA ticket for the bug. |
@jdhirst: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
@jdhirst: Jira Issue OCPBUGS-30833: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-30833 has been moved to the MODIFIED state. In 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. |
Fixes #3136
Which issue(s) this PR addresses: #3136
Closes #3136
This is my idea for an option to implement the checking of loadBalancerClass in the internal load balancing service. It would avoid conflicts with metallb or other load balancers being used.
I specified "microshift-internal" as the name of the internal balancer service, but that could be anything really, was just the first thing that I thought of.
Let me know what you think 😄