From 849f44e1ee031574bf1b7605bc1e9fbfffc81d14 Mon Sep 17 00:00:00 2001 From: Max Rosin Date: Sun, 8 Aug 2021 14:36:31 +0200 Subject: [PATCH] Quote backup and cleanup schedules To be honest, it is a bit of an obscure use-case to run this each minute. But if the schedule starts with an * helm fails with "error converting YAML to JSON: yaml: line 11: did not find expected alphabetic or numeric character". This is solved by always quoting the schedule. --- charts/backup/Chart.yaml | 2 +- charts/backup/templates/cronjob-backup.yaml | 2 +- charts/backup/templates/cronjob-cleanup.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/backup/Chart.yaml b/charts/backup/Chart.yaml index 7ccb852d..577416f0 100644 --- a/charts/backup/Chart.yaml +++ b/charts/backup/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v2 name: backup description: Chart to back up PVCs with restic and regularly clean up the snapshots. type: application -version: 1.0.2 +version: 1.0.3 diff --git a/charts/backup/templates/cronjob-backup.yaml b/charts/backup/templates/cronjob-backup.yaml index 12399384..446259e1 100644 --- a/charts/backup/templates/cronjob-backup.yaml +++ b/charts/backup/templates/cronjob-backup.yaml @@ -5,7 +5,7 @@ metadata: labels: {{- include "backup.labels" . | nindent 4 }} spec: - schedule: {{ .Values.backupJob.schedule }} + schedule: {{ .Values.backupJob.schedule | quote }} jobTemplate: spec: template: diff --git a/charts/backup/templates/cronjob-cleanup.yaml b/charts/backup/templates/cronjob-cleanup.yaml index 8e58720b..96bc824b 100644 --- a/charts/backup/templates/cronjob-cleanup.yaml +++ b/charts/backup/templates/cronjob-cleanup.yaml @@ -6,7 +6,7 @@ metadata: labels: {{- include "backup.labels" . | nindent 4 }} spec: - schedule: {{ .Values.cleanupJob.schedule }} + schedule: {{ .Values.cleanupJob.schedule | quote }} jobTemplate: spec: template: