migrate(plex-meta-manager) migrate plex-meta-manager to new common (#10088)

**Description**
migrate app to new common and update version

⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [X] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [X] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
initContainers, cant say if this is done correctly.

**✔️ Checklist:**

- [X] ⚖️ My code follows the style guidelines of this project
- [X] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ 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

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ 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._

---------

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
Xstar97TheNoob 2023-07-03 16:18:40 -04:00 committed by GitHub
parent 93bf3a565e
commit 0f9aa42a0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 81 additions and 77 deletions

View File

@ -1,9 +1,9 @@
apiVersion: v2
appVersion: "1.18.3"
appVersion: "1.19.0"
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 11.1.2
version: 12.14.6
deprecated: false
description: Python script to update metadata and automatically build collections.
home: https://truecharts.org/charts/incubator/plex-meta-manager
@ -20,7 +20,7 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/plex-meta-manager
- https://github.com/meisnate12/Plex-Meta-Manager
type: application
version: 2.0.14
version: 3.0.0
annotations:
truecharts.org/catagories: |
- media

View File

@ -58,7 +58,9 @@ questions:
schema:
type: boolean
default: true
# Include{containerConfig}
# Include{podOptions}
# Include{serviceExpertRoot}
# Include{serviceExpert}
# Include{serviceList}
@ -73,28 +75,28 @@ questions:
# Include{persistenceBasic}
# Include{persistenceList}
# 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
# 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
- variable: fsGroup
label: "fsGroup"
description: "The group that should own ALL storage."
schema:
type: int
default: 568
# Include{resources}
# Include{advanced}

View File

@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}

View File

@ -1,16 +1,9 @@
{{/* 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 := .Values.pmm }}
enabled: true
data:
{{/* PMM */}}
PMM_CONFIG: "/config/config.yml"
{{- if not $pmm.run }}

View File

@ -1,8 +1,11 @@
{{/* Make sure all variables are set properly */}}
{{- include "tc.common.loader.init" . }}
{{- include "tc.v1.common.loader.init" . }}
{{/* Render secret */}}
{{- include "pmm.secret" . }}
{{/* Render secret for pmm */}}
{{- $secret := include "pmm.secret" . | fromYaml -}}
{{- if $secret -}}
{{- $_ := set .Values.secret "secret" $secret -}}
{{- end -}}
{{/* Render the templates */}}
{{ include "tc.common.loader.apply" . }}
{{ include "tc.v1.common.loader.apply" . }}

View File

@ -1,15 +1,21 @@
image:
repository: tccr.io/truecharts/plex-meta-manager
pullPolicy: IfNotPresent
tag: 1.18.3@sha256:d8adb30906dbeffae964364bb7b98372b06283c8e9ab3e7624eab2265478e8fc
tag: v1.19.0@sha256:302c3b396f4af2cb789cb36aa7540bc501a7d4aeb108090f7b6aff8e85680110
securityContext:
readOnlyRootFilesystem: false
runAsNonRoot: false
container:
runAsNonRoot: false
readOnlyRootFilesystem: false
runAsUser: 0
runAsGroup: 0
podSecurityContext:
runAsUser: 0
runAsGroup: 0
service:
main:
enabled: false
ports:
main:
enabled: false
pmm:
run: false
@ -19,46 +25,45 @@ pmm:
# plex_url: ""
# plex_token: ""
envFrom:
- secretRef:
name: '{{ include "tc.common.names.fullname" . }}-secret'
service:
workload:
main:
enabled: false
ports:
main:
enabled: false
probes:
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false
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/meisnate12/Plex-Meta-Manager/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
initContainers:
1-create-init-config-file:
image: "{{ .Values.ubuntuImage.repository }}:{{ .Values.ubuntuImage.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
targetSelectAll: true
portal:
enabled: false
open:
enabled: false