47
47
securityContext :
48
48
{{- toYaml .Values.syncProjectCronjob.podSecurityContext | nindent 12 }}
49
49
restartPolicy : OnFailure
50
- {{- if or .Values.ssh.config .Values.ssh.privateKeys }}
50
+ {{- if or (or .Values.ssh.config .Values.ssh.privateKeys) .Values.syncProjectCronjob.initContainers }}
51
51
initContainers :
52
52
- name : copy-ssh-secrets
53
53
image : " busybox"
@@ -61,17 +61,25 @@ spec:
61
61
name : " dummy-volume"
62
62
- mountPath : " /ssh-data"
63
63
name : " pontoon-ssh"
64
+ {{- if .Values.syncProjectCronjob.initContainers }}
65
+ {{- include "common.tplvalues.render" (dict "value" .Values.syncProjectCronjob.initContainers "context" $) | nindent 12 }}
66
+ {{- end }}
64
67
{{- end }}
65
68
containers :
66
69
- name : sync-projects
67
70
securityContext :
68
71
{{- toYaml .Values.syncProjectCronjob.securityContext | nindent 16 }}
69
72
image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
70
73
imagePullPolicy : {{ .Values.image.pullPolicy }}
74
+ {{- if or .Values.syncProjectCronjob.command .Values.syncProjectCronjob.args}}
75
+ command : {{- include "common.tplvalues.render" (dict "value" .Values.syncProjectCronjob.command "context" $) | nindent 14 }}
76
+ args : {{- include "common.tplvalues.render" (dict "value" .Values.syncProjectCronjob.args "context" $) | nindent 14 }}
77
+ {{- else }}
71
78
command : ["python"]
72
79
args :
73
80
- " manage.py"
74
81
- " sync_projects"
82
+ {{- end }}
75
83
resources :
76
84
{{- toYaml .Values.syncProjectCronjob.resources | nindent 16 }}
77
85
envFrom :
@@ -100,6 +108,9 @@ spec:
100
108
- name : " dummy-volume"
101
109
mountPath : {{ .Values.ssh.mountPath | quote }}
102
110
{{- end }}
111
+ {{- if .Values.syncProjectCronjob.extraVolumeMounts }}
112
+ {{- include "common.tplvalues.render" (dict "value" .Values.syncProjectCronjob.extraVolumeMounts "context" $) | nindent 16 }}
113
+ {{- end }}
103
114
volumes :
104
115
{{- if .Values.extraSettingsModule }}
105
116
- name : " pontoon-settings"
@@ -114,6 +125,9 @@ spec:
114
125
- name : " dummy-volume"
115
126
emptyDir : {}
116
127
{{- end }}
128
+ {{- if .Values.syncProjectCronjob.extraVolumes }}
129
+ {{- include "common.tplvalues.render" (dict "value" .Values.syncProjectCronjob.extraVolumes "context" $) | nindent 12 }}
130
+ {{- end }}
117
131
{{- with .Values.syncProjectCronjob.nodeSelector }}
118
132
nodeSelector :
119
133
{{- toYaml . | nindent 12 }}
0 commit comments