|
| 1 | +apiVersion: batch/v1 |
| 2 | +kind: CronJob |
| 3 | +metadata: |
| 4 | + name: {{ .Chart.Name }} |
| 5 | +spec: |
| 6 | + successfulJobsHistoryLimit: 1 |
| 7 | + failedJobsHistoryLimit: 3 |
| 8 | + concurrencyPolicy: Forbid |
| 9 | + schedule: {{ .Values.cronSchedule | quote }} |
| 10 | + jobTemplate: |
| 11 | + spec: |
| 12 | + activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }} |
| 13 | + backoffLimit: 1 |
| 14 | + parallelism: 1 |
| 15 | + template: |
| 16 | + metadata: |
| 17 | + labels: |
| 18 | + cronjob: {{ .Chart.Name }} |
| 19 | + spec: |
| 20 | + activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }} |
| 21 | + restartPolicy: Never |
| 22 | + containers: |
| 23 | + - name: {{ .Chart.Name }} |
| 24 | + image: {{ printf "%s:%s" .Values.image.repository .Values.image.tag | quote }} |
| 25 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 26 | + command: |
| 27 | + - bash |
| 28 | + - -c |
| 29 | + - {{ printf "%s/keycloak_matrix_sync.sh" .Values.configs.script_home | quote }} |
| 30 | + {{- if .Values.resources }} |
| 31 | + resources: |
| 32 | + {{ toYaml .Values.resources | nindent 16 }} |
| 33 | + {{- end }} |
| 34 | + volumeMounts: |
| 35 | + - name: {{ .Chart.Name }} |
| 36 | + mountPath: "{{.Values.configs.script_home}}/keycloak_matrix_sync.conf" |
| 37 | + subPath: keycloak_matrix_sync.conf |
| 38 | + - name: {{ .Chart.Name }} |
| 39 | + mountPath: "{{.Values.configs.script_home}}/mas-config.yaml" |
| 40 | + subPath: mas-database.yaml |
| 41 | + volumes: |
| 42 | + - name: {{ .Chart.Name }} |
| 43 | + secret: |
| 44 | + secretName: {{ .Chart.Name }} |
| 45 | + {{- if .Values.nodeSelector }} |
| 46 | + nodeSelector: |
| 47 | + {{ toYaml .Values.nodeSelector | nindent 12 }} |
| 48 | + {{- end }} |
| 49 | + {{- if .Values.tolerations }} |
| 50 | + tolerations: |
| 51 | + {{ toYaml .Values.tolerations | nindent 12 }} |
| 52 | + {{- end }} |
| 53 | + {{- if .Values.affinity }} |
| 54 | + affinity: |
| 55 | + {{ toYaml .Values.affinity | nindent 12 }} |
| 56 | + {{- end }} |
0 commit comments