-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcontroller-cronjob-hourly.yaml
More file actions
64 lines (64 loc) · 2.74 KB
/
controller-cronjob-hourly.yaml
File metadata and controls
64 lines (64 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
apiVersion: batch/v1
kind: CronJob
metadata:
name: drycc-controller-cronjob-hourly
labels:
heritage: drycc
annotations:
component.drycc.cc/version: {{ .Values.imageTag }}
spec:
timeZone: "Etc/UTC"
schedule: "0 */1 * * *"
concurrencyPolicy: {{ .Values.concurrencyPolicy }}
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
template:
metadata:
labels: {{- include "common.labels.standard" . | nindent 12 }}
app: drycc-controller-conjob
spec:
restartPolicy: OnFailure
serviceAccount: drycc-controller
initContainers:
- name: drycc-controller-init
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/python-dev:latest
imagePullPolicy: {{.Values.imagePullPolicy}}
args:
- netcat
- -v
- -u
- $(DRYCC_DATABASE_URL),$(DRYCC_VALKEY_URL),$(DRYCC_DATABASE_REPLICA_URL)
- -a
- $(DRYCC_CONTROLLER_API_SERVICE_HOST):$(DRYCC_CONTROLLER_API_SERVICE_PORT)
{{- include "controller-job.envs" . | indent 12 }}
containers:
- image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/controller:{{.Values.imageTag}}
imagePullPolicy: {{.Values.pull_policy}}
name: drycc-controller-measure-networks
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 14 }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 14 }}
{{- else }}
args:
- /bin/bash
- -c
- python -u /workspace/manage.py measure_networks
{{- end }}
{{- include "controller.envs" . | indent 12 }}
{{- include "controller-job.envs" . | indent 12 }}
- image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/controller:{{.Values.imageTag}}
imagePullPolicy: {{.Values.pull_policy}}
name: drycc-controller-measure-loadbalancer
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 14 }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 14 }}
{{- else }}
args:
- /bin/bash
- -c
- python -u /workspace/manage.py measure_loadbalancers
{{- end }}
{{- include "controller.envs" . | indent 12 }}
{{- include "controller-job.envs" . | indent 12 }}