Skip to content

Conversation

@dcosgrove
Copy link
Member

@dcosgrove dcosgrove commented Nov 22, 2022

NOTE: an image created from this branch has already been built and pushed to:
quay.io/paperlesspost/hpa-example:configurable-metric

Instructions for use on earth

  1. Generate an authentication token (might need to be refreshed every 5~ minutes)
export AUTH_TOKEN="$(curl -d '{"email_address" : "[email protected]", "password" : "Stampy"}' https://earth.ppstaging.net/flyer/api/auth/login |jq -r '.data.id_token' -)"
  1. Change example_metric (you can change this value from 10 to whatever you want)
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $AUTH_TOKEN" -d '{"settings": { "example_metric": { "value": 10 }}}' https://earth.ppstaging.net/flyer/api/settings/hpa-example
Get the metric via hpa-example pods running on earth

Sample response

Sample metrics response from `/metrics':

$ curl localhost:8000/metrics            
# HELP example_metric Custom arbitrary value to test example HPA
# TYPE example_metric gauge
example_metric 10

@dcosgrove dcosgrove requested a review from mbubb November 22, 2022 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant