feat(joplin-server): Migrate to new common (#9564)

**Description**
Migrate joplin-server to new common based on the changes in
https://github.com/truecharts/charts/pull/7913/files
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [x] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ 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:**

- [x] ⚖️ 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
- [x] ⚠️ 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._

---------

Signed-off-by: StevenMcElligott <89483932+StevenMcElligott@users.noreply.github.com>
Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: StevenMcElligott <89483932+StevenMcElligott@users.noreply.github.com>
Co-authored-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros kois <s.kois@outlook.com>
This commit is contained in:
Andy 2023-07-22 13:14:27 +01:00 committed by GitHub
parent 9eb2ff1ed9
commit 5f21f72b36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 65 additions and 52 deletions

View File

@ -3,11 +3,7 @@ appVersion: "2.10.10"
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 11.1.2
- condition: postgresql.enabled
name: postgresql
repository: https://deps.truecharts.org/
version: 11.0.31
version: 13.2.0
deprecated: false
description: Allows you to sync any Joplin client.
home: https://truecharts.org/charts/incubator/joplin-server
@ -26,9 +22,8 @@ sources:
- https://github.com/laurent22/joplin/tree/dev/packages/server
- https://github.com/laurent22/joplin
type: application
version: 12.0.0
version: 13.0.0
annotations:
truecharts.org/catagories: |
- media
truecharts.org/SCALE-support: "true"
truecharts.org/grade: U

View File

@ -0,0 +1,7 @@
workload:
main:
podSpec:
containers:
main:
env:
APP_BASE_URL: "http://localhost:{{ .Values.service.main.ports.main.port }}"

View File

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

View File

@ -1 +1 @@
{{ include "tc.common.loader.all" . }}
{{ include "tc.v1.common.loader.all" . }}

View File

@ -4,62 +4,72 @@ image:
pullPolicy: IfNotPresent
securityContext:
readOnlyRootFilesystem: false
runAsNonRoot: false
container:
readOnlyRootFilesystem: false
runAsNonRoot: false
runAsUser: 0
runAsGroup: 0
podSecurityContext:
runAsUser: 0
runAsGroup: 0
env:
APP_BASE_URL: http://localhost:22300
APP_PORT: 22300
DB_CLIENT: "pg"
POSTGRES_DATABASE: "{{ .Values.postgresql.postgresqlDatabase }}"
POSTGRES_USER: "{{ .Values.postgresql.postgresqlUsername }}"
POSTGRES_PORT: "5432"
POSTGRES_PASSWORD:
secretKeyRef:
name: dbcreds
key: postgresql-password
POSTGRES_HOST:
secretKeyRef:
name: dbcreds
key: plainhost
MAILER_ENABLED: 0
MAILER_HOST: ""
MAILER_PORT: 465
MAILER_SECURE: true
MAILER_AUTH_USER: ""
MAILER_AUTH_PASSWORD: ""
MAILER_NOREPLY_NAME: ""
MAILER_NOREPLY_EMAIL: ""
probes:
liveness:
path: "/api/ping"
readiness:
path: "/api/ping"
startup:
path: "/api/ping"
workload:
main:
podSpec:
containers:
main:
probes:
liveness:
path: "/api/ping"
port: "{{ .Values.service.main.ports.main.port }}"
httpHeaders:
Host: '{{ tpl .Values.workload.main.podSpec.containers.main.env.APP_BASE_URL $ | replace "https://" "" | replace "http://" "" }}'
readiness:
path: "/api/ping"
port: "{{ .Values.service.main.ports.main.port }}"
httpHeaders:
Host: '{{ tpl .Values.workload.main.podSpec.containers.main.env.APP_BASE_URL $ | replace "https://" "" | replace "http://" "" }}'
startup:
type: tcp
port: "{{ .Values.service.main.ports.main.port }}"
env:
APP_BASE_URL: ""
APP_PORT: "{{ .Values.service.main.ports.main.port }}"
DB_CLIENT: "pg"
POSTGRES_DATABASE: "{{ .Values.cnpg.main.database }}"
POSTGRES_USER: "{{ .Values.cnpg.main.user }}"
POSTGRES_PORT: "5432"
POSTGRES_PASSWORD:
secretKeyRef:
name: cnpg-main-user
key: password
POSTGRES_HOST:
secretKeyRef:
name: cnpg-main-urls
key: host
MAILER_ENABLED: 0
MAILER_HOST: ""
MAILER_PORT: 465
MAILER_SECURE: true
MAILER_AUTH_USER: ""
MAILER_AUTH_PASSWORD: ""
MAILER_NOREPLY_NAME: ""
MAILER_NOREPLY_EMAIL: ""
service:
main:
ports:
main:
port: 22300
targetPort: 22300
persistence:
config:
enabled: true
mountPath: "/config"
postgresql:
enabled: true
existingSecret: "dbcreds"
postgresqlUsername: joplin
postgresqlDatabase: joplin
cnpg:
main:
enabled: true
user: joplin
database: joplin
portal:
enabled: true
open:
enabled: true