fix(Seafile): Misc improvements (#10504)

**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  # <!--(issue)-->

**⚙️ 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?**
<!--
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:**
<!-- Please enter any other relevant information here -->

**✔️ 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._
This commit is contained in:
StevenMcElligott 2023-07-16 11:38:13 -04:00 committed by GitHub
parent 3bbccf0638
commit 46788c28f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 3 deletions

View File

@ -8,6 +8,10 @@ dependencies:
name: mariadb name: mariadb
repository: https://deps.truecharts.org/ repository: https://deps.truecharts.org/
version: 7.0.50 version: 7.0.50
- condition: memcached.enabled
name: memcached
repository: https://deps.truecharts.org/
version: 6.0.69
deprecated: false deprecated: false
description: Reliable and Performant File Sync and Share Solution description: Reliable and Performant File Sync and Share Solution
home: https://truecharts.org/charts/incubator/seafile home: https://truecharts.org/charts/incubator/seafile
@ -26,7 +30,7 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/seafile - https://github.com/truecharts/charts/tree/master/charts/incubator/seafile
- https://seafile.com - https://seafile.com
type: application type: application
version: 0.0.1 version: 0.0.2
annotations: annotations:
truecharts.org/catagories: | truecharts.org/catagories: |
- file-storage - file-storage

View File

@ -76,6 +76,14 @@ questions:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: 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{persistenceBasic}
# Include{persistenceList} # Include{persistenceList}
# Include{ingressRoot} # Include{ingressRoot}
@ -97,13 +105,13 @@ questions:
description: "The UserID of the user running the application" description: "The UserID of the user running the application"
schema: schema:
type: int type: int
default: 0 default: 568
- variable: runAsGroup - variable: runAsGroup
label: "runAsGroup" label: "runAsGroup"
description: "The groupID of the user running the application" description: "The groupID of the user running the application"
schema: schema:
type: int type: int
default: 0 default: 568
# Include{securityContextContainer} # Include{securityContextContainer}
# Include{securityContextAdvanced} # Include{securityContextAdvanced}
# Include{securityContextPod} # Include{securityContextPod}

View File

@ -15,8 +15,13 @@ securityContext:
container: container:
readOnlyRootFilesystem: false readOnlyRootFilesystem: false
runAsNonRoot: false runAsNonRoot: false
allowPrivilegeEscalation: true
runAsUser: 0 runAsUser: 0
runAsGroup: 0 runAsGroup: 0
capabilities:
add:
- SYS_ADMIN
- MKNOD
workload: workload:
main: main:
@ -39,16 +44,24 @@ workload:
SEAFILE_ADMIN_EMAIL: me@example.com SEAFILE_ADMIN_EMAIL: me@example.com
SEAFILE_ADMIN_PASSWORD: a_very_secret_password SEAFILE_ADMIN_PASSWORD: a_very_secret_password
FORCE_HTTPS_IN_CONF: false FORCE_HTTPS_IN_CONF: false
NON_ROOT: true
persistence: persistence:
config: config:
enabled: true enabled: true
mountPath: "/shared/seafile" mountPath: "/shared/seafile"
storage:
enabled: true
mountPath: "/shared/seafile/storage"
mariadb: mariadb:
enabled: true enabled: true
mariadbUsername: seafile mariadbUsername: seafile
mariadbDatabase: seafile mariadbDatabase: seafile
memcached:
enabled: true
portal: portal:
open: open:
enabled: true enabled: true