diff --git a/charts/incubator/plextraktsync/Chart.yaml b/charts/incubator/plextraktsync/Chart.yaml index dee805c1480..38d071c536a 100644 --- a/charts/incubator/plextraktsync/Chart.yaml +++ b/charts/incubator/plextraktsync/Chart.yaml @@ -1,14 +1,9 @@ -annotations: - truecharts.org/SCALE-support: "true" - truecharts.org/catagories: | - - Tools-Utilities - - MediaApp-Other apiVersion: v2 -appVersion: "latest" +appVersion: "0.27.7" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 + version: 14.0.3 deprecated: false description: Two-way-sync between trakt.tv and Plex Media Server. home: https://truecharts.org/charts/incubator/plextraktsync @@ -27,4 +22,9 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/plextraktsync - https://github.com/Taxel/PlexTraktSync type: application -version: 3.0.19 +version: 4.0.0 +annotations: + truecharts.org/catagories: | + - Tools-Utilities + - MediaApp-Other + truecharts.org/SCALE-support: "true" diff --git a/charts/incubator/plextraktsync/questions.yaml b/charts/incubator/plextraktsync/questions.yaml index 97c8131349f..3d4bbd82374 100644 --- a/charts/incubator/plextraktsync/questions.yaml +++ b/charts/incubator/plextraktsync/questions.yaml @@ -8,65 +8,75 @@ questions: # Include{replicas1} # Include{podSpec} # Include{containerMain} + # Include{containerBasic} # Include{containerAdvanced} - - variable: plexTraktSync + - variable: plextraktsync group: App 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 + - variable: cron_enabled + label: "Enable cronjob" schema: - type: string - default: "" - - variable: schedule - label: Schedule - description: How often to run the task - schema: - type: string - default: "0 */6 * * *" + type: boolean + default: true + show_subquestions_if: true + subquestions: + - 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: string + default: "0 */6 * * *" + # Include{containerConfig} +# Include{podOptions} # Include{serviceExpertRoot} # Include{serviceExpert} # Include{serviceList} # Include{persistenceRoot} - variable: config - label: Config Storage - description: Container Path Config + label: App Config Storage + description: Stores the Application Configuration. schema: additional_attrs: true type: dict attrs: # Include{persistenceBasic} # Include{persistenceList} +# Include{securityContextRoot} -# Include{podSecurityContextRoot} - - variable: runAsUser - 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 - schema: - type: int - default: 0 + - variable: runAsUser + 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" + schema: + type: int + default: 0 # Include{securityContextContainer} # Include{securityContextAdvanced} # Include{securityContextPod} - - variable: fsGroup - label: fsGroup - description: The group that should own ALL storage. - schema: - type: int - default: 568 + - variable: fsGroup + label: "fsGroup" + description: "The group that should own ALL storage." + schema: + type: int + default: 568 # Include{resources} # Include{advanced} diff --git a/charts/incubator/plextraktsync/templates/NOTES.txt b/charts/incubator/plextraktsync/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/plextraktsync/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/plextraktsync/templates/_cronjob.tpl b/charts/incubator/plextraktsync/templates/_cronjob.tpl index bb874ccc23e..2ad8eb383da 100644 --- a/charts/incubator/plextraktsync/templates/_cronjob.tpl +++ b/charts/incubator/plextraktsync/templates/_cronjob.tpl @@ -1,52 +1,27 @@ {{/* 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 }} - +enabled: true +type: "CronJob" +schedule: "{{ .Values.plextraktsync.schedule }}" +podSpec: + restartPolicy: Never + containers: + cron: + enabled: true + primary: true + imageSelector: "image" + command: + - plextraktsync + {{- if .Values.plextraktsync.task }} + - {{ .Values.plextraktsync.task }} + {{- else }} + - sync --sync=all + {{- end }} + probes: + liveness: + enabled: false + readiness: + enabled: false + startup: + enabled: false {{- end -}} diff --git a/charts/incubator/plextraktsync/templates/common.yaml b/charts/incubator/plextraktsync/templates/common.yaml index 1d3683f7681..f21ed3d43ed 100644 --- a/charts/incubator/plextraktsync/templates/common.yaml +++ b/charts/incubator/plextraktsync/templates/common.yaml @@ -1,7 +1,13 @@ -{{- include "tc.common.loader.init" . }} +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . }} -{{/* Render cronjob for clamav */}} -{{- include "plextraktsync.cronjob" . }} +{{- if and .Values.plextraktsync.cron_enabled .Values.plextraktsync.schedule}} + {{/* Render cronjob for plextraktsync */}} + {{- $cronjob := include "plextraktsync.cronjob" . | fromYaml -}} + {{- if $cronjob -}} + {{- $_ := set .Values.workload "cron" $cronjob -}} + {{- end -}} +{{- end -}} {{/* Render the templates */}} -{{ include "tc.common.loader.apply" . }} +{{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/incubator/plextraktsync/values.yaml b/charts/incubator/plextraktsync/values.yaml index c22ea016559..8a4514b0340 100644 --- a/charts/incubator/plextraktsync/values.yaml +++ b/charts/incubator/plextraktsync/values.yaml @@ -1,30 +1,14 @@ image: pullPolicy: IfNotPresent repository: tccr.io/truecharts/plextraktsync - tag: latest@sha256:30cf60eb8d93995c358d88912c5dd7acf101a5673c0664016ca275718555d948 - -podSecurityContext: - runAsGroup: 0 - runAsUser: 0 + tag: v0.27.7@sha256:cefad9eed53955d91f1020d95c5f09f0f96c8cc5e89bcd25036cd6dd786d2a5d securityContext: - readOnlyRootFilesystem: false - runAsNonRoot: false - -tty: true -stdin: true - -plexTraktSync: - task: "" - schedule: "0 */6 * * *" - -probes: - liveness: - enabled: false - readiness: - enabled: false - startup: - enabled: false + container: + runAsNonRoot: false + readOnlyRootFilesystem: false + runAsUser: 0 + runAsGroup: 0 service: main: @@ -33,15 +17,36 @@ service: main: enabled: false +plextraktsync: + cron_enabled: true + task: "" + schedule: "0 */6 * * *" + +cronjob: + annotations: {} + failedJobsHistoryLimit: 5 + successfulJobsHistoryLimit: 2 + +workload: + main: + podSpec: + containers: + main: + tty: true + stdin: true + probes: + liveness: + enabled: false + readiness: + enabled: false + startup: + enabled: false + persistence: config: enabled: true mountPath: /app/config portal: - enabled: false - -cronjob: - annotations: {} - failedJobsHistoryLimit: 5 - successfulJobsHistoryLimit: 2 + open: + enabled: false