Skip to content
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

Create credit-card-meltdown-cronjob.yaml #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: enable-credit-card-meltdown
spec:
schedule: "00 20 * * *"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other problem is already set to run at this time, they should be able to run together but we'd rather keep the default timeframes separate for each problem

jobTemplate:
spec:
ttlSecondsAfterFinished: 60
template:
spec:
containers:
- name: enable-credit-card-meltdown
image: curlimages/curl
imagePullPolicy: IfNotPresent
args:
- "http://feature-flag-service.svc.cluster.local:8080/v1/flags/credit_card_meltdown"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All other cronjobs use simply http://feature-flag-service:8080, would be nice to keep it consistent

- "-X"
- "PUT"
- "-H"
- "Content-Type: application/json"
- "-d"
- '{"enabled": true}'
restartPolicy: OnFailure
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: disable-credit-card-meltdown
spec:
schedule: "25 20 * * *"
jobTemplate:
spec:
ttlSecondsAfterFinished: 60
template:
spec:
containers:
- name: disable-credit-card-meltdown
image: curlimages/curl
imagePullPolicy: IfNotPresent
args:
- "http://feature-flag-service.svc.cluster.local:8080/v1/flags/credit_card_meltdown"
- "-X"
- "PUT"
- "-H"
- "Content-Type: application/json"
- "-d"
- '{"enabled": false}'
restartPolicy: OnFailure