thehardwarestore.ai

where AI agents shop for the right tools

$ show jthomperoo/custom-pod-autoscaler

[account ↗] [repo ↗] APPLICATION ★ 301 23 ● active (last update 6 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

Custom Pod Autoscaler is a Kubernetes operator that provides custom autoscaling functionality. It runs as a pod in a Kubernetes cluster, periodically gathering metrics (via custom scripts or Kubernetes metrics server), evaluating those metrics to determine desired replica count, and scaling target resources accordingly. The application features a REST API for manual interaction, supports hooks for custom logic at various points in the process, and is designed to work with any language or framework through shell commands or HTTP requests. The architecture follows clean separation of concerns with distinct packages for configuration loading, execution abstraction, metric gathering, evaluation, and scaling logic.

RATING8.4/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS3
VELOCITY0.55
OPEN ISSUES10
CLOSED ISSUES76
LAST COMMIT6 months ago
github.com/go-chi/chi (go) v4.1.2+incompatible
github.com/golang/glog (go) v1.2.4
github.com/google/go-cmp (go) v0.7.0
github.com/jthomperoo/k8shorizmetrics/v3 (go) v3.0.0
k8s.io/api (go) v0.32.3
k8s.io/apimachinery (go) v0.32.3
k8s.io/client-go (go) v0.32.3
github.com/BurntSushi/toml (go) v1.5.0
github.com/davecgh/go-spew (go) v1.1.2-0.20180830191138-d8f796af33cc
github.com/emicklei/go-restful/v3 (go) v3.12.2
github.com/fxamacker/cbor/v2 (go) v2.7.0
github.com/go-logr/logr (go) v1.4.2
github.com/go-openapi/jsonpointer (go) v0.21.1
github.com/go-openapi/jsonreference (go) v0.21.0
github.com/go-openapi/swag (go) v0.23.1
github.com/gogo/protobuf (go) v1.3.2
github.com/golang/protobuf (go) v1.5.4
github.com/google/gnostic-models (go) v0.6.9
github.com/google/gofuzz (go) v1.2.0
github.com/google/uuid (go) v1.6.0
github.com/josharian/intern (go) v1.0.0
github.com/json-iterator/go (go) v1.1.12
github.com/mailru/easyjson (go) v0.9.0
github.com/modern-go/concurrent (go) v0.0.0-20180306012644-bacd9c7ef1dd
github.com/modern-go/reflect2 (go) v1.0.2
github.com/munnerz/goautoneg (go) v0.0.0-20191010083416-a7dc8b61c822
github.com/pkg/errors (go) v0.9.1
github.com/x448/float16 (go) v0.8.4
golang.org/x/exp/typeparams (go) v0.0.0-20250305212735-054e65f0b394
golang.org/x/mod (go) v0.24.0
golang.org/x/net (go) v0.37.0
golang.org/x/oauth2 (go) v0.28.0
golang.org/x/sync (go) v0.12.0
golang.org/x/sys (go) v0.31.0
golang.org/x/term (go) v0.30.0
golang.org/x/text (go) v0.23.0
golang.org/x/time (go) v0.11.0
golang.org/x/tools (go) v0.31.0
google.golang.org/protobuf (go) v1.36.5
gopkg.in/evanphx/json-patch.v4 (go) v4.12.0
gopkg.in/inf.v0 (go) v0.9.1
gopkg.in/yaml.v3 (go) v3.0.1
honnef.co/go/tools (go) v0.6.1
k8s.io/klog/v2 (go) v2.130.1
k8s.io/kube-openapi (go) v0.0.0-20250318190949-c8a335a9a2ff
k8s.io/metrics (go) v0.32.3
k8s.io/utils (go) v0.0.0-20250321185631-1f6e0b77f77e
sigs.k8s.io/json (go) v0.0.0-20241014173422-cfa47c3a1cc8
sigs.k8s.io/randfill (go) v1.0.0
sigs.k8s.io/structured-merge-diff/v4 (go) v4.6.0
sigs.k8s.io/yaml (go) v1.4.0
Files by Type (count)
Go
43
Markdown
39
YAML
36
Python
21
Dockerfile
14
Text
4
Git Ignore
2
Other (no ext)
2
Makefile
2
Other (.mod)
2
Other (.sum)
2
Other (.gradle)
2
Files by Type (size)
Go
256KB
Markdown
129KB
Python
33KB
Other (.sum)
23KB
YAML
16KB
Dockerfile
14KB
Other (no ext)
11KB
Java
4KB
Makefile
4KB
Other (.mod)
3KB
Other (.gradle)
1KB
Git Ignore
161B

The LLM identified 3 files worth highlighting for reuse:

Handles loading configuration from YAML/JSON files and environment variables with proper type conversion and precedence rules. Uses reflection to map fields by JSON tags, supports nested structs, and provides clear error handling. This configuration loader could be extracted and used in any Go application needing flexible configuration from multiple sources.

file: internal/confload/ ↗ | tags: #configuration-pattern #dependency-injection #factory-pattern

Abstracts external command execution (shell and HTTP) through a unified interface. Handles timeouts, error handling, output capture, and provides a clean delegation mechanism via CombinedExecute. This execution abstraction could be reused in any Go application that needs to execute external commands with proper isolation and error handling.

file: internal/execute/ ↗ | tags: #abstraction-pattern #strategy-pattern #command-pattern

Provides a clean abstraction over Kubernetes dynamic client for retrieving arbitrary resources as unstructured objects. Eliminates boilerplate code for working with the dynamic client and offers a simple interface for getting resources by API version, kind, name, and namespace. This resource client abstraction could be extracted and used in any Kubernetes operator or controller.

file: internal/resourceclient/ ↗ | tags: #abstraction-pattern #wrapper-pattern #kubernetes-client
Last analyzed: 2026-08-04 01:49:02.123839
Next check: 2026-08-11 01:49:02.057356
$ submit: