From 2ebda1df964a5c110013853a44fa95804d04b4c0 Mon Sep 17 00:00:00 2001 From: Solen <35483234+s0len@users.noreply.github.com> Date: Tue, 30 Apr 2024 20:16:52 +0200 Subject: [PATCH] fix(kometa) converted pmm to kometa and added into incubator (#21444) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** PMM has rebranded to Kometa so I've renamed pmm to kometa and fixed the images and links to align with Kometa instead. ⚒️ Fixes # **⚙️ Type of change** - [x] ⚙️ Feature/App addition **🧪 How Has This Been Tested?** I haven't tested anything as I don't really know how to so please advice me how. **📃 Notes:** The one thing I was unsure about is the tag: inside values.yaml where it was set to a specific version and then a SHA number. I didn't know where to find this so I set the tag to latest which is the tag i would use if i deployed this app myself through custom-app or docker image. **✔️ Checklist:** - [x] ⚖️ My code follows the style guidelines of this project - [x] 👀 I have performed a self-review of my own code - [x] #️⃣ I have commented my code, particularly in hard-to-understand areas - [x] 📄 I have made corresponding changes to the documentation - [x] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [x] ⬆️ I increased versions for any altered app according to semantic versioning - [x] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):` or `chore(chart-name):` **➕ App addition** If this PR is an app addition please make sure you have done the following. - [x] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- charts/incubator/kometa/.helmignore | 30 +++++ charts/incubator/kometa/CHANGELOG.md | 10 ++ charts/incubator/kometa/Chart.yaml | 36 ++++++ charts/incubator/kometa/README.md | 54 +++++++++ .../kometa/docs/installation_notes.md | 17 +++ charts/incubator/kometa/icon-small.webp | Bin 0 -> 1056 bytes charts/incubator/kometa/icon.webp | Bin 0 -> 2842 bytes charts/incubator/kometa/questions.yaml | 103 ++++++++++++++++++ charts/incubator/kometa/templates/NOTES.txt | 1 + charts/incubator/kometa/templates/_secret.tpl | 17 +++ charts/incubator/kometa/templates/common.yaml | 11 ++ charts/incubator/kometa/values.yaml | 69 ++++++++++++ 12 files changed, 348 insertions(+) create mode 100644 charts/incubator/kometa/.helmignore create mode 100644 charts/incubator/kometa/CHANGELOG.md create mode 100644 charts/incubator/kometa/Chart.yaml create mode 100644 charts/incubator/kometa/README.md create mode 100644 charts/incubator/kometa/docs/installation_notes.md create mode 100644 charts/incubator/kometa/icon-small.webp create mode 100644 charts/incubator/kometa/icon.webp create mode 100644 charts/incubator/kometa/questions.yaml create mode 100644 charts/incubator/kometa/templates/NOTES.txt create mode 100644 charts/incubator/kometa/templates/_secret.tpl create mode 100644 charts/incubator/kometa/templates/common.yaml create mode 100644 charts/incubator/kometa/values.yaml diff --git a/charts/incubator/kometa/.helmignore b/charts/incubator/kometa/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/kometa/.helmignore @@ -0,0 +1,30 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS +# helm-docs templates +*.gotmpl +# docs folder +/docs +# icon +icon.png diff --git a/charts/incubator/kometa/CHANGELOG.md b/charts/incubator/kometa/CHANGELOG.md new file mode 100644 index 00000000000..36bd7afb1a5 --- /dev/null +++ b/charts/incubator/kometa/CHANGELOG.md @@ -0,0 +1,10 @@ +--- +title: Changelog +--- + +## [kometa-0.0.1](https://github.com/truecharts/charts/compare/kometa-0.0.1) (2024-04-29) + +### Fix + +- New chart for Kometa based off of Plex Meta Manager as it was called before. +- Changed all references of PMM to KOMETA diff --git a/charts/incubator/kometa/Chart.yaml b/charts/incubator/kometa/Chart.yaml new file mode 100644 index 00000000000..1ab452adc96 --- /dev/null +++ b/charts/incubator/kometa/Chart.yaml @@ -0,0 +1,36 @@ +annotations: + max_scale_version: 24.04.1 + min_scale_version: 24.04.0 + truecharts.org/SCALE-support: "true" + truecharts.org/category: media + truecharts.org/max_helm_version: "3.14" + truecharts.org/min_helm_version: "3.11" + truecharts.org/train: incubator +apiVersion: v2 +appVersion: 2.0.0 +dependencies: + - name: common + version: 22.0.0 + repository: oci://tccr.io/truecharts + condition: "" + alias: "" + tags: [] + import-values: [] +deprecated: false +description: Python script to update metadata and automatically build collections. +home: https://truecharts.org/charts/incubator/kometa +icon: https://github.com/truecharts/charts/tree/master/charts/incubator/kometa/icon.webp +keywords: + - kometa +kubeVersion: ">=1.24.0-0" +maintainers: + - name: TrueCharts + email: info@truecharts.org + url: https://truecharts.org +name: kometa +sources: + - https://github.com/kometa-team/kometa + - https://github.com/truecharts/charts/tree/master/charts/incubator/kometa + - https://hub.docker.com/r/kometateam/kometa +type: application +version: 2.0.0 diff --git a/charts/incubator/kometa/README.md b/charts/incubator/kometa/README.md new file mode 100644 index 00000000000..16e941597f7 --- /dev/null +++ b/charts/incubator/kometa/README.md @@ -0,0 +1,54 @@ +--- +title: README +--- + +## General Info + +TrueCharts can be installed as both _normal_ Helm Charts or as TrueNAS SCALE Apps. +Both solutions are fully supported, but we heavily advice the use of normal Helm Charts where possible + +For more information about this Chart, please check the docs on the TrueCharts [website](https://truecharts.org/charts/stable/plex-meta-manager) + +**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/charts/issues/new/choose)** + +## Installation + +### Helm-Chart installation + +To install TrueCharts Helm charts using Helm, you can use our OCI Repository. + +`helm install mychart oci://tccr.io/truecharts/CHARTNAME` + +For more information on how to install TrueCharts Helm charts, checkout the instructions on the website: https://truecharts.org/helm/ + +### TrueNAS SCALE Apps + +For more information on how to use TrueCharts as TrueNAS SCALE Apps, please checkout the [quick-start guides for TrueNAS SCALE](https://truecharts.org/scale/guides/scale-intro). + +## Configuration Options + +To view the chart specific options, please view Values.yaml included in the chart. + +All our Charts use a shared "common" library chart that contains most of the templating and options. +For the complete overview of all available options, please checkout the documentation for them on the website: https://truecharts.org/common/ + +## Chart Specific Guides and information + +All our charts have dedicated documentation pages. +The documentation for this chart can be found here: +https://truecharts.org/charts/incubator/kometa + +## Support + +- See the [Website](https://truecharts.org) +- Check our [Discord](https://discord.gg/tVsPTHWTtr) +- Open a [issue](https://github.com/truecharts/charts/issues/new/choose) + +--- + +## Sponsor TrueCharts + +TrueCharts can only exist due to the incredible effort of our staff. +Please consider making a [donation](https://truecharts.org/general/sponsor) or contributing back to the project any way you can! + +_All Rights Reserved - The TrueCharts Project_ diff --git a/charts/incubator/kometa/docs/installation_notes.md b/charts/incubator/kometa/docs/installation_notes.md new file mode 100644 index 00000000000..87e17668559 --- /dev/null +++ b/charts/incubator/kometa/docs/installation_notes.md @@ -0,0 +1,17 @@ +--- +title: Installation Notes +--- + +## Setup ENV variables + +- Set `KOMETA_RUN` as **true** to run immediately, bypassing `KOMETA_TIMES` + +However disabling `KOMETA_RUN` will show the options to set a time for `KOMETA_TIMES` with a comma-separated +list in HH:MM format(ex: **06:00,18:00**) and `KOMETA_NO_COUNTDOWN` set to **true** to run without displaying a +countdown to the next scheduled run + +Additional env are available [here](https://kometa.wiki/en/latest/kometa/environmental/) + +## Configuration file setup + +An example [config.yml](https://kometa.wiki/en/latest/config/overview/): diff --git a/charts/incubator/kometa/icon-small.webp b/charts/incubator/kometa/icon-small.webp new file mode 100644 index 0000000000000000000000000000000000000000..2c12ad822cd824f1e5a591879b04db5018682282 GIT binary patch literal 1056 zcmV+*1mF8oNk&E(1ONb6MM6+kP&il$0000G0000V0018V06|PpNcI2#00EGrZQHR& zcWj%LxdYoQoi1g1Zy}Y&Go8yR?U^p!sItxADn2~#zk`UF07dqkBK$ZyLhLEBAor_M zDNMRUS_0%c1N0k6bu|VX0Q+*eByABWm*wb?z^kfBH&w$=f}1#yH4Uq*QCOEvm}SKr zZ^8Ut#v_}I`@q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Y zOF80%8ezMwVYl#pi)js=k3aN1Xa4 z{%ZH!$_e3OHL><@`U6V^+&abSlbUM7UfJF&U_K;Nju$2f s&(14F1B6`zfE5EyZ{17-_n0_#c^!I|d3L+{mqRY_5c6?08~V+yZ`_I literal 0 HcmV?d00001 diff --git a/charts/incubator/kometa/questions.yaml b/charts/incubator/kometa/questions.yaml new file mode 100644 index 00000000000..b00906eac89 --- /dev/null +++ b/charts/incubator/kometa/questions.yaml @@ -0,0 +1,103 @@ +# Include{groups} +portals: {} +questions: +# Include{global} +# Include{credentials} +# Include{workload} +# Include{workloadDeployment} +# Include{replicas1} +# Include{podSpec} +# Include{containerMain} +# Include{containerBasic} +# Include{containerAdvanced} +# Include{containerConfig} +# Include{podOptions} + - variable: kometa + group: App Configuration + label: Kometa Configuration + schema: + additional_attrs: true + type: dict + attrs: + - 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: Kometa Run + description: Perform a run immediately, bypassing the time to run flag. + schema: + type: boolean + default: false + show_subquestions_if: false + subquestions: + - variable: times + label: Kometa Times + description: "Specify the time of day that Plex Meta Manager will run. Format: HH:MM" + schema: + type: list + default: ["00:00"] + items: + - variable: timeEntry + label: Time Entry + schema: + type: string + required: true + default: "" + - variable: no_countdown + label: Kometa No Countdown + description: Run without displaying a countdown to the next scheduled run. + schema: + type: boolean + default: true +# Include{externalInterfaces} + +# Include{serviceList} +# Include{persistenceRoot} + - variable: config + label: App Config Storage + description: Stores the Application Configuration. + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} +# Include{persistenceList} +# Include{securityContextRoot} + - 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 +# Include{resources} +# Include{advanced} +# Include{addons} +# Include{codeserver} +# Include{netshoot} +# Include{vpn} +# Include{documentation} diff --git a/charts/incubator/kometa/templates/NOTES.txt b/charts/incubator/kometa/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/kometa/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/kometa/templates/_secret.tpl b/charts/incubator/kometa/templates/_secret.tpl new file mode 100644 index 00000000000..928e95f7105 --- /dev/null +++ b/charts/incubator/kometa/templates/_secret.tpl @@ -0,0 +1,17 @@ +{{/* Define the secret */}} +{{- define "kometa.secret" -}} + +{{- $kometa := .Values.kometa }} +enabled: true +data: + {{/* KOMETA */}} + KOMETA_CONFIG: "/config/config.yml" + {{- if not $kometa.run }} + KOMETA_TIMES: {{ join "," $kometa.times | quote }} + KOMETA_NO_COUNTDOWN: {{ $kometa.no_countdown | quote }} + {{- end }} + KOMETA_RUN: {{ $kometa.run | quote }} + {{/* plex */}} + KOMETA_PLEX_URL: {{ $kometa.plex_url | quote }} + KOMETA_PLEX_TOKEN: {{ $kometa.plex_token | quote }} +{{- end -}} diff --git a/charts/incubator/kometa/templates/common.yaml b/charts/incubator/kometa/templates/common.yaml new file mode 100644 index 00000000000..3bdc3b3a54c --- /dev/null +++ b/charts/incubator/kometa/templates/common.yaml @@ -0,0 +1,11 @@ +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . }} + +{{/* Render secret for kometa */}} +{{- $secret := include "kometa.secret" . | fromYaml -}} +{{- if $secret -}} + {{- $_ := set .Values.secret "secret" $secret -}} +{{- end -}} + +{{/* Render the templates */}} +{{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/incubator/kometa/values.yaml b/charts/incubator/kometa/values.yaml new file mode 100644 index 00000000000..01ab617158b --- /dev/null +++ b/charts/incubator/kometa/values.yaml @@ -0,0 +1,69 @@ +image: + repository: kometateam/kometa + tag: v2.0.0 + pullPolicy: IfNotPresent + +securityContext: + container: + runAsNonRoot: false + readOnlyRootFilesystem: false + runAsUser: 0 + runAsGroup: 0 + +service: + main: + enabled: false + ports: + main: + enabled: false + +kometa: + run: false + no_countdown: true + time: + - "00:00" + # plex_url: "" + # plex_token: "" + +workload: + main: + podSpec: + initContainers: + create-init-config-file: + enabled: true + type: init + imageSelector: "image" + 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/kometa-team/kometa/master/config/config.yml.template || (echo "Downloading config file, FAILED..." && exit 1) + fi + containers: + main: + probes: + liveness: + enabled: false + readiness: + enabled: false + startup: + enabled: false + envFrom: + - secretRef: + name: "secret" + +persistence: + config: + enabled: true + mountPath: /config + targetSelectAll: true + +portal: + open: + enabled: false