1

i have a helm template vor an cronjob in a chart:

apiVersion: batch/v1
kind: CronJob
metadata:
  name: {{ include "gdp-chart.fullname" . }}-importjob
  labels:
    {{- include "gdp-chart.labels" . | nindent 4 }}
spec:
  suspend: {{ .Values.import.suspend }}
  schedule: {{ .Values.import.schedule }}
  jobTemplate:
    metadata:
      name: import-job
    spec:
      template:
        spec:
          containers:
          - image: curlimages/curl
            name: import-job
            args:
            - "$(GDP_INT_IMPORT_URL)"
            {{- with .Values.import.env}}
            env:
              {{- toYaml . | nindent 12}}
            {{- end}}
          restartPolicy: Never

I want to change spec.suspend by command. If i set it to from true to false it works, suspend is set to false: helm upgrade --reuse-values --set import.suspend=false gdp gdp-api

but if i try to set it to from false true, the value of suspend does not change to true:

helm upgrade --reuse-values --set import.suspend='true' gdp gdp-api

NAME                SCHEDULE     SUSPEND   ACTIVE   LAST SCHEDULE   AGE
gdp-api-importjob   0 0 31 2 *   False     0        7h32m           3d7h

Why is this the case?

DaveVentura
  • 612
  • 5
  • 19

0 Answers0