This application exists to expose a metrics endpoint that proffers custom metrics used for scaling a second application.
This metric may be tangentially related to the load of the scaled app. For instance it may gather and report on a queue depth or work backlog. However, the current app referenced here does not.
oc apply -k custom-metric-app
namespace/keda-test created
service/prometheus-example-app created
deployment.apps/prometheus-example-app created
servicemonitor.monitoring.coreos.com/prometheus-example-monitor created
route.route.openshift.io/prometheus-example-app created
ROUTE=$(oc get route prometheus-example-app -o jsonpath='{.spec.host}')
curl $ROUTE/metrics
# HELP version Version information about this binary
# TYPE version gauge
version{version="v0.4.1"} 1
# create some traffic stats then retry above
curl $ROUTE