Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cureent kube-scheduler and scheduler-extender can't run more than one pod because they do not use leader election, This PR adds
leaderElect
to controllerkube-scheduler
andhami-scheduler
servers, whether use leader election. default: use helm.Release.Namespace
value to setleader-elect-resource-namespace
.Fixes: #195
Test:
Start two scheduler pods; only one pod can execute the scheduler flow.
![image](https://private-user-images.githubusercontent.com/15009201/321849078-17ec4963-4eac-41f1-99c3-f7c83b02765f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTk1MjUsIm5iZiI6MTczOTE5OTIyNSwicGF0aCI6Ii8xNTAwOTIwMS8zMjE4NDkwNzgtMTdlYzQ5NjMtNGVhYy00MWYxLTk5YzMtZjdjODNiMDI3NjVmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDE0NTM0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVjMDY0MzQwYmMzYWQ2YzhhODY0MTUxZGU3MzgxZjFiNjBjY2RjMmY3N2ZlZGIxYTExYWJiODllYmU5N2RjYzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Pj2gfCfh-AqwsGwfiUUGWbZy8dhMbQ8dvhGxdeLah1Y)
Start three use gpu pods that can running success.
![image](https://private-user-images.githubusercontent.com/15009201/321849243-c5e20a69-3f9a-4101-8790-1d9e48d24675.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTk1MjUsIm5iZiI6MTczOTE5OTIyNSwicGF0aCI6Ii8xNTAwOTIwMS8zMjE4NDkyNDMtYzVlMjBhNjktM2Y5YS00MTAxLTg3OTAtMWQ5ZTQ4ZDI0Njc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDE0NTM0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ0MWM3NzM5NDRkZWViNWRkOTgwNDMxMjAxMGE0Y2QwMWEyODFhMWYxOGRjMjc0ZTc4ZTkxOWRmZmNhYTIzNGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.X81pgpPj5gazbZIhbdZo1R_NliXUOaC-uVdV449SBm4)