switch from cronjob to scheduler service #9
@ -14,6 +14,9 @@ dependencies:
|
|||||||
- name: app
|
- name: app
|
||||||
repository: https://dysnix.github.io/charts
|
repository: https://dysnix.github.io/charts
|
||||||
version: 0.3.15
|
version: 0.3.15
|
||||||
|
- name: app
|
||||||
|
repository: https://dysnix.github.io/charts
|
||||||
|
version: 0.3.15
|
||||||
- name: postgres
|
- name: postgres
|
||||||
repository: https://groundhog2k.github.io/helm-charts/
|
repository: https://groundhog2k.github.io/helm-charts/
|
||||||
version: 0.3.9
|
version: 0.3.9
|
||||||
|
|||||||
@ -35,6 +35,11 @@ dependencies:
|
|||||||
repository: https://dysnix.github.io/charts
|
repository: https://dysnix.github.io/charts
|
||||||
alias: yonote-collaboration
|
alias: yonote-collaboration
|
||||||
|
|
||||||
|
- name: app
|
||||||
|
version: "0.3.15"
|
||||||
|
repository: https://dysnix.github.io/charts
|
||||||
|
alias: yonote-scheduler
|
||||||
|
|
||||||
- name: postgres
|
- name: postgres
|
||||||
version: "0.3.9"
|
version: "0.3.9"
|
||||||
repository: https://groundhog2k.github.io/helm-charts/
|
repository: https://groundhog2k.github.io/helm-charts/
|
||||||
|
|||||||
@ -1,69 +0,0 @@
|
|||||||
{{- if eq ($.Values.global.yonote_cron_calendar_events.cron_enabled | toString) "true" }}
|
|
||||||
apiVersion: batch/v1
|
|
||||||
kind: CronJob
|
|
||||||
metadata:
|
|
||||||
name: cron-calendar-events
|
|
||||||
spec:
|
|
||||||
schedule: "*/1 * * * *"
|
|
||||||
jobTemplate:
|
|
||||||
spec:
|
|
||||||
template:
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: cron-calendar-events
|
|
||||||
image: curlimages/curl
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
envFrom:
|
|
||||||
- secretRef:
|
|
||||||
name: yonote-secrets
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- >-
|
|
||||||
date;
|
|
||||||
curl
|
|
||||||
-X POST
|
|
||||||
{{ .Values.global.yonote_cron_calendar_events.url }}
|
|
||||||
-H "Content-Type: application/json"
|
|
||||||
-d '
|
|
||||||
{
|
|
||||||
"token": "$(UTILS_SECRET)"
|
|
||||||
}
|
|
||||||
'
|
|
||||||
restartPolicy: OnFailure
|
|
||||||
{{- end }}
|
|
||||||
---
|
|
||||||
{{- if eq ($.Values.global.yonote_cron_task_scheduler.cron_enabled | toString) "true" }}
|
|
||||||
apiVersion: batch/v1
|
|
||||||
kind: CronJob
|
|
||||||
metadata:
|
|
||||||
name: cron-task-scheduler
|
|
||||||
spec:
|
|
||||||
schedule: "0 */1 * * *"
|
|
||||||
jobTemplate:
|
|
||||||
spec:
|
|
||||||
template:
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: cron-task-scheduler
|
|
||||||
image: curlimages/curl
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
envFrom:
|
|
||||||
- secretRef:
|
|
||||||
name: yonote-secrets
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- >-
|
|
||||||
date;
|
|
||||||
curl
|
|
||||||
-X POST
|
|
||||||
{{ .Values.global.yonote_cron_task_scheduler.url }}
|
|
||||||
-H "Content-Type: application/json"
|
|
||||||
-d '
|
|
||||||
{
|
|
||||||
"token":"$(UTILS_SECRET)", "limit":"200"
|
|
||||||
}
|
|
||||||
'
|
|
||||||
restartPolicy: OnFailure
|
|
||||||
{{- end }}
|
|
||||||
@ -64,14 +64,6 @@ global:
|
|||||||
SMTP_SECURE: "" # connection will be upgraded: https://nodemailer.com/smtp/
|
SMTP_SECURE: "" # connection will be upgraded: https://nodemailer.com/smtp/
|
||||||
SMTP_REQUIRE_TLS: ""
|
SMTP_REQUIRE_TLS: ""
|
||||||
|
|
||||||
yonote_cron_calendar_events:
|
|
||||||
cron_enabled: "true"
|
|
||||||
url: http://yonote-web/api/cron.calendar_events
|
|
||||||
|
|
||||||
yonote_cron_task_scheduler:
|
|
||||||
cron_enabled: "true"
|
|
||||||
url: http://yonote-web/api/cron.schedule
|
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
name: yonote-ingress
|
name: yonote-ingress
|
||||||
@ -491,6 +483,79 @@ yonote-collaboration:
|
|||||||
path: /_health
|
path: /_health
|
||||||
port: app
|
port: app
|
||||||
|
|
||||||
|
yonote-scheduler:
|
||||||
|
fullnameOverride: yonote-scheduler
|
||||||
|
nameOverride: yonote-scheduler
|
||||||
|
name: scheduler
|
||||||
|
|
||||||
|
image:
|
||||||
|
registry: images.updates.yonote.ru
|
||||||
|
repository: yonote
|
||||||
|
tag: 1.22.11
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args: ['IS_COMPILED=true yarn bytenode ./build/server/main.jsc --services=scheduler']
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
maxReplicas: 1
|
||||||
|
minReplicas: 1
|
||||||
|
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 512Mi
|
||||||
|
requests:
|
||||||
|
cpu: 150m
|
||||||
|
memory: 128Mi
|
||||||
|
|
||||||
|
checksums: null
|
||||||
|
|
||||||
|
containerPorts:
|
||||||
|
- containerPort: 3000
|
||||||
|
name: app
|
||||||
|
protocol: TCP
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
targetPort: app
|
||||||
|
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: yonote-configs
|
||||||
|
- secretRef:
|
||||||
|
name: yonote-secrets
|
||||||
|
|
||||||
|
podLabels:
|
||||||
|
redis-client: 'true'
|
||||||
|
|
||||||
|
podAnnotations:
|
||||||
|
checksum/configmap: "{{ toJson .Values.global.yonote.config.plain | sha256sum }}"
|
||||||
|
checksum/secret: "{{ toJson .Values.global.yonote.config.secret | sha256sum }}"
|
||||||
|
|
||||||
|
readinessProbe:
|
||||||
|
enabled: true
|
||||||
|
failureThreshold: 6
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 5
|
||||||
|
httpGet:
|
||||||
|
path: /_health
|
||||||
|
port: app
|
||||||
|
|
||||||
|
livenessProbe:
|
||||||
|
enabled: true
|
||||||
|
failureThreshold: 6
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 5
|
||||||
|
httpGet:
|
||||||
|
path: /_health
|
||||||
|
port: app
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
enabled: true
|
enabled: true
|
||||||
#settings:
|
#settings:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user