{"id":13839356,"url":"https://github.com/jthomperoo/custom-pod-autoscaler","last_synced_at":"2025-05-16T08:05:19.470Z","repository":{"id":35788800,"uuid":"210631395","full_name":"jthomperoo/custom-pod-autoscaler","owner":"jthomperoo","description":"Custom Pod Autoscaler program and base images, allows creation of Custom Pod Autoscalers","archived":false,"fork":false,"pushed_at":"2025-03-22T14:26:36.000Z","size":638,"stargazers_count":293,"open_issues_count":4,"forks_count":22,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-09T03:12:41.413Z","etag":null,"topics":["autoscaler","autoscaling","base-image","cpa","custom-pod-autoscaler","docker","framework","gathered-metrics","kubernetes","kubernetes-autoscalers","scaling"],"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/jthomperoo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-24T15:05:00.000Z","updated_at":"2025-03-22T14:26:28.000Z","dependencies_parsed_at":"2023-12-23T16:28:52.930Z","dependency_job_id":"6f69add0-41dc-4a7b-8e82-983906b05140","html_url":"https://github.com/jthomperoo/custom-pod-autoscaler","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomperoo%2Fcustom-pod-autoscaler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomperoo%2Fcustom-pod-autoscaler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomperoo%2Fcustom-pod-autoscaler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomperoo%2Fcustom-pod-autoscaler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jthomperoo","download_url":"https://codeload.github.com/jthomperoo/custom-pod-autoscaler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493378,"owners_count":22080126,"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":["autoscaler","autoscaling","base-image","cpa","custom-pod-autoscaler","docker","framework","gathered-metrics","kubernetes","kubernetes-autoscalers","scaling"],"created_at":"2024-08-04T17:00:20.227Z","updated_at":"2025-05-16T08:05:14.461Z","avatar_url":"https://github.com/jthomperoo.png","language":"Go","funding_links":[],"categories":["Autoscaler"],"sub_categories":[],"readme":"[![Build](https://github.com/jthomperoo/custom-pod-autoscaler/workflows/main/badge.svg)](https://github.com/jthomperoo/custom-pod-autoscaler/actions)\n[![go.dev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\u0026style=flat)](https://pkg.go.dev/github.com/jthomperoo/custom-pod-autoscaler/v2)\n[![Go Report\nCard](https://goreportcard.com/badge/github.com/jthomperoo/custom-pod-autoscaler)](https://goreportcard.com/report/github.com/jthomperoo/custom-pod-autoscaler/v2)\n[![Documentation\nStatus](https://readthedocs.org/projects/custom-pod-autoscaler/badge/?version=stable)](https://custom-pod-autoscaler.readthedocs.io/en/stable)\n[![License](https://img.shields.io/:license-apache-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)\n\n\u003cp\u003eThis project is supported by:\u003c/p\u003e\n\u003cp\u003e\n  \u003ca href=\"https://www.businesssimulations.com/\"\u003e\n    \u003cimg src=\"https://businesssimulations.com/img/logos/logo_nostrap_tp_410.webp\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Custom Pod Autoscaler\n\nCustom Pod Autoscalers (CPAs) are custom Kubernetes autoscalers. This project is part of a framework that lets you\nquickly and easily build your own CPAs without having to deal with complex Kubernetes interactions using the tools and\nlanguage of your choice.\n\n## What is this project?\n\nThis project is part of the Custom Pod Autoscaler Framework (CPAF) which is a set of tools to help you easily build\nyour own CPAs. This project is the core of the CPAF, providing a program which runs inside your CPA to manage\nKubernetes interactions and custom user logic interactions.\n\nA Custom Pod Autoscaler can be created by using this project, extending the Docker base images provided and inserting\nyour own logic; see the [examples for more\ninformation](https://github.com/jthomperoo/custom-pod-autoscaler/tree/v2.12.2/example).\n\n## Features\n\n- Supports any language, environment and framework; the only requirement is it must be startable by a shell command\nor HTTP request.\n- Supports all configuration options of the Horizontal Pod Autoscaler (downscale stabilisation, sync period etc.)\n- Allows fast and easy prototyping and development.\n- Abstracts away all complicated Kubernetes API interactions.\n- Exposes a HTTP REST API for integration with wider systems/manual intervention.\n- Can write autoscalers with limited Kubernetes API or lifecycle knowledge.\n- Configuration at build time or deploy time.\n- Allows scaling to and from zero.\n- Can be configured without master node access, can be configured on managed providers such as EKS or GKE.\n- Supports Kubernetes metrics that the Horizontal Pod Autoscaler uses, can be configured using a similar syntax and\nused in custom scaling decisions.\n- Supports [Argo Rollouts](https://argoproj.github.io/argo-rollouts/).\n- Supports targeting any custom resource that implements the scale subresource.\n\n## Why would I use it?\n\nKubernetes provides the Horizontal Pod Autoscaler, which allows automatic scaling of the number of replicas in a\nresource (Deployment, ReplicationController, ReplicaSet, StatefulSet) based on metrics that you feed it. Mostly the\nmetrics used are CPU/memory load, which is sufficient for most applications. You can specify custom metrics to feed\ninto it through the metrics API also.\n\nThe limitation in the Horizontal Pod Autoscaler is that it has a [hard-coded algorithm for assessing these\nmetrics](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#algorithm-details):\n```\ndesiredReplicas = ceil[currentReplicas * ( currentMetricValue / desiredMetricValue )]\n```\nIf you need more flexibility in your scaling, beyond this algorithm, Horizontal Pod Autoscaler doesn't meet your needs,\nyou need to write your own scaling logic.\n\n## How does it work?\n\nThis project is a program that abstracts away complex Kubernetes interactions and handles interacting with custom\nuser logic you can provide to determine how the autoscaler should operate.\n\nWhen developing a Custom Pod Autoscaler you define logic for two stages:\n\n* Metric gathering - collecting or generating metrics; can be calling metrics APIs, running calculations locally,\nmaking HTTP requests.\n* Evaluating metrics - taking these gathered metrics and using them to decide how many replicas a resource should have.\n\nThese two pieces of logic are all the custom logic required to build a Custom Pod Autoscaler, the program will\nhandle all Kubernetes API interactions for scaling/retrieving resources.\n\n## Getting started\n\nCheck out [this getting started guide for a quick start for\ndevelopers](https://custom-pod-autoscaler.readthedocs.io/en/stable/user-guide/getting-started).\n\n## More information\n\nSee the [wiki for more information, such as guides and\nreferences](https://custom-pod-autoscaler.readthedocs.io/en/stable/).\n\n### What other projects are in the Custom Pod Autoscaler Framework?\n\nThe [Custom Pod Autoscaler Operator](https://github.com/jthomperoo/custom-pod-autoscaler-operator) is the other part\nof the Custom Pod Autoscaler Framework, it is an operator that handles provisioning Kubernetes resources for your\nCPA.\n\n## Developing this project\n\nSee the [contribution guidelines](./CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjthomperoo%2Fcustom-pod-autoscaler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjthomperoo%2Fcustom-pod-autoscaler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjthomperoo%2Fcustom-pod-autoscaler/lists"}