Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cockroachlabs/crl-scheduler
https://github.com/cockroachlabs/crl-scheduler
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cockroachlabs/crl-scheduler
- Owner: cockroachlabs
- License: apache-2.0
- Created: 2020-09-04T19:49:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-04T19:57:18.000Z (over 4 years ago)
- Last Synced: 2024-08-05T17:23:35.538Z (6 months ago)
- Language: Go
- Homepage:
- Size: 50.8 KB
- Stars: 42
- Watchers: 52
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cloud-native - crl-scheduler
README
# CRL Scheduler
The CRL Scheduler is the k8s scheduler compiled with a [custom scheduling plugin](https://kubernetes.io/docs/concepts/scheduling-eviction/scheduling-framework/).
Additional plugin examples can be [found here](https://github.com/kubernetes-sigs/scheduler-plugins).
It is currently compiled into the scheduler for kubernetes 1.16.
## The Issue
Deploying a statefulset across multiple availability zones may encounter some strange issues when changing the number of replicas.
Consider the following deployment of a statefulset with 4 replicas spread across 3 zones.
| A | B | C |
| - | - | - |
| 0 | 2 | 3 |
| 1 | | |Suppose the number of replicas gets scaled down to 3
| A | B | C |
| - | - | - |
| 0 | 2 | |
| 1 | | |We've now lost the availability zone `C`.
Suppose we scale down to 1 replica and then back up to 4, again.
| A | B | C |
| - | - | - |
| 0 | 1 | 2 |
| 3 | | |The scheduling of these pods is non-deterministic (Especially if nodes are being added and removed while the number of replicas change).
Pods 1, 2, and 3 are now unschedulable as their PVs (which are not removed by the statefulset controller) are still in the previous zones.
## The Solution
This scheduler plugin "locks" statefulset pods to specific zones bases on their ordinal, giving us deterministic scheduling at a zonal level.
## Building
```bash
# Build the docker image tagging as the current commit
make build# Tag the image with todays date and push to GCR
make release
```