Skip to content

Commit 5ba9a91

Browse files
Merge pull request #935 from emcgrady/master
helm conditional added
2 parents 62daab5 + 2c2be6a commit 5ba9a91

File tree

4 files changed

+48
-42
lines changed

4 files changed

+48
-42
lines changed

helm/rucio-cron-jobs/Chart.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ 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.0.0
18+
version: 3.1.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
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
appVersion: latest
24+

helm/rucio-cron-jobs/templates/cronjobs.yaml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -123,41 +123,3 @@ spec:
123123
{{- end }}
124124
command: ['/root/CMSRucio/docker/rucio_client/scripts/k8s_sync_users_links.sh']
125125
restartPolicy: Never
126-
---
127-
apiVersion: batch/v1
128-
kind: CronJob
129-
metadata:
130-
name: {{ .Release.Name }}-wf-dashboard
131-
spec:
132-
schedule: "20 4 * * *"
133-
jobTemplate:
134-
spec:
135-
activeDeadlineSeconds: 7200
136-
backoffLimit: 0
137-
template:
138-
spec:
139-
volumes:
140-
- name: proxy-volume
141-
secret:
142-
defaultMode: 420
143-
secretName: server-rucio-x509up
144-
{{- range $key, $val := .Values.persistentVolumes }}
145-
- name: {{ $key }}
146-
persistentVolumeClaim:
147-
claimName: {{ $val.name }}
148-
{{- end}}
149-
containers:
150-
- name: {{ .Release.Name }}-wf-dashboard
151-
image: registry.cern.ch/cmsrucio/wf-dashboard:release-0.9
152-
imagePullPolicy: {{ .Values.image.pullPolicy }}
153-
volumeMounts:
154-
- mountPath: /opt/proxy
155-
name: proxy-volume
156-
env:
157-
- name: X509_USER_PROXY
158-
value: "/opt/proxy"
159-
{{- with .Values.cronjobSettings.additionalEnvs }}
160-
{{ toYaml . | indent 16 }}
161-
{{- end }}
162-
command: ['python3', 'monit_pull.py']
163-
restartPolicy: Never
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{{- if .Values.wf-dashboard.enabled -}}
2+
{{- $fullName := include "rucio-cron-jobs.fullname" . -}}
3+
{{- $svcPort := .Values.service.port -}}
4+
apiVersion: batch/v1
5+
kind: cron-job
6+
metadata:
7+
name: {{ .Release.Name }}-wf-dashboard
8+
labels:
9+
{{- include "rucio-cron-jobs.labels" . | nindent 4 }}
10+
{{- end }}
11+
spec:
12+
schedule: "20 4 * * *"
13+
jobTemplate:
14+
spec:
15+
activeDeadlineSeconds: 14400
16+
backoffLimit: 0
17+
template:
18+
spec:
19+
volumes:
20+
- name: proxy-volume
21+
secret:
22+
defaultMode: 420
23+
secretName: server-rucio-x509up
24+
{{- range $key, $val := .Values.persistentVolumes }}
25+
- name: {{ $key }}
26+
persistentVolumeClaim:
27+
claimName: {{ $val.name }}
28+
{{- end}}
29+
containers:
30+
- name: {{ .Release.Name }}-wf-dashboard
31+
image: registry.cern.ch/cmsrucio/wf-dashboard:release-0.9
32+
imagePullPolicy: {{ .Values.image.pullPolicy }}
33+
volumeMounts:
34+
- mountPath: /opt/proxy
35+
name: proxy-volume
36+
env:
37+
- name: X509_USER_PROXY
38+
value: "/opt/proxy"
39+
{{- with .Values.cronjobSettings.additionalEnvs }}
40+
{{ toYaml . | indent 16 }}
41+
{{- end }}
42+
command: ['python3', 'monit_pull.py']
43+
restartPolicy: Never
44+
{{- end }}

helm/rucio-cron-jobs/values.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,5 @@ tolerations: []
9191

9292
affinity: {}
9393

94-
wfDashboard: false
95-
# when true, the workflow dashboard will be run in integration and production
96-
# when false, the workflow dashboard will only run in production
94+
wf-dashboard:
95+
enabled: false

0 commit comments

Comments
 (0)