{"id":20305204,"url":"https://github.com/entelo/reschedule","last_synced_at":"2025-04-11T14:45:51.667Z","repository":{"id":56891874,"uuid":"48653865","full_name":"entelo/reschedule","owner":"entelo","description":"Automatic, configurable Kubernetes rescheduling","archived":false,"fork":false,"pushed_at":"2016-05-09T04:15:09.000Z","size":27,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":48,"default_branch":"master","last_synced_at":"2024-04-26T03:20:55.728Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/entelo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-27T17:27:47.000Z","updated_at":"2023-09-05T19:19:48.000Z","dependencies_parsed_at":"2022-08-21T00:20:35.156Z","dependency_job_id":null,"html_url":"https://github.com/entelo/reschedule","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entelo%2Freschedule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entelo%2Freschedule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entelo%2Freschedule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entelo%2Freschedule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entelo","download_url":"https://codeload.github.com/entelo/reschedule/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248421436,"owners_count":21100608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T17:07:40.524Z","updated_at":"2025-04-11T14:45:51.423Z","avatar_url":"https://github.com/entelo.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\u003cimg src=\"docs/logo.png?raw=true\" width=\"27\" /\u003e Reschedule\u003c/h1\u003e\n\nAutomatic, configurable Kubernetes rescheduling\n\nOverview\n--------\n\nReschedule lets you configure periodic and/or conditions-based rescheduling of Kubernetes pods. For example, you could configure Reschedule to:\n\n* Check the memory usage of each node every 30 minutes. If the memory usage of a node is above 80%, reschedule the node's pods to more evenly distribute memory usage across the cluster.\n* Restart all of a specific replication controller's pods every 24 hours as a stopgap for slow memory leaks.\n\nUsage\n-----\n\nReschedule runs as a pod on your Kubernetes cluster:\n\n1. Clone this repo\n1. Create `Dockerfile` and `reschedule.yml` using the `.example` files as references (see [Configuration](#configuration))\n1. Build and run the Docker image on your Kubernetes cluster\n\nConfiguration\n-------------\n\n### reschedule.yml\n\nA rescheduler is a periodic task that reschedules pods based on conditions. You can define as many reschedulers as you like in `reschedule.yml`.\n\nFor example, the following `reschedule.yml` will:\n* Every 12 hours, reschedule all pods of replication controllers with names matching the regex `/aggregation\\-(fast|slow)/`\n* Every 30 minutes, reschedule all pods in the namespace `mynamespace` on nodes with \u003e80% memory usage\n\n```yaml\nreschedulers:\n  -\n    type: All\n    every: 12h\n    options:\n      replication_controller_name_match: aggregation\\-(fast|slow)\n  -\n    type: MemoryThreshold\n    every: 30m\n    options:\n      memory_threshold: 0.8\n      namespace: mynamespace\n```\n\n### Rescheduler types\n\n#### All\n\nReschedules all pods.\n\nOptions:\n\n* `namespace` - The namespace of the pods\n* `replication_controller_name_match` - Only pods of replication controllers with names that match this regex will be rescheduled.\n\n#### MemoryThreshold\n\nReschedules all pods on nodes with memory usage greater than the threshold.\n\nOptions:\n\n* `namespace` - The namespace of the pods\n* `memory_threshold` - The memory threshold (0.8 == 80%)\n\n### Dockerfile\n\nSee `Dockerfile.example` for an example.\n\n#### Authentication\n\nTo authenticate to the Kubernetes API, you have a couple of options:\n\n```bash\n# Authentication option 1: HTTP basic auth\nENV KUBERNETES_API_USERNAME myusername\nENV KUBERNETES_API_PASSWORD mypassword\n\n# Authentication option 2: client certificate\nENV KUBERNETES_API_CLIENT_KEY myclientkey\nENV KUBERNETES_API_CLIENT_CERT myclientcert\nENV KUBERNETES_API_CA_FILE path/to/my/ca/file\n```\n\n#### Dry run\n\nYou can put Reschedule in dry run mode with:\n\n```bash\nENV RESCHEDULE_DRY_RUN 1\n```\n\nIn this mode, Reschedule won't perform any rescheduling, but it will log the rescheduling that it would do.\n\nLicense\n-------\n\nReschedule is released under the MIT License. Please see the MIT-LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentelo%2Freschedule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentelo%2Freschedule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentelo%2Freschedule/lists"}