forked from infra/ansible
48 lines
1.3 KiB
Django/Jinja
48 lines
1.3 KiB
Django/Jinja
---
|
|
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: cron
|
|
spec:
|
|
suspend: false
|
|
concurrencyPolicy: Forbid
|
|
schedule: "0 21 * * *"
|
|
startingDeadlineSeconds: 600
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
parent: "cronjobtranslate"
|
|
spec:
|
|
containers:
|
|
- name: translate
|
|
image: image-registry.openshift-image-registry.svc:5000/docstranslation/builder:latest
|
|
args:
|
|
- "--clone_sources"
|
|
- "--commit_l10n"
|
|
- "--commit_tsources"
|
|
{% if env == 'staging' %}
|
|
- "--nopush"
|
|
{% endif %}
|
|
env:
|
|
- name: UPDATE_DOCS_TRANS_SEC
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: git-token
|
|
key: token
|
|
- name: UPDATE_DOCS_TRANS_NAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: git-token
|
|
key: token_name
|
|
volumeMounts:
|
|
- name: mail-config-volume
|
|
mountPath: /workspace/config.ini
|
|
subPath: config.ini
|
|
readOnly: true
|
|
restartPolicy: Never
|
|
volumes:
|
|
- name: mail-config-volume
|
|
configMap:
|
|
name: mail-config
|