From 2abf3d0a7f6147c2ab169b8953e3ced00e300c58 Mon Sep 17 00:00:00 2001 From: Julien Cabillot Date: Wed, 21 Jun 2023 18:24:51 -0400 Subject: [PATCH] . --- charts/ttrss/Chart.yaml | 2 +- charts/ttrss/templates/02-cronjob.yaml | 71 +++----------------------- charts/ttrss/values.yaml | 6 +++ 3 files changed, 15 insertions(+), 64 deletions(-) diff --git a/charts/ttrss/Chart.yaml b/charts/ttrss/Chart.yaml index a9bae48..d8d7ef9 100644 --- a/charts/ttrss/Chart.yaml +++ b/charts/ttrss/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 description: Helm chart for ttrss name: ttrss type: application -version: 0.0.17 +version: 0.0.18 kubeVersion: ">=1.16.0-0" keywords: - ttrss diff --git a/charts/ttrss/templates/02-cronjob.yaml b/charts/ttrss/templates/02-cronjob.yaml index 24c5913..1b87848 100644 --- a/charts/ttrss/templates/02-cronjob.yaml +++ b/charts/ttrss/templates/02-cronjob.yaml @@ -14,16 +14,21 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - schedule: "25 9 * * *" + schedule: {{ .Values.cronjob.schedule }} + concurrencyPolicy: {{ .Values.cronjob.concurrencyPolicy }} + successfulJobsHistoryLimit: {{ .Values.cronjob.successfulJobsHistoryLimit }} + failedJobsHistoryLimit: {{ .Values.cronjob.failedJobsHistoryLimit }} jobTemplate: spec: template: spec: + restartPolicy: Never + backoffLimit: 0 automountServiceAccountToken: false containers: - name: "mydl-mongo-dump" image: "docker.io/library/mariadb:10.2" - imagePullPolicy: IfNotPresent + imagePullPolicy: {{ .Values.image.pullPolicy }} command : ["/bin/sh", "-c"] args: [ "echo toto" ] # TODO: volumemount avec le pvc deja cree ? @@ -39,64 +44,4 @@ spec: # volumes: # - name: "mydl-mongo-dump" # persistentVolumeClaim: - # claimName: "mydl-mongo-dump" - -# spec: -# schedule: {{ .Values.cronjob.schedule }} -# concurrencyPolicy: {{ .Values.cronjob.concurrencyPolicy }} -# successfulJobsHistoryLimit: {{ .Values.cronjob.successfulJobsHistoryLimit }} -# failedJobsHistoryLimit: {{ .Values.cronjob.failedJobsHistoryLimit }} -# jobTemplate: -# spec: -# backoffLimit: 0 -# template: -# spec: -# restartPolicy: Never -# automountServiceAccountToken: false -# containers: -# - name: {{ include "common.names.fullname" . }} -# image: {{ printf "%s:%s" .Values.image.repository (default .Chart.AppVersion .Values.image.tag) | quote }} -# imagePullPolicy: {{ .Values.image.pullPolicy }} -# {{- with .Values.env }} -# env: -# {{- range $k, $v := . }} -# {{- $name := $k }} -# {{- $value := $v }} -# {{- if kindIs "int" $name }} -# {{- $name = required "environment variables as a list of maps require a name field" $value.name }} -# {{- end }} -# - name: {{ quote $name }} -# {{- if kindIs "map" $value -}} -# {{- if hasKey $value "value" }} -# {{- $value = $value.value -}} -# {{- else if hasKey $value "valueFrom" }} -# {{- toYaml $value | nindent 6 }} -# {{- else }} -# {{- dict "valueFrom" $value | toYaml | nindent 6 }} -# {{- end }} -# {{- end }} -# {{- if not (kindIs "map" $value) }} -# {{- if kindIs "string" $value }} -# {{- $value = tpl $value $ }} -# {{- end }} -# value: {{ quote $value }} -# {{- end }} -# {{- end }} -# {{- end }} -# envFrom: -# - secretRef: -# name: {{ include "common.names.fullname" . }} -# volumeMounts: -# - name: dump -# mountPath: /dump -# - name: db -# mountPath: /home/offlineimap/.offlineimap -# volumes: -# - name: dump -# hostPath: -# path: /data/volume-offlineimap -# type: '' -# - name: db -# hostPath: -# path: /data/volume-offlineimap-db -# type: '' \ No newline at end of file + # claimName: "mydl-mongo-dump" \ No newline at end of file diff --git a/charts/ttrss/values.yaml b/charts/ttrss/values.yaml index 3f81216..b42e7c8 100644 --- a/charts/ttrss/values.yaml +++ b/charts/ttrss/values.yaml @@ -88,3 +88,9 @@ persistence: path: "/mnt/musique" readOnly: true mountPath: "/media" + +cronjob: + schedule: "29 13 * * *" + concurrencyPolicy: "Forbid" + successfulJobsHistoryLimit: 3 + failedJobsHistoryLimit: 5 \ No newline at end of file