Skip to content

now works with a saved metric via settings svc #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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" : "dcosgrove@paperlesspost.com", "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