Skip to content

Commit

Permalink
feat: add reminder cron to kontinuous
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementNumericite committed Dec 2, 2024
1 parent b574dcf commit 323390b
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .kontinuous/env/preprod/templates/reminder.cronjob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: cron-reminder
spec:
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
schedule: 15 19 * * 5
timeZone: Europe/Paris
jobTemplate:
spec:
backoffLimit: 1
template:
spec:
restartPolicy: Never
containers:
- name: notification
image: "{{ or .Values.registry .Values.global.registry }}/{{ .Values.global.imageProject }}/{{ .Values.global.imageRepository }}/app:{{ .Values.global.imageTag }}"
command: ["yarn", "cron-job-reminder"]
resources:
requests:
cpu: 200m
memory: 2Gi
limits:
cpu: 200m
memory: 2Gi
{{/* workingDir: /app */}}
env:
- name: PRODUCTION
value: 'true'
- name: NEXT_PUBLIC_ENV_APP
value: preproduction
- name: DATABASE_URL
value: "$(DATABASE_URL)"
- name: TZ
value: Europe/Paris
envFrom:
- configMapRef:
name: app-configmap
- secretRef:
name: pg-app
- secretRef:
name: app-sealed-secret
- secretRef:
name: carte-jeune-engage-dev-app-access-key
2 changes: 1 addition & 1 deletion .kontinuous/env/prod/templates/notification.cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
containers:
- name: notification
image: "{{ or .Values.registry .Values.global.registry }}/{{ .Values.global.imageProject }}/{{ .Values.global.imageRepository }}/app:{{ .Values.global.imageTag }}"
command: ["yarn", "cron-job"]
command: ["yarn", "cron-job-notifications"]
resources:
requests:
cpu: 200m
Expand Down
46 changes: 46 additions & 0 deletions .kontinuous/env/prod/templates/reminder.cronjob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: cron-reminder
spec:
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
schedule: 15 19 * * 5
timeZone: Europe/Paris
jobTemplate:
spec:
backoffLimit: 1
template:
spec:
restartPolicy: Never
containers:
- name: notification
image: "{{ or .Values.registry .Values.global.registry }}/{{ .Values.global.imageProject }}/{{ .Values.global.imageRepository }}/app:{{ .Values.global.imageTag }}"
command: ["yarn", "cron-job-reminder"]
resources:
requests:
cpu: 200m
memory: 2Gi
limits:
cpu: 200m
memory: 2Gi
{{/* workingDir: /app */}}
env:
- name: PRODUCTION
value: 'true'
- name: NEXT_PUBLIC_ENV_APP
value: production
- name: DATABASE_URL
value: "$(DATABASE_URL)"
- name: TZ
value: Europe/Paris
envFrom:
- configMapRef:
name: app-configmap
- secretRef:
name: pg-app
- secretRef:
name: app-sealed-secret
- secretRef:
name: carte-jeune-engage-prod-app-access-key

0 comments on commit 323390b

Please sign in to comment.