diff --git a/charts/incubator/plextraktsync/Chart.yaml b/charts/incubator/plextraktsync/Chart.yaml index 2cedb06a31e..b4d2417c691 100644 --- a/charts/incubator/plextraktsync/Chart.yaml +++ b/charts/incubator/plextraktsync/Chart.yaml @@ -10,7 +10,7 @@ dependencies: repository: https://library-charts.truecharts.org version: 10.5.10 deprecated: false -description: "Cette app permet de synchroniser le contenu de votre bibliotheque plex (pas de plexpass obligatoire) avec le site trakt.tv ." +description: Two-way-sync between trakt.tv and Plex Media Server. home: https://truecharts.org/docs/charts/incubator/plextraktsync icon: https://truecharts.org/img/hotlink-ok/chart-icons/plextraktsync.png keywords: @@ -28,4 +28,4 @@ sources: - https://github.com/Taxel/PlexTraktSync - https://ghcr.io/taxel/plextraktsync type: application -version: 0.0.31 +version: 1.0.0 diff --git a/charts/incubator/plextraktsync/questions.yaml b/charts/incubator/plextraktsync/questions.yaml index 67df7bc5e98..e8d0077c803 100644 --- a/charts/incubator/plextraktsync/questions.yaml +++ b/charts/incubator/plextraktsync/questions.yaml @@ -10,51 +10,86 @@ questions: # Include{recreate} # Include{controllerExpert} # Include{controllerExpertExtraArgs} + - variable: plexTraktSync + group: Container Configuration + label: Plex Trakt Sync Config + schema: + additional_attrs: true + type: dict + attrs: + - variable: task + label: Task + description: Task to run on schedule. Leave empty for default. Default is + schema: + type: string + default: "" + - variable: schedule + label: Schedule + description: How often to run the task + schema: + type: cron + default: + minute: "0" + hour: "*/6" + dom: "*" + month: "*" + dow: "*" +# Include{containerConfig} # Include{serviceExpertRoot} default: false # Include{serviceExpert} # Include{serviceList} +# Include{persistenceRoot} + - variable: config + label: Config Storage + description: Container Path Config + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} +# Include{persistenceAdvanced} # Include{persistenceList} # Include{ingressList} # Include{security} # Include{securityContextAdvancedRoot} - variable: privileged - label: "Privileged mode" + label: Privileged mode schema: type: boolean default: false - variable: readOnlyRootFilesystem - label: "ReadOnly Root Filesystem" + label: ReadOnly Root Filesystem schema: type: boolean default: false - variable: allowPrivilegeEscalation - label: "Allow Privilege Escalation" + label: Allow Privilege Escalation schema: type: boolean default: false - variable: runAsNonRoot - label: "runAsNonRoot" + label: runAsNonRoot schema: type: boolean default: false # Include{securityContextAdvanced} # Include{podSecurityContextRoot} - variable: runAsUser - label: "runAsUser" - description: "The UserID of the user running the application" + label: runAsUser + description: The UserID of the user running the application schema: type: int default: 0 - variable: runAsGroup - label: "runAsGroup" - description: The groupID this App of the user running the application" + label: runAsGroup + description: The groupID this App of the user running the application schema: type: int default: 0 - variable: fsGroup - label: "fsGroup" - description: "The group that should own ALL storage." + label: fsGroup + description: The group that should own ALL storage. schema: type: int default: 568 diff --git a/charts/incubator/plextraktsync/templates/_cronjob.tpl b/charts/incubator/plextraktsync/templates/_cronjob.tpl new file mode 100644 index 00000000000..bb874ccc23e --- /dev/null +++ b/charts/incubator/plextraktsync/templates/_cronjob.tpl @@ -0,0 +1,52 @@ +{{/* 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 -}} diff --git a/charts/incubator/plextraktsync/templates/common.yaml b/charts/incubator/plextraktsync/templates/common.yaml index cbf66c20818..1d3683f7681 100644 --- a/charts/incubator/plextraktsync/templates/common.yaml +++ b/charts/incubator/plextraktsync/templates/common.yaml @@ -1,2 +1,7 @@ +{{- include "tc.common.loader.init" . }} + +{{/* Render cronjob for clamav */}} +{{- include "plextraktsync.cronjob" . }} + {{/* Render the templates */}} -{{ include "tc.common.loader.all" . }} +{{ include "tc.common.loader.apply" . }} diff --git a/charts/incubator/plextraktsync/values.yaml b/charts/incubator/plextraktsync/values.yaml index 5e83970d934..c533bb7b38a 100644 --- a/charts/incubator/plextraktsync/values.yaml +++ b/charts/incubator/plextraktsync/values.yaml @@ -1,12 +1,23 @@ -env: {} image: pullPolicy: IfNotPresent repository: tccr.io/truecharts/plextraktsync tag: latest@sha256:d76e19db77e87d4eea07c90baf43f5c37e9f4f41987aca1fa96bd52554beb7c7 -persistence: {} + podSecurityContext: runAsGroup: 0 runAsUser: 0 + +securityContext: + readOnlyRootFilesystem: false + runAsNonRoot: false + +tty: true +stdin: true + +plexTraktSync: + task: "" + schedule: "0 */6 * * *" + probes: liveness: enabled: false @@ -14,9 +25,7 @@ probes: enabled: false startup: enabled: false -securityContext: - readOnlyRootFilesystem: false - runAsNonRoot: false + service: main: enabled: false @@ -24,5 +33,15 @@ service: main: enabled: false +persistence: + config: + enabled: true + mountPath: /app/config + portal: enabled: false + +cronjob: + annotations: {} + failedJobsHistoryLimit: 5 + successfulJobsHistoryLimit: 2 diff --git a/cspell.config.yaml b/cspell.config.yaml index 7aa4d5f3069..7fa726ee388 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -145,6 +145,7 @@ words: - plaxt - playout - plex + - plextraktsync - preconfigured - prefs - preload