This Job makes use of secret vars, it should be filled out before attempting to deploy.
- Copy env file from a template:
cp .env.dist .env
- Edit
.envfile and fill out your secrets. - Ensure the secret file is ignored by git.
- Deploy the sample.
The Job generates random number and prints env vars configured in job.yaml and loaded from secret .env file. The following request performs its functionality:
curl -X POST "http://localhost:7005/pub/job/python-env-secret/latest/api/v1/perform" \
-H "Content-Type: application/json" \
-d '{}'
# Expect:
# {
# "model": "zoo",
# "result": 0.844725159639815,
# "passwd": "itworks!"
# }