Skip to content

Commit 81d9bd8

Browse files
Merge pull request #975 from ericvaandering/consistency_cron
Update the helm chart to allow us to use cron instead of jobber.
2 parents becaabe + a9d94d8 commit 81d9bd8

File tree

4 files changed

+50
-1
lines changed

4 files changed

+50
-1
lines changed

helm/rucio-consistency/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 3.4.1
18+
version: 3.5.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "rucio-consistency.fullname" . }}-crontab
5+
data:
6+
consistency-crontab: |+
7+
# This is an auto-generated crontab.
8+
# It uses "DeterministicDelay" to space out the running of jobs within the interval specified.
9+
# The deterministic delay script is at {{ $.Values.consistency.detDelay }}
10+
SHELL=/bin/sh
11+
12+
# Special scripts
13+
0 0 * * * root /consistency/cleanup.sh
14+
5 0 * * 5 root /consistency/RAL_Disk_pre.sh
15+
30 23 * * 5 root /consistency/RAL_Disk_post.sh
16+
10 0 * * 3 root /consistency/RAL_Tape_pre.sh
17+
20 23 * * 3 root /consistency/RAL_Tape_post.sh
18+
19+
# Auto generated by looping over .Values.consistency.sites from the helm chart
20+
{{- range $site, $config := .Values.consistency.sites }}
21+
{{ if gt $config.interval 0.0 }}
22+
0 0 * * * root {{ $.Values.consistency.detDelay }} -d {{ $config.interval }}d -f 1d /consistency/site.sh {{ $site }}
23+
0 0 * * * root {{ $.Values.consistency.detDelay }} -d {{ $config.interval }}d -f 1d /consistency/unmerged_site.sh {{ $site }}
24+
{{- end }}
25+
{{- end }}

helm/rucio-consistency/templates/deployment.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ spec:
3737
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
3838
imagePullPolicy: {{ .Values.image.pullPolicy }}
3939
env:
40+
{{- if .Values.consistency.useJobber}}
41+
- name: RUCIO_USING_JOBBER
42+
value: "1"
43+
{{- end }}
44+
{{- if .Values.consistency.useCron}}
45+
- name: RUCIO_USING_CRON
46+
value: "1"
47+
{{- end }}
4048
- name: RUCIO_CFG_COMMON_LOGLEVEL
4149
value: {{ .Values.consistency.logLevel }}
4250
- name: RUCIO_CFG_DATABASE_DEFAULT
@@ -80,6 +88,10 @@ spec:
8088
terminationMessagePath: /dev/termination-log
8189
terminationMessagePolicy: File
8290
volumeMounts:
91+
{{- if .Values.consistency.useCron}}
92+
- mountPath: /etc/cron.rucio/
93+
name: crontab
94+
{{- end }}
8395
- mountPath: /config/
8496
name: consistency-config
8597
- mountPath: /unmerged-config/
@@ -113,6 +125,13 @@ spec:
113125
secret:
114126
defaultMode: 420
115127
secretName: server-rucio-x509up
128+
{{- if .Values.consistency.useCron}}
129+
- configMap:
130+
defaultMode: 0644
131+
name: {{ include "rucio-consistency.fullname" . }}-crontab
132+
name: crontab
133+
{{- end }}
134+
# FIXME: Also value for use jobber when it's working
116135
- name: jobber-config
117136
configMap:
118137
defaultMode: 0644

helm/rucio-consistency/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ consistency:
3131
reportSize: 10Gi
3232
defaultRoot: "/path/to/nowhere"
3333
rucioCfgSecret: "this-one"
34+
useCron: 0
35+
useJobber: 1
36+
detDelay: /DeterministicDelay
3437
filter: ""
3538
sites:
3639
{}
@@ -40,6 +43,8 @@ consistency:
4043
# Some_Site:
4144
# interval: 0
4245

46+
# With useCron set, any interval is fine.
47+
4348
imagePullSecrets: []
4449
nameOverride: ""
4550
fullnameOverride: ""

0 commit comments

Comments
 (0)