-
Notifications
You must be signed in to change notification settings - Fork 669
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
[WIP] [TestLeaderElection] e2e: build a descheduler image and run the descheduler as a pod #1497
base: master
Are you sure you want to change the base?
Conversation
…lugins/removepodshavingtoomanyrestarts"
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @hsunwenfang! |
Hi @hsunwenfang. Thanks for your PR. I'm waiting for a kubernetes-sigs 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-sigs/prow repository. |
[ASK] |
test/e2e/e2e_leaderelection_test.go
Outdated
"sigs.k8s.io/descheduler/pkg/descheduler" | ||
) | ||
|
||
// Should use something like "sigs.k8s.io/descheduler/pkg/framework/plugins/removepodshavingtoomanyrestarts" |
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.
yes, in this case it would be "sigs.k8s.io/descheduler/pkg/framework/plugins/podlifetime"
.
leaderelection does not have a corresponding plugin. It's a configuration of the whole descheduler. So first you need to create a podlifetime policy (similar to |
No need to update |
test/e2e/e2e_leaderelection_test.go
Outdated
}, | ||
{ | ||
Name: defaultevictor.PluginName, | ||
Args: &defaultevictor.DefaultEvictorArgs{ |
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.
Args in &defaultevictor.DefaultEvictorArgs follows #1472
Which may not be the proper args here
test/e2e/e2e_leaderelection_test.go
Outdated
@@ -124,10 +157,18 @@ func TestLeaderElection(t *testing.T) { | |||
} | |||
t.Logf("Removed kube-system/descheduler lease") | |||
|
|||
tc := struct { |
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.
use single tc here instead of the tests []struct in #1472
Not sure if it's better to use []struct, includes the cases of ns1 and ns2 then run
But I suppose ns1 and ns2 should belongs to the same test case
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.
There's currently only a single test to be run. With two descheduler pods run in the same namespace (kube-system).
Hi @ingvagabund Big thanks again! |
The goal here is to create two descheduler Deployments: https://github.com/kubernetes-sigs/descheduler/blob/master/test/e2e/e2e_toomanyrestarts_test.go#L213. Each deployment with its policy in its own configmap: https://github.com/kubernetes-sigs/descheduler/blob/master/test/e2e/e2e_toomanyrestarts_test.go#L195. Both deployments running in the same namespace. |
Hi @ingvagabund Thx! |
kube-system
If you mean a descheduler deployment, then:
If you mean
Correct. This is a leftover I forgot to remove. |
…Namespace string)
Hi @ingvagabund
Plus, in And I expect How should I auth for this image? Or use the local built image with |
You can update DESCHEDULER_IMAGE to point to |
PR needs rebase. 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. |
[TODO] policy function like func tooManyRestartsPolicy()
[TODO] func initPluginRegistry()