From 46788c28f5079ed0494a22e1f2aa405177c2e1aa Mon Sep 17 00:00:00 2001 From: StevenMcElligott <89483932+StevenMcElligott@users.noreply.github.com> Date: Sun, 16 Jul 2023 11:38:13 -0400 Subject: [PATCH] fix(Seafile): Misc improvements (#10504) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Persisting to the `storage` directory, even if Seafile doesn't show visible files at least we can seperate this in case people store large Seafile files on another file. Added some privilege escalation in case people want to attempt to run FUSE Cannot run as `apps` due to init scripts not running ⚒️ Fixes # **⚙️ Type of change** - [X] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [X] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 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 - [ ] ⬆️ 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/seafile/Chart.yaml | 6 +++++- charts/incubator/seafile/questions.yaml | 12 ++++++++++-- charts/incubator/seafile/values.yaml | 13 +++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/charts/incubator/seafile/Chart.yaml b/charts/incubator/seafile/Chart.yaml index ecb493281bd..399068de44f 100644 --- a/charts/incubator/seafile/Chart.yaml +++ b/charts/incubator/seafile/Chart.yaml @@ -8,6 +8,10 @@ dependencies: name: mariadb repository: https://deps.truecharts.org/ version: 7.0.50 + - condition: memcached.enabled + name: memcached + repository: https://deps.truecharts.org/ + version: 6.0.69 deprecated: false description: Reliable and Performant File Sync and Share Solution home: https://truecharts.org/charts/incubator/seafile @@ -26,7 +30,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/seafile - https://seafile.com type: application -version: 0.0.1 +version: 0.0.2 annotations: truecharts.org/catagories: | - file-storage diff --git a/charts/incubator/seafile/questions.yaml b/charts/incubator/seafile/questions.yaml index cbaef545f19..4ef0a63b5d4 100644 --- a/charts/incubator/seafile/questions.yaml +++ b/charts/incubator/seafile/questions.yaml @@ -76,6 +76,14 @@ questions: additional_attrs: true type: dict attrs: +# Include{persistenceBasic} + - variable: storage + label: "App File Block Storage" + description: "Stores the File Block Storage (Not user readable unless FUSE enabled)" + schema: + additional_attrs: true + type: dict + attrs: # Include{persistenceBasic} # Include{persistenceList} # Include{ingressRoot} @@ -97,13 +105,13 @@ questions: description: "The UserID of the user running the application" schema: type: int - default: 0 + default: 568 - variable: runAsGroup label: "runAsGroup" description: "The groupID of the user running the application" schema: type: int - default: 0 + default: 568 # Include{securityContextContainer} # Include{securityContextAdvanced} # Include{securityContextPod} diff --git a/charts/incubator/seafile/values.yaml b/charts/incubator/seafile/values.yaml index b19a367991b..c365ca65760 100644 --- a/charts/incubator/seafile/values.yaml +++ b/charts/incubator/seafile/values.yaml @@ -15,8 +15,13 @@ securityContext: container: readOnlyRootFilesystem: false runAsNonRoot: false + allowPrivilegeEscalation: true runAsUser: 0 runAsGroup: 0 + capabilities: + add: + - SYS_ADMIN + - MKNOD workload: main: @@ -39,16 +44,24 @@ workload: SEAFILE_ADMIN_EMAIL: me@example.com SEAFILE_ADMIN_PASSWORD: a_very_secret_password FORCE_HTTPS_IN_CONF: false + NON_ROOT: true persistence: config: enabled: true mountPath: "/shared/seafile" + storage: + enabled: true + mountPath: "/shared/seafile/storage" mariadb: enabled: true mariadbUsername: seafile mariadbDatabase: seafile + +memcached: + enabled: true + portal: open: enabled: true