This is a Go demo application used for demonstrating Kubernetes and load balancing.
It will create a colored icon for each replica within a ReplicaSet and indicate which one most recently served a response. Replicas which haven't been heard from will begin to fade out, until after a configurable number of seconds they will disappear. This is useful for demonstrating scaling up/down or in the case of an application like Rio, for showing scale-in of an upgraded application.
The reason I created this image, I wanted the Hello Rancher demo to run on AMD64 and ARM64
TITLE: sets title in demo appSHOW_VERSION: show version of app in ui (VERSION env var)REFRESH_INTERVAL: interval in milliseconds for page to refresh (default: 1000)EXPIRE_INTERVAL: how long a replica can go without being seen before we remove it from the display (default: 10s)REMOVE_INTERVAL: how long after EXPIRE_INTERVAL until we remove the icon (default: 20s)SKIP_ERRORS: set this to prevent errors from counting (useful on janky load balancers)METADATA: extra text at bottom of info areaCONTAINER_COLOR: what color the container background should be (default: black). Valid options are any color from the CSS pallete, including:
PETS: The kind of pet shown in each container. Valid options are:
docker build -t evantage/hello-rancher .
By default the loaded page will reach back to /demo every REFRESH_INTERVAL and use the returned information to update the display. Other paths are:
/info - returns some additional information about the replica serving the request/load - adds a 2s delay to the response from /info - use this for putting artificial load on the system and watching the replicas scaleThe container will listen for traffic on port 8080.
Deploy using the included Helm chart under ./charts or alternatively:
base/configs/source-vars.yaml and set the following:
MY_NAMESPACE: the namespace into which the app will be deployed (default: rancher-demo). This will be created if it does not already exist.URL_HOST: the hostname portion of the URL that the ingress will answer on.kubectl apply -k base to deploy the application.Credits:
Content type
Image
Digest
sha256:2a3687f61…
Size
49.4 MB
Last updated
about 1 year ago
docker pull evantage/hello-rancher