diff --git a/charts/incubator/plex-meta-manager/Chart.yaml b/charts/incubator/plex-meta-manager/Chart.yaml index 2d028b2938a..71f861c3721 100644 --- a/charts/incubator/plex-meta-manager/Chart.yaml +++ b/charts/incubator/plex-meta-manager/Chart.yaml @@ -1,27 +1,27 @@ apiVersion: v2 -kubeVersion: ">=1.16.0-0" -name: plex-meta-manager -version: 2.0.8 appVersion: "1.18.1" -description: Python script to update metadata and automatically build collections. -type: application -deprecated: false -home: https://truecharts.org/charts/incubator/plex-meta-manager -icon: https://truecharts.org/img/hotlink-ok/chart-icons/plex-meta-manager.png -keywords: - - plex-meta-manager -sources: - - https://github.com/truecharts/charts/tree/master/charts/incubator/plex-meta-manager - - https://hub.docker.com/r/meisnate12/plex-meta-manager - - https://github.com/meisnate12/Plex-Meta-Manager dependencies: - name: common repository: https://library-charts.truecharts.org version: 11.1.2 +deprecated: false +description: Python script to update metadata and automatically build collections. +home: https://truecharts.org/charts/incubator/plex-meta-manager +icon: https://truecharts.org/img/hotlink-ok/chart-icons/plex-meta-manager.png +keywords: + - plex-meta-manager +kubeVersion: ">=1.16.0-0" maintainers: - email: info@truecharts.org name: TrueCharts url: https://truecharts.org +name: plex-meta-manager +sources: + - https://github.com/truecharts/charts/tree/master/charts/incubator/plex-meta-manager + - https://hub.docker.com/r/meisnate12/plex-meta-manager + - https://github.com/meisnate12/Plex-Meta-Manager +type: application +version: 2.0.9 annotations: truecharts.org/catagories: | - media diff --git a/charts/incubator/plex-meta-manager/questions.yaml b/charts/incubator/plex-meta-manager/questions.yaml index bf99b2b4376..15a34bc8e2a 100644 --- a/charts/incubator/plex-meta-manager/questions.yaml +++ b/charts/incubator/plex-meta-manager/questions.yaml @@ -6,30 +6,50 @@ questions: # Include{replicas} # Include{replica1} # Include{controllerExpertExtraArgs} - - variable: env - group: "App Configuration" - label: "Image Environment" + - variable: pmm + group: App Configuration + label: PMM Configuration schema: additional_attrs: true type: dict attrs: - - variable: PMM_RUN - label: "PMM RUN" - description: "Perform a run immediately, bypassing the time to run flag." + - variable: plex_url + label: Plex Url + schema: + type: string + required: true + default: "" + - variable: plex_token + label: Plex Token + schema: + type: string + required: true + private: true + default: "" + - variable: run + label: PMM Run + description: Perform a run immediately, bypassing the time to run flag. schema: type: boolean - default: true + default: false show_subquestions_if: false subquestions: - - variable: PMM_TIME - label: "PMM TIME" + - variable: times + label: PMM Time description: "Specify the time of day that Plex Meta Manager will run. Format: HH:MM" schema: - type: string - default: "" - - variable: PMM_NO_COUNTDOWN - label: "PMM NO COUNTDOWN" - description: "Run without displaying a countdown to the next scheduled run." + type: list + default: ["00:00"] + items: + - variable: timeEntry + label: Time Entry + schema: + type: string + required: true + default: "" + - variable: no_countdown + label: PMM No Countdown + description: Run without displaying a countdown to the next scheduled run. schema: type: boolean default: true @@ -40,8 +60,8 @@ questions: # Include{serviceList} # Include{persistenceRoot} - variable: config - label: "App Config Storage" - description: "Stores the Application Configuration." + label: App Config Storage + description: Stores the Application Configuration. schema: additional_attrs: true type: dict @@ -51,41 +71,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/plex-meta-manager/templates/_secret.tpl b/charts/incubator/plex-meta-manager/templates/_secret.tpl new file mode 100644 index 00000000000..28532352fed --- /dev/null +++ b/charts/incubator/plex-meta-manager/templates/_secret.tpl @@ -0,0 +1,24 @@ +{{/* Define the secret */}} +{{- define "pmm.secret" -}} + +{{- $secretName := printf "%s-secret" (include "tc.common.names.fullname" .) }} +{{- $pmm := .Values.pmm -}} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ $secretName }} + labels: + {{- include "tc.common.labels" . | nindent 4 }} +stringData: + {{/* PMM */}} + PMM_CONFIG: "/config/config.yml" + {{- if not $pmm.run }} + PMM_TIME: {{ join "," $pmm.times | quote }} + PMM_NO_COUNTDOWN: {{ $pmm.no_countdown | quote }} + {{- end }} + PMM_RUN: {{ $pmm.run | quote }} + {{/* plex */}} + PMM_PLEX_URL: {{ . | quote }} + PMM_PLEX_TOKEN: {{ . | quote }} +{{- end -}} diff --git a/charts/incubator/plex-meta-manager/templates/common.yaml b/charts/incubator/plex-meta-manager/templates/common.yaml index c1a366e1cf0..57657f9107d 100644 --- a/charts/incubator/plex-meta-manager/templates/common.yaml +++ b/charts/incubator/plex-meta-manager/templates/common.yaml @@ -1 +1,8 @@ -{{ include "tc.common.loader.all" . }} +{{/* Make sure all variables are set properly */}} +{{- include "tc.common.loader.init" . }} + +{{/* Render secret */}} +{{- include "pmm.secret" . }} + +{{/* Render the templates */}} +{{ include "tc.common.loader.apply" . }} diff --git a/charts/incubator/plex-meta-manager/values.yaml b/charts/incubator/plex-meta-manager/values.yaml index fe2085d8f2e..61b5ca5c741 100644 --- a/charts/incubator/plex-meta-manager/values.yaml +++ b/charts/incubator/plex-meta-manager/values.yaml @@ -11,11 +11,17 @@ podSecurityContext: runAsUser: 0 runAsGroup: 0 -env: - PMM_CONFIG: "/config/config.yml" - # PMM_TIME: "" - PMM_RUN: true - PMM_NO_COUNTDOWN: true +pmm: + run: false + no_countdown: true + time: + - "00:00" + # plex_url: "" + # plex_token: "" + +envFrom: + - secretRef: + name: '{{ include "tc.common.names.fullname" . }}-secret' service: main: