A simplish metadata parser.
Allows generic querying of the metadata server accessible within a Cloud Run service to inspect itself.
Implemented in Python using HTTPx, Flask. Styled with LaTeX.css
A dummy metadata server is provided for local testing:
LOCAL=5001
FLASK_ENV=development
FLASK_APP=dummymetadata.py flask run --port $LOCAL &
flask run
Use the "Run on Google Cloud" button above.
Alternative gcloud
method:
PROJECT_ID=YourProject
REGION=YourRegion
gcloud config set project $PROJECT_ID
gcloud builds submit --tag gcr.io/${PROJECT_ID}/metadata
gcloud run deploy metadata \
--region $REGION \
--platform managed \
--image gcr.io/${PROJECT_ID}/metadata \
--allow-unauthenticated
Requires Cloud Build to have permissions to deploy Cloud Run
gcloud builds submit