From 0a612119b083cb27999ebb4686271b5ff634261e Mon Sep 17 00:00:00 2001 From: Xstar97 Date: Mon, 18 Jul 2022 17:05:16 -0400 Subject: [PATCH] fix(plex-meta-manager): Change upstream image, update env, add docs (#3206) * (feat) update plex-meta-manager * Update charts/incubator/plex-meta-manager/docs/installation_notes.md Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update values.yaml * Update charts/incubator/plex-meta-manager/values.yaml * add env PMM_CONFIG * fix doc formatting * removed yaml code from docs * added ci test-values.yaml * add initContainers for config file * change config.yml to config.yaml * Update charts/incubator/plex-meta-manager/values.yaml Co-authored-by: Kjeld Schouten-Lebbing * Update charts/incubator/plex-meta-manager/values.yaml Co-authored-by: Kjeld Schouten-Lebbing * Update charts/incubator/plex-meta-manager/values.yaml Co-authored-by: Kjeld Schouten-Lebbing * Update charts/incubator/plex-meta-manager/values.yaml Co-authored-by: Kjeld Schouten-Lebbing * update values.yaml * change initcontinaer image and adjust envs Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Kjeld Schouten-Lebbing Co-authored-by: Stavros kois --- charts/incubator/plex-meta-manager/Chart.yaml | 7 ++-- .../docs/installation_notes.md | 15 ++++++++ .../plex-meta-manager/questions.yaml | 37 +++++-------------- .../incubator/plex-meta-manager/values.yaml | 28 +++++++++++--- 4 files changed, 49 insertions(+), 38 deletions(-) create mode 100644 charts/incubator/plex-meta-manager/docs/installation_notes.md diff --git a/charts/incubator/plex-meta-manager/Chart.yaml b/charts/incubator/plex-meta-manager/Chart.yaml index 2c998a92ee1..b329eee36b7 100644 --- a/charts/incubator/plex-meta-manager/Chart.yaml +++ b/charts/incubator/plex-meta-manager/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 kubeVersion: ">=1.16.0-0" name: plex-meta-manager -version: 0.0.5 +version: 0.0.6 appVersion: "1.17.1" description: Python script to update metadata and automatically build collections. type: application @@ -11,8 +11,7 @@ icon: https://truecharts.org/img/chart-icons/plex-meta-manager.png keywords: - plex-meta-manager sources: - - https://hub.docker.com/r/linuxserver/plex-meta-manager - - https://github.com/linuxserver/docker-plex-meta-manager + - https://hub.docker.com/r/meisnate12/Plex-Meta-Manager - https://github.com/meisnate12/Plex-Meta-Manager dependencies: - name: common @@ -24,6 +23,6 @@ maintainers: url: https://truecharts.org annotations: truecharts.org/catagories: | - - incubator + - media truecharts.org/SCALE-support: "true" truecharts.org/grade: U diff --git a/charts/incubator/plex-meta-manager/docs/installation_notes.md b/charts/incubator/plex-meta-manager/docs/installation_notes.md new file mode 100644 index 00000000000..b9685d364d2 --- /dev/null +++ b/charts/incubator/plex-meta-manager/docs/installation_notes.md @@ -0,0 +1,15 @@ +# Installation Notes + +## Setup ENV variables + +- Set `PMM_RUN` as **true** to run immediately, bypassing `PMM_TIME` + +However disabling `PMM_RUN` will show the options to set a time for `PMM_TIME` with a comma-separated +list in HH:MM format(ex: **06:00,18:00**) and `PMM_NO_COUNTDOWN` set to **true** to run without displaying a +countdown to the next scheduled run + +Additional env are available [here](https://metamanager.wiki/en/latest/home/environmental.html#run-commands-environment-variables) + +## Configuration file setup + +An example [config.yml](https://metamanager.wiki/en/latest/config/configuration.html#configuration-file-walkthrough): diff --git a/charts/incubator/plex-meta-manager/questions.yaml b/charts/incubator/plex-meta-manager/questions.yaml index 64898b9b428..69eb9a14575 100644 --- a/charts/incubator/plex-meta-manager/questions.yaml +++ b/charts/incubator/plex-meta-manager/questions.yaml @@ -2,7 +2,6 @@ portals: {} questions: # Include{global} - - variable: controller group: "Controller" label: "" @@ -60,44 +59,26 @@ questions: additional_attrs: true type: dict attrs: - - variable: PMM_CONFIG - label: "PMM CONFIG" - description: "Specify a internal config.yaml" - schema: - type: string - default: "/config/config.yaml" - variable: PMM_RUN label: "PMM RUN" - description: "Set to false to run with a scheduler." + description: "Perform a run immediately, bypassing the time to run flag." schema: type: boolean default: true - - variable: customtime - label: "Set PMM Time" - schema: - show_if: [["PMM_RUN", "=", false]] - type: boolean - default: false - show_subquestions_if: true + show_subquestions_if: false subquestions: - variable: PMM_TIME label: "PMM TIME" - description: "Comma-separated list of times to update each day. Format: HH:MM" + description: "Specify the time of day that Plex Meta Manager will run. Format: HH:MM" schema: type: string default: "" - - variable: PMM_TEST - label: "PMM TEST" - description: "Set to True to run in debug mode with only collections that have test: true" - schema: - type: boolean - default: false - - variable: PMM_NO_MISSING - label: "PMM NO MISSING" - description: "Set to True to run without any of the missing movie/show functions." - schema: - type: boolean - default: false + - variable: PMM_NO_COUNTDOWN + label: "PMM NO COUNTDOWN" + description: "Run without displaying a countdown to the next scheduled run." + schema: + type: boolean + default: true # Include{containerConfig} - variable: service diff --git a/charts/incubator/plex-meta-manager/values.yaml b/charts/incubator/plex-meta-manager/values.yaml index da7e17399a2..89a45ce85b6 100644 --- a/charts/incubator/plex-meta-manager/values.yaml +++ b/charts/incubator/plex-meta-manager/values.yaml @@ -1,7 +1,7 @@ image: - repository: linuxserver/plex-meta-manager + repository: tccr.io/truecharts/plex-meta-manager pullPolicy: IfNotPresent - tag: v1.17.1@sha256:af30bf9e2a48a2d359e097854becde159befc6e4dfd33b6b1d1c529fed565537 + tag: v1.17.1@sha256:138b60cdde3cd08ae25a78c44d8a03da715538d76dc137318dc3fdde19ba4bcd securityContext: readOnlyRootFilesystem: false @@ -12,11 +12,10 @@ podSecurityContext: runAsGroup: 0 env: - PMM_CONFIG: "/config/config.yaml" - PMM_TIME: "03:00" + PMM_CONFIG: "/config/config.yml" + # PMM_TIME: "" PMM_RUN: true - PMM_TEST: false - PMM_NO_MISSING: false + PMM_NO_COUNTDOWN: true service: main: @@ -38,3 +37,20 @@ persistence: config: enabled: true mountPath: "/config" + +initContainers: + 1-create-init-config-file: + image: "{{ .Values.alpineImage.repository }}:{{ .Values.alpineImage.tag }}" + volumeMounts: + - name: config + mountPath: "/config" + command: ["/bin/sh", "-c"] + args: + - |- + echo "Creating config.yml file..." + if [ -f /config/config.yml ]; then + echo "Config file exists!, Skipping..." + else + echo "Config file is missing, getting a new one!" + curl -fLvo /config/config.yml https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager/master/config/config.yml.template || ( echo "Downloading config file, FAILED..." && exit 1 ) + fi