From a7f859bd4fc71b8884848b2fc8d6593de297b2cc Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Tue, 29 Aug 2023 13:07:21 -0400 Subject: [PATCH] migrate(scrypted) migrate scrypted to new common **BREAKING CHANGES** (#11897) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Migrate scrypted to new common and update to the latest version. ⚒️ Fixes # **⚙️ 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?** **📃 Notes:** **✔️ 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._ --- charts/incubator/scrypted/Chart.yaml | 6 +- charts/incubator/scrypted/questions.yaml | 106 +++++++++--------- charts/incubator/scrypted/templates/NOTES.txt | 1 + .../incubator/scrypted/templates/common.yaml | 2 +- charts/incubator/scrypted/values.yaml | 42 +++---- 5 files changed, 80 insertions(+), 77 deletions(-) create mode 100644 charts/incubator/scrypted/templates/NOTES.txt diff --git a/charts/incubator/scrypted/Chart.yaml b/charts/incubator/scrypted/Chart.yaml index 9d16eedbf2d..4c7908b90ed 100644 --- a/charts/incubator/scrypted/Chart.yaml +++ b/charts/incubator/scrypted/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v2 -appVersion: "0.6.24" +appVersion: "0.44.0" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 + version: 14.0.1 deprecated: false description: Scrypted is a high performance home video integration and automation platform. home: https://truecharts.org/charts/incubator/scrypted @@ -21,7 +21,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/scrypted - https://github.com/koush/scrypted type: application -version: 0.0.6 +version: 1.0.0 annotations: truecharts.org/catagories: | - media diff --git a/charts/incubator/scrypted/questions.yaml b/charts/incubator/scrypted/questions.yaml index 07ba0262ba1..1995fa5744d 100644 --- a/charts/incubator/scrypted/questions.yaml +++ b/charts/incubator/scrypted/questions.yaml @@ -4,48 +4,49 @@ portals: # Include{portalLink} questions: # Include{global} - - variable: imageSelector - group: Container Image - label: Select Image - schema: - type: string - default: image - enum: - - value: image - description: Thin - - value: liteImage - description: Lite - - value: fullImage - description: Full # Include{workload} # Include{workloadDeployment} # Include{replicas1} # Include{podSpec} # Include{containerMain} + + - variable: imageSelector + label: Select Image + schema: + type: string + default: image + enum: + - value: image + description: Thin + - value: liteImage + description: Lite + - value: fullImage + description: Full + + - variable: env + label: Image Environment + schema: + additional_attrs: true + type: dict + attrs: + - variable: SCRYPTED_WEBHOOK_UPDATE_AUTHORIZATION + label: Scrypted WebHook Update Authorization + schema: + type: string + required: true + default: "Bearer MAKE_ME_SECURE" + - variable: SCRYPTED_WEBHOOK_UPDATE + label: Scrypted WebHook Update + schema: + type: string + required: true + default: "http://localhost:10611/v1/update" + # Include{containerBasic} # Include{containerAdvanced} - - - variable: env - group: App Configuration - label: Image Environment - schema: - additional_attrs: true - type: dict - attrs: - - variable: SCRYPTED_WEBHOOK_UPDATE_AUTHORIZATION - label: Scrypted WebHook Update Authorization - schema: - type: string - required: true - default: Bearer MAKE_ME_SECURE - - variable: SCRYPTED_WEBHOOK_UPDATE - label: Scrypted WebHook Update - schema: - type: string - required: true - default: http://localhost:10611/v1/update # Include{containerConfig} +# Include{podOptions} # Include{serviceRoot} - variable: main label: Main Service @@ -102,29 +103,28 @@ questions: # Include{ingressTraefik} # Include{ingressAdvanced} # Include{ingressList} - -# 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 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} diff --git a/charts/incubator/scrypted/templates/NOTES.txt b/charts/incubator/scrypted/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/scrypted/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/scrypted/templates/common.yaml b/charts/incubator/scrypted/templates/common.yaml index c1a366e1cf0..b51394e00a4 100644 --- a/charts/incubator/scrypted/templates/common.yaml +++ b/charts/incubator/scrypted/templates/common.yaml @@ -1 +1 @@ -{{ include "tc.common.loader.all" . }} +{{ include "tc.v1.common.loader.all" . }} diff --git a/charts/incubator/scrypted/values.yaml b/charts/incubator/scrypted/values.yaml index f9792e08778..4e748df0466 100644 --- a/charts/incubator/scrypted/values.yaml +++ b/charts/incubator/scrypted/values.yaml @@ -1,40 +1,41 @@ image: repository: tccr.io/truecharts/scrypted-thin pullPolicy: IfNotPresent - tag: 0.6.24@sha256:aafc5380264e78f96f7fad7e47ff7df26e42dcc1d4c0977a790246be9659ca92 - + tag: v0.44.0@sha256:c69c15c1249b19346531ec85f2e6fcd0d8c7a444381bc249f00c06e0541ac366 liteImage: repository: tccr.io/truecharts/scrypted-lite - tag: 0.6.24@sha256:b2fb6d7de6ed4ad5c7bb0aaa460e6fbcfdda2f2c2dae4aecf323f37332d9b6cf + tag: v0.44.0@sha256:c81fd27344ad17c3d91d2a650c803ba12c99278a6e1fda6928d6a9aeb452b4c1 pullPolicy: Always - fullImage: repository: tccr.io/truecharts/scrypted-full - tag: 0.6.24@sha256:b557c86f7668df545988eadbca8d5d31ed793fb0e3872558bd05f00588260c2f + tag: v0.44.0@sha256:f696f03034da40244a77d17e46c9cc61f7be3e8f9451244a3758ba896b0c3d0d pullPolicy: Always -imageSelector: image - securityContext: - readOnlyRootFilesystem: false - runAsNonRoot: false - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -env: - SCRYPTED_INSECURE_PORT: "{{ .Values.service.main.ports.main.port }}" - # SCRYPTED_WEBHOOK_UPDATE_AUTHORIZATION: Bearer SET_THIS_TO_SOME_RANDOM_TEXT - # SCRYPTED_WEBHOOK_UPDATE: http://localhost:10444/v1/update + container: + runAsNonRoot: false + readOnlyRootFilesystem: false + runAsUser: 0 + runAsGroup: 0 service: main: ports: main: - protocol: HTTP + protocol: http port: 10611 +workload: + main: + podSpec: + containers: + main: + imageSelector: image + env: + SCRYPTED_INSECURE_PORT: "{{ .Values.service.main.ports.main.port }}" + # SCRYPTED_WEBHOOK_UPDATE_AUTHORIZATION: Bearer SET_THIS_TO_SOME_RANDOM_TEXT + # SCRYPTED_WEBHOOK_UPDATE: http://localhost:10444/v1/update + persistence: server: enabled: true @@ -44,4 +45,5 @@ persistence: mountPath: /media/external portal: - enabled: true + open: + enabled: true