-
Notifications
You must be signed in to change notification settings - Fork 344
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
feat: controller leader election #173
Conversation
Codecov Report
@@ Coverage Diff @@
## master #173 +/- ##
==========================================
- Coverage 48.71% 48.65% -0.07%
==========================================
Files 30 30
Lines 1480 1482 +2
==========================================
Hits 721 721
- Misses 673 675 +2
Partials 86 86
Continue to review full report at Codecov.
|
e2e test failed.
|
@gxthrj It's due to the controller didn't push the resources quickly to apisix. |
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.
it seems that we need to add some E2E test case for this PR.
maybe the https://github.com/chaos-mesh/chaos-mesh is useful for us.
Already mimics the behavior in e2e cases. What i did is killing the leader controller, and wait for a while until another leader was elected. |
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.
LGTM
8852adb
to
2cb331a
Compare
@gxthrj ping |
@@ -112,3 +115,32 @@ func (s *Scaffold) ScaleHTTPBIN(desired int) error { | |||
} | |||
return nil | |||
} | |||
|
|||
// WaitAllHTTPBINPods waits until all httpbin pods ready. | |||
func (s *Scaffold) WaitAllHTTPBINPoddsAvailable() error { |
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.
why not use k8s.WaitUntilNumPodsCreatedE(...)
?
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.
It just checks number of Pods are created, not number of Pods are ready.
What we need is the latter, since only a Pod is ready, can it exists in the Endpoints ready addresses.
We'd better link related issues. |
Already linked it. See the PR's overview. |
Please answer these questions before submitting a pull request
Why submit this pull request?
Bugfix
New feature provided
Improve performance
Backport patches
Related issues
#85
Bugfix
Description
How to fix?
New feature or improvement
Backport patches
Why need to backport?
Source branch
Related commits and pull requests
Target branch