Files
truecharts/charts/incubator/plextraktsync/templates/_cronjob.tpl
T
69e918afd2 fix(plextraktsync): add docs and persistence (#3604)
* fix(plextraktsync): add docs and persistence

* fix(plextraktsync): add docs and persistence

* Update charts/incubator/plextraktsync/values.yaml

* Update charts/incubator/plextraktsync/Chart.yaml

* removed excess line

* create initContainers

* fixed init formatting

* add env to init container

* update questions.yaml

* removed comment

* Update charts/incubator/plextraktsync/values.yaml

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/plextraktsync/values.yaml

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/plextraktsync/values.yaml

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/plextraktsync/questions.yaml

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/plextraktsync/docs/installation_notes.md

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/plextraktsync/questions.yaml

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/plextraktsync/questions.yaml

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/plextraktsync/questions.yaml

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/plextraktsync/questions.yaml

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* switch to configmap

* lint

* Not needed

* add cron

* add gui

* delete docs for now

* majorbump

* cron update

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros kois <s.kois@outlook.com>
2022-09-17 11:47:20 +03:00

53 lines
1.5 KiB
Smarty

{{/* Define the cronjob */}}
{{- define "plextraktsync.cronjob" -}}
{{- $jobName := include "tc.common.names.fullname" . }}
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ printf "%s-cronjob" $jobName }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
spec:
schedule: "{{ .Values.plexTraktSync.schedule }}"
concurrencyPolicy: Forbid
{{- with .Values.cronjob.failedJobsHistoryLimit }}
failedJobsHistoryLimit: {{ . }}
{{- end }}
{{- with .Values.cronjob.successfulJobsHistoryLimit }}
successfulJobsHistoryLimit: {{ . }}
{{- end }}
jobTemplate:
metadata:
spec:
template:
metadata:
spec:
securityContext:
runAsUser: 0
runAsGroup: 0
restartPolicy: Never
containers:
- name: {{ .Chart.Name }}
securityContext:
privileged: false
readOnlyRootFilesystem: false
allowPrivilegeEscalation: false
runAsNonRoot: false
capabilities:
drop:
- ALL
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
command:
- plextraktsync
{{- if .Values.plexTraktSync.task }}
- {{ .Values.plexTraktSync.task }}
{{- else }}
- sync --sync=all
{{- end }}
resources:
{{ toYaml .Values.resources | indent 16 }}
{{- end -}}