{"id":15419416,"url":"https://github.com/arjunrn/simple-scaler","last_synced_at":"2025-04-19T14:52:23.801Z","repository":{"id":54498538,"uuid":"160221630","full_name":"arjunrn/simple-scaler","owner":"arjunrn","description":"Alternate pod autoscaler implementation","archived":false,"fork":false,"pushed_at":"2021-02-15T11:48:39.000Z","size":85,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T08:51:13.082Z","etag":null,"topics":["autoscaling","kubernetes","pod"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/arjunrn.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}},"created_at":"2018-12-03T16:33:16.000Z","updated_at":"2021-02-05T11:43:47.000Z","dependencies_parsed_at":"2022-08-13T17:50:40.502Z","dependency_job_id":null,"html_url":"https://github.com/arjunrn/simple-scaler","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/arjunrn%2Fsimple-scaler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunrn%2Fsimple-scaler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunrn%2Fsimple-scaler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunrn%2Fsimple-scaler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arjunrn","download_url":"https://codeload.github.com/arjunrn/simple-scaler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249717958,"owners_count":21315075,"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":["autoscaling","kubernetes","pod"],"created_at":"2024-10-01T17:25:01.600Z","updated_at":"2025-04-19T14:52:23.766Z","avatar_url":"https://github.com/arjunrn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basic Kubernetes Pod Autoscaler\n\nThe default Horizontal Pod Autoscaler has several shortcomings which can be listed as follows:\n\n1. The scaling is not restricted in terms of how pods are started and stopped at the same time.\n2. The scaling action is not based on historical data but on current usage.\n3. The thresholds for scaling up and scaling down are the same.\n\n## Usage\n\nCreate a scaler object in the following format:\n\n```yaml\napiVersion: arjunnaik.in/v1alpha1\nkind: Scaler\nmetadata:\n  name: example-scaler\n  namespace: default\nspec:\n  evaluations: 2    // Number of evaluations in before scaling happens\n  minReplicas: 1    // Minimum number of replicas\n  maxReplicas: 10   // Maximum number of replicas\n  scaleUp: 50       // Scale Up threshold in utilization percentage\n  scaleDown: 20     // Scale Down threshold in utilization percentage\n  scaleUpSize: 2    // Number of pods to scale up\n  scaleDownSize: 1  // Number of pods to scale down\n  target:\n    kind: Deployment\n    name: nginx\n    apiVersion: apps/v1\n```\n\nIn the above example the `target` field contains the scaling target. In this case the target is a _Deployment_ with \nthe name `nginx`. Evaluations indicates the number of minutes _(cycles)_ before scaling happens. In this example,\nif the CPU utilization of a pod is more than _50%_ for more than 2 minutes then the deployment is scaled up. The \n`scaleUpSize` and `scaleDownSize` indicates the number of pods to be increased on successful scale up or scale down\nevaluations.\n\n## Dependencies\n\nThis setup expects Prometheus to be running in the cluster and configured to scrape pod resource metrics. The address\nfor Prometheus can be passed through `-prometheus-url` flag.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjunrn%2Fsimple-scaler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farjunrn%2Fsimple-scaler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjunrn%2Fsimple-scaler/lists"}