{"id":13846222,"url":"https://github.com/hex108/cron-hpa-controller","last_synced_at":"2025-08-13T06:33:00.551Z","repository":{"id":141081639,"uuid":"163517092","full_name":"hex108/cron-hpa-controller","owner":"hex108","description":"Controller for Cron Horizontal Pod Autoscaler(CronHPA) ","archived":false,"fork":false,"pushed_at":"2019-12-05T09:25:25.000Z","size":5067,"stargazers_count":36,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-19T03:09:11.142Z","etag":null,"topics":["cron-hpa-controller","crontab","hpa","kubernetes","operator"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hex108.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-12-29T14:25:27.000Z","updated_at":"2023-09-02T12:53:07.000Z","dependencies_parsed_at":"2024-01-18T08:57:51.188Z","dependency_job_id":"ac50ecb4-df8a-4786-b789-6668dd169a47","html_url":"https://github.com/hex108/cron-hpa-controller","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/hex108%2Fcron-hpa-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex108%2Fcron-hpa-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex108%2Fcron-hpa-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex108%2Fcron-hpa-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hex108","download_url":"https://codeload.github.com/hex108/cron-hpa-controller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229741808,"owners_count":18117173,"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":["cron-hpa-controller","crontab","hpa","kubernetes","operator"],"created_at":"2024-08-04T18:00:20.031Z","updated_at":"2024-12-14T18:37:58.199Z","avatar_url":"https://github.com/hex108.png","language":"Go","funding_links":[],"categories":["Operators vs Controllers"],"sub_categories":["Autoscaling / Scheduling"],"readme":"**Notice: The repo has been moved to https://github.com/tkestack/cron-hpa, and it will be maintained there.**\n\n-----------\n\n# cron-hpa-controller\n\nCron Horizontal Pod Autoscaler(CronHPA) enables us to auto scale workloads(those support `scale` subresource, e.g. deployment, statefulset) periodically using [crontab](https://en.wikipedia.org/wiki/Cron) scheme.\n\n\n`CronHPA` example:\n\n```\napiVersion: gs.io/v1\nkind: CronHPA\nmetadata:\n  name: example-cron-hpa\nspec:\n  scaleTargetRef:\n    apiVersion: apps/v1\n    kind: Deployment\n    name: demo-deployment\n  crons:\n    - schedule: \"0 23 * * 5\"  // Set replicas to 60 every Friday 23:00\n      targetReplicas: 60\n    - schedule: \"0 23 * * 7\"  // Set replicas to 30 every Sunday 23:00\n      targetReplicas: 30\n```\n\nMore design ideas could be found at [design.md](./design.md).\n\n## Build\n\n``` sh\n$ make build\nor\n$ go build -o bin/cron-hpa-controller .\n```\n\n## Run\n\n```sh\n# assumes you have a working kubeconfig, not required if operating in-cluster\n# It will create CRD `CronHPA` by default.\n$ bin/cron-hpa-controller --master=127.0.0.1:8080 --v=5 --stderrthreshold=0   // Assume 127.0.0.1:8080 is k8s master ip:port\nor\n$ bin/cron-hpa-controller --kubeconfig=$HOME/.kube/config --v=5 --stderrthreshold=0\n\n# create a custom resource of type cron-hpa\n$ kubectl create -f artifacts/examples/example-cron-hpa.yaml\n\n# check pods created through the custom resource\n$ kubectl get cronhpa\n```\n\n## Cleanup\n\nYou can clean up the created CustomResourceDefinition with:\n\n    $ kubectl delete crd cronhpas.gs.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex108%2Fcron-hpa-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhex108%2Fcron-hpa-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex108%2Fcron-hpa-controller/lists"}