hpademo

module
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2025 License: MIT

README

license Go Report Card Go Reference

hpademo

hpademo is a simple demo for Kubernetes Horizontal Pod Autoscaler (HPA), written in Go and compiled to WebAssembly in order to run in a web browser.

Online demo: https://udhos.github.io/hpademo/www/

features

  • Simulate HPA based on CPU.
  • Chart for number of replicas.
  • Chart for per-pod CPU usage.
  • Chart for total unmet CPU load.
  • Dark/light modes.
  • Customizable:
    • Inject total CPU usage.
    • POD CPU request.
    • POD CPU limit.
    • HPA min replicas.
    • HPA max replicas.
    • HPA targe cpu utilization percentage.
    • Chart data history size (300s default).
    • Scale down stabilization window (300s default).
    • POD startup time.
    • POD stop time.
  • Non-customizable:
    • 10% HPA Scale Tolerance.
    • 15s HPA Scale Period.

clone

git clone https://github.com/udhos/hpademo
cd hpademo

edit

Set GOOS=js GOARCH=wasm before starting your editor/IDE.

export GOOS=js GOARCH=wasm
code .

test

./test.sh

build

./build.sh

run

./run-serve-www.sh

Then open your web browser at http://localhost:8080

Directories

Path Synopsis
cmd
hpademo command
Package main implements the tool.
Package main implements the tool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL