From ab6d8beac0ea7ab03d1cc1c55a55366ea46c27fd Mon Sep 17 00:00:00 2001 From: Xstar97 Date: Sun, 18 Dec 2022 06:51:52 -0500 Subject: [PATCH] fix(traktarr) code fixes (#5499) * fix(traktarr) code fixes * fix RUNNOW variable * Apply suggestions from code review Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * fix quote * UI * Update charts/incubator/traktarr/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/traktarr/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/incubator/traktarr/Chart.yaml | 13 +-- charts/incubator/traktarr/questions.yaml | 127 +++++++++++++---------- charts/incubator/traktarr/values.yaml | 48 ++++++--- 3 files changed, 109 insertions(+), 79 deletions(-) diff --git a/charts/incubator/traktarr/Chart.yaml b/charts/incubator/traktarr/Chart.yaml index bad644c3793..385e375ce7f 100644 --- a/charts/incubator/traktarr/Chart.yaml +++ b/charts/incubator/traktarr/Chart.yaml @@ -1,7 +1,3 @@ -annotations: - truecharts.org/SCALE-support: "true" - truecharts.org/catagories: | - - Tools-Utilities apiVersion: v2 appVersion: "latest" dependencies: @@ -9,7 +5,7 @@ dependencies: repository: https://library-charts.truecharts.org version: 11.0.7 deprecated: false -description: "Script to add new series and movies to Sonarr/Radarr based on Trakt lists." +description: Script to add new series and movies to Sonarr/Radarr based on Trakt lists. home: https://truecharts.org/docs/charts/incubator/traktarr icon: https://truecharts.org/img/hotlink-ok/chart-icons/traktarr.png keywords: @@ -26,4 +22,9 @@ sources: - https://github.com/l3uddz/traktarr - https://hub.docker.com/r/eafxx/traktarr type: application -version: 2.0.3 +version: 2.0.4 +annotations: + truecharts.org/catagories: | + - Tools-Utilities + truecharts.org/SCALE-support: "true" + truecharts.org/grade: U diff --git a/charts/incubator/traktarr/questions.yaml b/charts/incubator/traktarr/questions.yaml index d5dc27005da..e47f03c922e 100644 --- a/charts/incubator/traktarr/questions.yaml +++ b/charts/incubator/traktarr/questions.yaml @@ -6,69 +6,82 @@ questions: # Include{replicas} # Include{replica1} # Include{controllerExpertExtraArgs} - - variable: env - group: "App Configuration" - label: "Image Environment" + - variable: trakrarr + group: App Configuration + label: Traktarr Configuration schema: additional_attrs: true type: dict attrs: - - variable: DELAY - label: "DELAY" - description: "Container Variable DELAY (FLOAT) in secs - default 2.5" + - variable: delay + label: Delay + description: (FLOAT) Seconds between each add request to ARR services. schema: type: string - default: "" - - variable: SORT - label: "SORT" - description: "Container Variable SORT" + default: "2.5" + valid_charts: ^\d+\.\d+$ + - variable: sort + label: Sort + description: Votes or rating or release, sort list to process schema: type: string - default: "" - - variable: NOSEARCH - label: "NOSEARCH" - description: "Container Variable NOSEARCH, Disable search when adding to SonarrRadarr" + default: "rating" + enum: + - value: "rating" + description: "Rating" + - value: "votes" + description: "Votes" + - value: "release" + description: "Release" + - variable: nosearch + label: No Search + description: Disable search when adding to ARR services. + schema: + type: boolean + default: true + - variable: notifications + label: Notifications + description: Disable notifications + schema: + type: boolean + default: true + - variable: blackist + label: Black List + description: Enables/disables the blacklist when running app. + schema: + type: boolean + default: true + - variable: runnow + label: Run Now + description: Do a first run immediately without waiting. + schema: + type: boolean + default: false + - variable: skipupdate + label: Skip Update + description: Skip auto-update + schema: + type: boolean + default: true + - variable: app_branch + label: App Branch + description: GitHub branch. schema: type: string - default: "" - - variable: NOTIFICATIONS - label: "NOTIFICATIONS" - description: "Container Path NOTIFICATIONS" - schema: - type: string - default: "" - - variable: BLACKLIST - label: "BLACKLIST" - description: "Container Variable BLACKLIST" - schema: - type: string - default: "" - - variable: RUNNOW - label: "RUNNOW" - description: "Container Variable RUNNOW" - schema: - type: string - default: "" - - variable: SKIPUPDATE - label: "SKIPUPDATE" - description: "Container Variable SKIPUPDATE" - schema: - type: string - default: "" - - variable: APP_BRANCH - label: "APP_BRANCH" - description: "Container Variable APPBRANCH" - schema: - type: string - default: "" + default: 'master' + enum: + - value: "master" + description: "Master" + - value: "develop" + description: "Develop" # Include{serviceExpertRoot} default: false # Include{serviceExpert} # Include{serviceList} # Include{persistenceRoot} - variable: config - label: "config Storage" - description: "Container Path config" + label: App Config Storage + description: Stores the Application Config. schema: additional_attrs: true type: dict @@ -78,41 +91,41 @@ questions: # 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{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/traktarr/values.yaml b/charts/incubator/traktarr/values.yaml index e3dea015c1a..a2bdb77c944 100644 --- a/charts/incubator/traktarr/values.yaml +++ b/charts/incubator/traktarr/values.yaml @@ -1,23 +1,36 @@ -env: - APP_BRANCH: "" - BLACKLIST: "" - DELAY: "" - NOSEARCH: "" - NOTIFICATIONS: "" - RUNNOW: "" - SKIPUPDATE: "" - SORT: "" image: pullPolicy: IfNotPresent repository: tccr.io/truecharts/traktarr tag: latest@sha256:c3f2e4c967f7574d13b234c8cfa5d5bc25c007d891ecf8bf78e04f0654033785 -persistence: - config: - enabled: true - mountPath: /config + +traktarr: + app_branch: master + blacklist: true + nosearch: true + notifications: true + runnow: false + skipupdate: true + delay: "2.5" + sort: rating + +env: + APP_BRANCH: "{{ .Values.traktarr.app_branch }}" + BLACKLIST: '{{ ternary "yes" "no" .Values.traktarr.blacklist }}' + NOSEARCH: '{{ ternary "yes" "no" .Values.traktarr.nosearch }}' + NOTIFICATIONS: '{{ ternary "yes" "no" .Values.traktarr.notifications }}' + RUNNOW: '{{ ternary "yes" "no" .Values.traktarr.runnow }}' + SKIPUPDATE: '{{ ternary "yes" "no" .Values.traktarr.skipupdate }}' + DELAY: "{{ .Values.traktarr.delay }}" + SORT: "{{ .Values.traktarr.sort }}" + +securityContext: + readOnlyRootFilesystem: false + runAsNonRoot: false + podSecurityContext: runAsGroup: 0 runAsUser: 0 + probes: liveness: enabled: false @@ -25,9 +38,7 @@ probes: enabled: false startup: enabled: false -securityContext: - readOnlyRootFilesystem: false - runAsNonRoot: false + service: main: enabled: false @@ -35,5 +46,10 @@ service: main: enabled: false +persistence: + config: + enabled: true + mountPath: /config + portal: enabled: false