@@ -88,7 +88,7 @@ local Backend(backupkey, bucket, s3secret, create_bucket=true, caConfigMap=null)
8888local CheckSpec(schedule) =
8989 {
9090 spec+: {
91- check: {
91+ check+ : {
9292 [if k8up_params.prometheus_push_gateway != null then 'promURL']:
9393 k8up_params.prometheus_push_gateway,
9494 schedule: schedule,
@@ -110,7 +110,7 @@ local CheckSpec(schedule) =
110110local PruneSpec(schedule, keepDaily, keepLast) =
111111 {
112112 spec+: {
113- prune: {
113+ prune+ : {
114114 retention: {
115115 keepDaily: keepDaily,
116116 keepLast: keepLast,
@@ -179,10 +179,24 @@ local Job(name, keep_jobs=3, backupkey=null, bucket=null, s3secret=null, create_
179179 * See the documentation for \ref Job for definitions of the other arguments.
180180 */
181181local Schedule(name, schedule, keep_jobs=3, backupkey=null, bucket=null, s3secret=null, create_bucket=true, caConfigMap=null) =
182+ local caVolume = {
183+ [if caConfigMap != null then 'volumes']: [
184+ {
185+ name: 'ca',
186+ configMap: {
187+ name: caConfigMap,
188+ },
189+ },
190+ ],
191+ };
182192 // prune backups daily, keep last 5 and 30 daily backups
183- local pspec = PruneSpec('30 2 * * *', 30, 5);
193+ local pspec = PruneSpec('30 2 * * *', 30, 5) {
194+ spec+: { prune+: caVolume },
195+ };
184196 // check backup repo dalily
185- local cspec = CheckSpec('30 3 * * *');
197+ local cspec = CheckSpec('30 3 * * *') {
198+ spec+: { check+: caVolume },
199+ };
186200 local backend = Backend(backupkey, bucket, s3secret, create_bucket, caConfigMap);
187201 local theschedule =
188202 {
@@ -198,15 +212,7 @@ local Schedule(name, schedule, keep_jobs=3, backupkey=null, bucket=null, s3secre
198212 k8up_params.prometheus_push_gateway,
199213 keepJobs: keep_jobs,
200214 schedule: schedule,
201- [if caConfigMap != null then 'volumes']: [
202- {
203- name: 'ca',
204- configMap: {
205- name: caConfigMap,
206- },
207- },
208- ],
209- },
215+ } + caVolume,
210216 },
211217 } + pspec + cspec;
212218 {
0 commit comments