I have a cron job with below spec. I am sending a POST request to end point after specific intervals. I need to change the urls based on the environment like staging
or production
Is there a way i can use the ENV variable in place of domain name and not create two separate files to use two different urls.
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: testing
spec:
schedule: "*/20 * * * *"
suspend: false
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 1
jobTemplate:
spec:
template:
spec:
containers:
- name: testing
image: image
ports:
- containerPort: 3000
args:
- /bin/sh
- -c
- curl -X POST #{USE_ENV_VARIABLE_HERE}/api/v1/automated_tests/workflows #how to make this generic
restartPolicy: Never