From 95daa1ebce236c6c93cc4921f9edcc8df752e036 Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Tue, 5 Sep 2023 16:58:50 -0400 Subject: [PATCH] refactor(picoshare) housekeeping + update description (#12197) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Housekeeping, update description and hide the lightstream options behind sub questions. ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ 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/stable/picoshare/Chart.yaml | 2 +- charts/stable/picoshare/questions.yaml | 68 ++++++++++++++++---------- charts/stable/picoshare/values.yaml | 20 +++++--- 3 files changed, 55 insertions(+), 35 deletions(-) diff --git a/charts/stable/picoshare/Chart.yaml b/charts/stable/picoshare/Chart.yaml index a0b7d26abe8..620a33cf63e 100644 --- a/charts/stable/picoshare/Chart.yaml +++ b/charts/stable/picoshare/Chart.yaml @@ -18,7 +18,7 @@ name: picoshare sources: - https://github.com/truecharts/charts/tree/master/charts/stable/picoshare - https://github.com/mtlynch/picoshare -version: 6.0.1 +version: 6.0.2 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/picoshare/questions.yaml b/charts/stable/picoshare/questions.yaml index 57d74ecc551..79d8eec1bcc 100644 --- a/charts/stable/picoshare/questions.yaml +++ b/charts/stable/picoshare/questions.yaml @@ -20,39 +20,53 @@ questions: type: dict attrs: - variable: PS_SHARED_SECRET - label: "PS_SHARED_SECRET" - description: "Secret Key for Web Console." + label: "Admin Web Password" + description: "Specifies a passphrase for the admin user to log in to PicoShare." schema: type: string required: true private: true default: "" - - variable: LITESTREAM_BUCKET - label: "LITESTREAM_BUCKET" - description: "If you specify settings for a Litestream-compatible cloud storage location, PicoShare will automatically replicate your data." + - variable: lightstream + label: Show Advanced LightStream Settings schema: - type: string - default: "" - - variable: LITESTREAM_ENDPOINT - label: "LITESTREAM_ENDPOINT" - description: "If you specify settings for a Litestream-compatible cloud storage location, PicoShare will automatically replicate your data." - schema: - type: string - default: "" - - variable: LITESTREAM_ACCESS_KEY_ID - label: "LITESTREAM_ACCESS_KEY_ID" - description: "If you specify settings for a Litestream-compatible cloud storage location, PicoShare will automatically replicate your data." - schema: - type: string - private: true - default: "" - - variable: LITESTREAM_SECRET_ACCESS_KEY - label: "LITESTREAM_SECRET_ACCESS_KEY" - description: "If you specify settings for a Litestream-compatible cloud storage location, PicoShare will automatically replicate your data." - schema: - type: string - private: true - default: "" + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: LITESTREAM_BUCKET + label: "LightStream Bucket" + description: "Compatible cloud storage bucket where Litestream should replicate data." + schema: + type: string + default: "" + - variable: LITESTREAM_ENDPOINT + label: "LightStream Endpoint" + description: "Compatible cloud storage endpoint where Litestream should replicate data." + schema: + type: string + default: "" + - variable: LITESTREAM_ACCESS_KEY_ID + label: "LightStream Access Key Id" + description: "Compatible cloud storage access key ID to the bucket where you want to replicate data." + schema: + type: string + private: true + default: "" + - variable: LITESTREAM_SECRET_ACCESS_KEY + label: "LightStream Secret Access Key" + description: "Compatible cloud storage secret access key to the bucket where you want to replicate data." + schema: + type: string + private: true + default: "" + - variable: LITESTREAM_RETENTION + label: "LightStream Retention" + description: "The amount of time Litestream snapshots & WAL files will be kept." + schema: + type: string + required: true + default: "72h" # Include{containerBasic} # Include{containerAdvanced} diff --git a/charts/stable/picoshare/values.yaml b/charts/stable/picoshare/values.yaml index b8c5d64a30f..c1cc360c6b2 100644 --- a/charts/stable/picoshare/values.yaml +++ b/charts/stable/picoshare/values.yaml @@ -2,18 +2,12 @@ image: repository: tccr.io/truecharts/picoshare tag: v1.3.8@sha256:b88b39d24ef5f6ed5f1055bb8d607e395a9eb037d2eaaeb1c0f9ca4165d4447b pullPolicy: IfNotPresent + service: main: ports: main: port: 10209 -persistence: - data: - enabled: true - mountPath: "/data" -portal: - open: - enabled: true workload: main: @@ -22,8 +16,20 @@ workload: main: env: PORT: "{{ .Values.service.main.ports.main.port }}" + # web admin password PS_SHARED_SECRET: "somesecretcode" + # optional LITESTREAM_BUCKET: "" LITESTREAM_ENDPOINT: "" LITESTREAM_ACCESS_KEY_ID: "" LITESTREAM_SECRET_ACCESS_KEY: "" + LITESTREAM_RETENTION: 72h + +persistence: + data: + enabled: true + mountPath: "/data" + +portal: + open: + enabled: true