mirror of
https://github.com/truenas/charts.git
synced 2026-04-05 11:48:55 +08:00
NAS-123672 / 24.04 / add joplin to community apps (#1471)
* add `joplin` to `community` apps * add storage and service * add more boilerplat * add some test values * add values * update readme * add basic ui * add initialmeta * add todo * render config * use 1001 * fix probes * reduce permissiosn * fix portal * remove todo * bump common * simplify probe header * add deafult creds * remove redundant values * update wording
This commit is contained in:
6
library/ix-dev/community/joplin/Chart.lock
Normal file
6
library/ix-dev/community/joplin/Chart.lock
Normal file
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: file://../../../common
|
||||
version: 1.1.0
|
||||
digest: sha256:752ce76025f5b61094bd2b18ca11693eb9d26d0dde4eb2e63cd2330cbffe9e73
|
||||
generated: "2023-08-24T18:43:23.380249283+03:00"
|
||||
25
library/ix-dev/community/joplin/Chart.yaml
Normal file
25
library/ix-dev/community/joplin/Chart.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
name: joplin
|
||||
description: Joplin is an open source note-taking app. Capture your thoughts and securely access them from any device
|
||||
annotations:
|
||||
title: Joplin
|
||||
type: application
|
||||
version: 1.0.0
|
||||
apiVersion: v2
|
||||
appVersion: 2.12.1-beta
|
||||
kubeVersion: '>=1.16.0-0'
|
||||
maintainers:
|
||||
- name: truenas
|
||||
url: https://www.truenas.com/
|
||||
email: dev@ixsystems.com
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: file://../../../common
|
||||
version: 1.1.0
|
||||
home: https://joplinapp.org/
|
||||
icon: https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/LinuxIcons/256x256.png
|
||||
sources:
|
||||
- https://github.com/laurent22/joplin
|
||||
- https://github.com/truenas/charts/tree/master/library/ix-dev/community/joplin
|
||||
- https://hub.docker.com/r/joplin/server/
|
||||
keywords:
|
||||
- notes
|
||||
11
library/ix-dev/community/joplin/README.md
Normal file
11
library/ix-dev/community/joplin/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Joplin
|
||||
|
||||
[Joplin](https://joplinapp.org) is an open source note-taking app. Capture your thoughts and securely access them from any device
|
||||
|
||||
> When application is installed, a container will be launched with **root** privileges.
|
||||
> This is required in order to apply the correct permissions to the `postgres` directories.
|
||||
> Afterward, the `postgres` container will run as a **non**-root user (`999`).
|
||||
> On each upgrade, a container will be launched with **root** privileges in order to apply the correct
|
||||
> permissions to the `postgres` **backups** directory. Container that performs the backup will run as a **non**-root user (`999`) afterwards.
|
||||
> Keep in mind the permissions on the backup directory will be changed to `999:999` on **every** update.
|
||||
> But will only be changed once for the `postgres` data directories.
|
||||
11
library/ix-dev/community/joplin/app-readme.md
Normal file
11
library/ix-dev/community/joplin/app-readme.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Joplin
|
||||
|
||||
[Joplin](https://joplinapp.org) is an open source note-taking app. Capture your thoughts and securely access them from any device
|
||||
|
||||
> When application is installed, a container will be launched with **root** privileges.
|
||||
> This is required in order to apply the correct permissions to the `postgres` directories.
|
||||
> Afterward, the `postgres` container will run as a **non**-root user (`999`).
|
||||
> On each upgrade, a container will be launched with **root** privileges in order to apply the correct
|
||||
> permissions to the `postgres` **backups** directory. Container that performs the backup will run as a **non**-root user (`999`) afterwards.
|
||||
> Keep in mind the permissions on the backup directory will be changed to `999:999` on **every** update.
|
||||
> But will only be changed once for the `postgres` data directories.
|
||||
BIN
library/ix-dev/community/joplin/charts/common-1.1.0.tgz
Normal file
BIN
library/ix-dev/community/joplin/charts/common-1.1.0.tgz
Normal file
Binary file not shown.
10
library/ix-dev/community/joplin/ci/basic-values.yaml
Normal file
10
library/ix-dev/community/joplin/ci/basic-values.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
joplinNetwork:
|
||||
webPort: 31000
|
||||
|
||||
joplinStorage:
|
||||
pgData:
|
||||
type: hostPath
|
||||
hostPath: /mnt/{{ .Release.Namespace }}/pgData
|
||||
pgBackup:
|
||||
type: hostPath
|
||||
hostPath: /mnt/{{ .Release.Namespace }}/pgBackup
|
||||
11
library/ix-dev/community/joplin/ci/hostNet-values.yaml
Normal file
11
library/ix-dev/community/joplin/ci/hostNet-values.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
joplinNetwork:
|
||||
webPort: 31000
|
||||
hostNetwork: true
|
||||
|
||||
joplinStorage:
|
||||
pgData:
|
||||
type: hostPath
|
||||
hostPath: /mnt/{{ .Release.Namespace }}/pgData
|
||||
pgBackup:
|
||||
type: hostPath
|
||||
hostPath: /mnt/{{ .Release.Namespace }}/pgBackup
|
||||
9
library/ix-dev/community/joplin/item.yaml
Normal file
9
library/ix-dev/community/joplin/item.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
icon_url: https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/LinuxIcons/256x256.png
|
||||
categories:
|
||||
- productivity
|
||||
screenshots:
|
||||
- https://joplinapp.org/images/home-top-img-2x.webp
|
||||
- https://joplinapp.org/images/multimedia-notes-img.png
|
||||
- https://joplinapp.org/images/save-web-img.png
|
||||
tags:
|
||||
- notes
|
||||
8
library/ix-dev/community/joplin/metadata.yaml
Normal file
8
library/ix-dev/community/joplin/metadata.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
runAsContext:
|
||||
- userName: joplin
|
||||
groupName: joplin
|
||||
gid: 1001
|
||||
uid: 1001
|
||||
description: Joplin can run as a non-root user.
|
||||
capabilities: []
|
||||
hostMounts: []
|
||||
207
library/ix-dev/community/joplin/questions.yaml
Normal file
207
library/ix-dev/community/joplin/questions.yaml
Normal file
@@ -0,0 +1,207 @@
|
||||
groups:
|
||||
- name: Joplin Configuration
|
||||
description: Configure Joplin
|
||||
- name: Network Configuration
|
||||
description: Configure Network for Joplin
|
||||
- name: Storage Configuration
|
||||
description: Configure Storage for Joplin
|
||||
- name: Resources Configuration
|
||||
description: Configure Resources for Joplin
|
||||
|
||||
portals:
|
||||
web_portal:
|
||||
protocols:
|
||||
- "$kubernetes-resource_configmap_portal_protocol"
|
||||
host:
|
||||
- "$kubernetes-resource_configmap_portal_host"
|
||||
ports:
|
||||
- "$kubernetes-resource_configmap_portal_port"
|
||||
path: "$kubernetes-resource_configmap_portal_path"
|
||||
|
||||
questions:
|
||||
- variable: joplinConfig
|
||||
label: ""
|
||||
group: Joplin Configuration
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: baseUrl
|
||||
label: Base URL
|
||||
description: |
|
||||
The base URL for Joplin.</br>
|
||||
Examples:</br>
|
||||
https://joplin.example.com
|
||||
http://192.168.1.100:30062
|
||||
schema:
|
||||
type: uri
|
||||
default: ""
|
||||
required: true
|
||||
- variable: additionalEnvs
|
||||
label: Additional Environment Variables
|
||||
description: Configure additional environment variables for Joplin.
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: env
|
||||
label: Environment Variable
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: Name
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
- variable: value
|
||||
label: Value
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
|
||||
- variable: joplinNetwork
|
||||
label: ""
|
||||
group: Network Configuration
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: webPort
|
||||
label: Web Port
|
||||
description: The port for the Joplin Web UI.
|
||||
schema:
|
||||
type: int
|
||||
default: 30062
|
||||
min: 9000
|
||||
max: 65535
|
||||
required: true
|
||||
- variable: hostNetwork
|
||||
label: Host Network
|
||||
description: |
|
||||
Bind to the host network. It's recommended to keep this disabled.</br>
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
- variable: joplinStorage
|
||||
label: ""
|
||||
group: Storage Configuration
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: pgData
|
||||
label: Joplin Postgres Data Storage
|
||||
description: The path to store Joplin Postgres Data.
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: type
|
||||
label: Type
|
||||
description: |
|
||||
ixVolume: Is dataset created automatically by the system.</br>
|
||||
Host Path: Is a path that already exists on the system.
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ixVolume
|
||||
enum:
|
||||
- value: hostPath
|
||||
description: Host Path (Path that already exists on the system)
|
||||
- value: ixVolume
|
||||
description: ixVolume (Dataset created automatically by the system)
|
||||
- variable: datasetName
|
||||
label: Dataset Name
|
||||
schema:
|
||||
type: string
|
||||
show_if: [["type", "=", "ixVolume"]]
|
||||
required: true
|
||||
hidden: true
|
||||
immutable: true
|
||||
default: pgData
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
- variable: hostPath
|
||||
label: Host Path
|
||||
schema:
|
||||
type: hostpath
|
||||
show_if: [["type", "=", "hostPath"]]
|
||||
immutable: true
|
||||
required: true
|
||||
- variable: pgBackup
|
||||
label: Joplin Postgres Backup Storage
|
||||
description: The path to store Joplin Postgres Backup.
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: type
|
||||
label: Type
|
||||
description: |
|
||||
ixVolume: Is dataset created automatically by the system.</br>
|
||||
Host Path: Is a path that already exists on the system.
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: ixVolume
|
||||
enum:
|
||||
- value: hostPath
|
||||
description: Host Path (Path that already exists on the system)
|
||||
- value: ixVolume
|
||||
description: ixVolume (Dataset created automatically by the system)
|
||||
- variable: datasetName
|
||||
label: Dataset Name
|
||||
schema:
|
||||
type: string
|
||||
show_if: [["type", "=", "ixVolume"]]
|
||||
required: true
|
||||
hidden: true
|
||||
immutable: true
|
||||
default: pgBackup
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
- variable: hostPath
|
||||
label: Host Path
|
||||
schema:
|
||||
type: hostpath
|
||||
show_if: [["type", "=", "hostPath"]]
|
||||
immutable: true
|
||||
required: true
|
||||
|
||||
- variable: resources
|
||||
group: Resources Configuration
|
||||
label: ""
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: limits
|
||||
label: Limits
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: cpu
|
||||
label: CPU
|
||||
description: CPU limit for Joplin.
|
||||
schema:
|
||||
type: string
|
||||
max_length: 6
|
||||
valid_chars: '^(0\.[1-9]|[1-9][0-9]*)(\.[0-9]|m?)$'
|
||||
valid_chars_error: |
|
||||
Valid CPU limit formats are</br>
|
||||
- Plain Integer - eg. 1</br>
|
||||
- Float - eg. 0.5</br>
|
||||
- Milicpu - eg. 500m
|
||||
default: "4000m"
|
||||
required: true
|
||||
- variable: memory
|
||||
label: Memory
|
||||
description: Memory limit for Joplin.
|
||||
schema:
|
||||
type: string
|
||||
max_length: 12
|
||||
valid_chars: '^[1-9][0-9]*([EPTGMK]i?|e[0-9]+)?$'
|
||||
valid_chars_error: |
|
||||
Valid Memory limit formats are</br>
|
||||
- Suffixed with E/P/T/G/M/K - eg. 1G</br>
|
||||
- Suffixed with Ei/Pi/Ti/Gi/Mi/Ki - eg. 1Gi</br>
|
||||
- Plain Integer in bytes - eg. 1024</br>
|
||||
- Exponent - eg. 134e6
|
||||
default: "8Gi"
|
||||
required: true
|
||||
1
library/ix-dev/community/joplin/templates/NOTES.txt
Normal file
1
library/ix-dev/community/joplin/templates/NOTES.txt
Normal file
@@ -0,0 +1 @@
|
||||
{{ include "ix.v1.common.lib.chart.notes" $ }}
|
||||
29
library/ix-dev/community/joplin/templates/_configuration.tpl
Normal file
29
library/ix-dev/community/joplin/templates/_configuration.tpl
Normal file
@@ -0,0 +1,29 @@
|
||||
{{- define "joplin.configuration" -}}
|
||||
{{- $fullname := (include "ix.v1.common.lib.chart.names.fullname" $) -}}
|
||||
|
||||
{{- $dbHost := (printf "%s-postgres" $fullname) -}}
|
||||
{{- $dbUser := "joplin" -}}
|
||||
{{- $dbName := "joplin" -}}
|
||||
|
||||
{{- $dbPass := randAlphaNum 32 -}}
|
||||
{{- with (lookup "v1" "Secret" .Release.Namespace (printf "%s-postgres-creds" $fullname)) -}}
|
||||
{{- $dbPass = ((index .data "POSTGRES_PASSWORD") | b64dec) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Temporary set dynamic db details on values,
|
||||
so we can print them on the notes */}}
|
||||
{{- $_ := set .Values "joplinDbPass" $dbPass -}}
|
||||
{{- $_ := set .Values "joplinDbHost" $dbHost -}}
|
||||
|
||||
{{- $dbURL := (printf "postgres://%s:%s@%s:5432/%s?sslmode=disable" $dbUser $dbPass $dbHost $dbName) }}
|
||||
|
||||
secret:
|
||||
postgres-creds:
|
||||
enabled: true
|
||||
data:
|
||||
POSTGRES_USER: {{ $dbUser }}
|
||||
POSTGRES_DB: {{ $dbName }}
|
||||
POSTGRES_PASSWORD: {{ $dbPass }}
|
||||
POSTGRES_HOST: {{ $dbHost }}
|
||||
POSTGRES_URL: {{ $dbURL }}
|
||||
{{- end -}}
|
||||
71
library/ix-dev/community/joplin/templates/_joplin.tpl
Normal file
71
library/ix-dev/community/joplin/templates/_joplin.tpl
Normal file
@@ -0,0 +1,71 @@
|
||||
{{- define "joplin.workload" -}}
|
||||
workload:
|
||||
joplin:
|
||||
enabled: true
|
||||
primary: true
|
||||
type: Deployment
|
||||
podSpec:
|
||||
hostNetwork: {{ .Values.joplinNetwork.hostNetwork }}
|
||||
containers:
|
||||
joplin:
|
||||
enabled: true
|
||||
primary: true
|
||||
imageSelector: image
|
||||
securityContext:
|
||||
runAsUser: 1001
|
||||
runAsGroup: 1001
|
||||
readOnlyRootFilesystem: false
|
||||
env:
|
||||
APP_PORT: {{ .Values.joplinNetwork.webPort }}
|
||||
APP_BASE_URL: {{ .Values.joplinConfig.baseUrl }}
|
||||
DB_CLIENT: pg
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_HOST:
|
||||
secretKeyRef:
|
||||
name: postgres-creds
|
||||
key: POSTGRES_HOST
|
||||
POSTGRES_DATABASE:
|
||||
secretKeyRef:
|
||||
name: postgres-creds
|
||||
key: POSTGRES_DB
|
||||
POSTGRES_USER:
|
||||
secretKeyRef:
|
||||
name: postgres-creds
|
||||
key: POSTGRES_USER
|
||||
POSTGRES_PASSWORD:
|
||||
secretKeyRef:
|
||||
name: postgres-creds
|
||||
key: POSTGRES_PASSWORD
|
||||
{{ with .Values.joplinConfig.additionalEnvs }}
|
||||
envList:
|
||||
{{ range $env := . }}
|
||||
- name: {{ $env.name }}
|
||||
value: {{ $env.value }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
probes:
|
||||
liveness:
|
||||
enabled: true
|
||||
type: http
|
||||
port: {{ .Values.joplinNetwork.webPort }}
|
||||
path: /api/ping
|
||||
httpHeaders:
|
||||
Host: '{{ .Values.joplinConfig.baseUrl | trimPrefix "https://" | trimPrefix "http://" | trimSuffix "/" }}'
|
||||
readiness:
|
||||
enabled: true
|
||||
type: http
|
||||
port: {{ .Values.joplinNetwork.webPort }}
|
||||
path: /api/ping
|
||||
httpHeaders:
|
||||
Host: '{{ .Values.joplinConfig.baseUrl | trimPrefix "https://" | trimPrefix "http://" | trimSuffix "/" }}'
|
||||
startup:
|
||||
enabled: true
|
||||
type: http
|
||||
port: {{ .Values.joplinNetwork.webPort }}
|
||||
path: /api/ping
|
||||
httpHeaders:
|
||||
Host: '{{ .Values.joplinConfig.baseUrl | trimPrefix "https://" | trimPrefix "http://" | trimSuffix "/" }}'
|
||||
initContainers:
|
||||
{{- include "ix.v1.common.app.postgresWait" (dict "name" "postgres-wait"
|
||||
"secretName" "postgres-creds") | nindent 8 }}
|
||||
{{- end -}}
|
||||
31
library/ix-dev/community/joplin/templates/_persistence.tpl
Normal file
31
library/ix-dev/community/joplin/templates/_persistence.tpl
Normal file
@@ -0,0 +1,31 @@
|
||||
{{- define "joplin.persistence" -}}
|
||||
persistence:
|
||||
postgresdata:
|
||||
enabled: true
|
||||
type: {{ .Values.joplinStorage.pgData.type }}
|
||||
datasetName: {{ .Values.joplinStorage.pgData.datasetName | default "" }}
|
||||
hostPath: {{ .Values.joplinStorage.pgData.hostPath | default "" }}
|
||||
targetSelector:
|
||||
# Postgres pod
|
||||
postgres:
|
||||
# Postgres container
|
||||
postgres:
|
||||
mountPath: /var/lib/postgresql/data
|
||||
# Postgres - Permissions container
|
||||
permissions:
|
||||
mountPath: /mnt/directories/postgres_data
|
||||
postgresbackup:
|
||||
enabled: true
|
||||
type: {{ .Values.joplinStorage.pgBackup.type }}
|
||||
datasetName: {{ .Values.joplinStorage.pgBackup.datasetName | default "" }}
|
||||
hostPath: {{ .Values.joplinStorage.pgBackup.hostPath | default "" }}
|
||||
targetSelector:
|
||||
# Postgres backup pod
|
||||
postgresbackup:
|
||||
# Postgres backup container
|
||||
postgresbackup:
|
||||
mountPath: /postgres_backup
|
||||
# Postgres - Permissions container
|
||||
permissions:
|
||||
mountPath: /mnt/directories/postgres_backup
|
||||
{{- end -}}
|
||||
25
library/ix-dev/community/joplin/templates/_portal.tpl
Normal file
25
library/ix-dev/community/joplin/templates/_portal.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
{{- define "joplin.portal" -}}
|
||||
{{ $prot := "http" }}
|
||||
{{ if hasPrefix "https://" .Values.joplinConfig.baseUrl }}
|
||||
{{ $prot = "https" }}
|
||||
{{ end }}
|
||||
{{ $host := "$node_ip" }}
|
||||
{{ $port := .Values.joplinNetwork.webPort }}
|
||||
{{ with .Values.joplinConfig.baseUrl }}
|
||||
{{ $host = . | trimPrefix "http://" | trimPrefix "https://" | trimSuffix "/" }}
|
||||
{{ if contains ":" $host }}
|
||||
{{ $port = (split ":" $host)._1 }}
|
||||
{{ $host = (split ":" $host)._0 }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: portal
|
||||
data:
|
||||
port: {{ $port | quote }}
|
||||
path: "/"
|
||||
protocol: {{ $prot }}
|
||||
host: {{ $host }}
|
||||
{{- end -}}
|
||||
6
library/ix-dev/community/joplin/templates/_postgres.tpl
Normal file
6
library/ix-dev/community/joplin/templates/_postgres.tpl
Normal file
@@ -0,0 +1,6 @@
|
||||
{{- define "postgres.workload" -}}
|
||||
workload:
|
||||
{{- include "ix.v1.common.app.postgres" (dict "secretName" "postgres-creds"
|
||||
"resources" .Values.resources
|
||||
"ixChartContext" .Values.ixChartContext) | nindent 2 }}
|
||||
{{- end -}}
|
||||
26
library/ix-dev/community/joplin/templates/_service.tpl
Normal file
26
library/ix-dev/community/joplin/templates/_service.tpl
Normal file
@@ -0,0 +1,26 @@
|
||||
{{- define "joplin.service" -}}
|
||||
service:
|
||||
joplin:
|
||||
enabled: true
|
||||
primary: true
|
||||
type: NodePort
|
||||
targetSelector: joplin
|
||||
ports:
|
||||
webui:
|
||||
enabled: true
|
||||
primary: true
|
||||
port: {{ .Values.joplinNetwork.webPort }}
|
||||
nodePort: {{ .Values.joplinNetwork.webPort }}
|
||||
targetSelector: joplin
|
||||
postgres:
|
||||
enabled: true
|
||||
type: ClusterIP
|
||||
targetSelector: postgres
|
||||
ports:
|
||||
postgres:
|
||||
enabled: true
|
||||
primary: true
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
targetSelector: postgres
|
||||
{{- end -}}
|
||||
13
library/ix-dev/community/joplin/templates/common.yaml
Normal file
13
library/ix-dev/community/joplin/templates/common.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
{{- include "ix.v1.common.loader.init" . -}}
|
||||
|
||||
{{/* Merge the templates with Values */}}
|
||||
{{- $_ := mustMergeOverwrite .Values (include "joplin.service" $ | fromYaml) -}}
|
||||
{{- $_ := mustMergeOverwrite .Values (include "joplin.persistence" $ | fromYaml) -}}
|
||||
{{- $_ := mustMergeOverwrite .Values (include "joplin.configuration" $ | fromYaml) -}}
|
||||
{{- $_ := mustMergeOverwrite .Values (include "postgres.workload" $ | fromYaml) -}}
|
||||
{{- $_ := mustMergeOverwrite .Values (include "joplin.workload" $ | fromYaml) -}}
|
||||
|
||||
{{/* Create the configmap for portal manually*/}}
|
||||
{{- include "joplin.portal" $ -}}
|
||||
|
||||
{{- include "ix.v1.common.loader.apply" . -}}
|
||||
1
library/ix-dev/community/joplin/upgrade_info.json
Normal file
1
library/ix-dev/community/joplin/upgrade_info.json
Normal file
@@ -0,0 +1 @@
|
||||
{"filename": "values.yaml", "keys": ["image"]}
|
||||
31
library/ix-dev/community/joplin/upgrade_strategy
Executable file
31
library/ix-dev/community/joplin/upgrade_strategy
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/python3
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
|
||||
from catalog_update.upgrade_strategy import semantic_versioning
|
||||
|
||||
|
||||
RE_STABLE_VERSION = re.compile(r'\d+\.\d+\.\d+-beta')
|
||||
|
||||
|
||||
def newer_mapping(image_tags):
|
||||
key = list(image_tags.keys())[0]
|
||||
tags = {t.strip("-beta"): t for t in image_tags[key] if RE_STABLE_VERSION.fullmatch(t)}
|
||||
version = semantic_versioning(list(tags))
|
||||
if not version:
|
||||
return {}
|
||||
|
||||
return {
|
||||
'tags': {key: tags[version]},
|
||||
'app_version': version,
|
||||
}
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
versions_json = json.loads(sys.stdin.read())
|
||||
except ValueError:
|
||||
raise ValueError('Invalid json specified')
|
||||
|
||||
print(json.dumps(newer_mapping(versions_json)))
|
||||
47
library/ix-dev/community/joplin/values.yaml
Normal file
47
library/ix-dev/community/joplin/values.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
image:
|
||||
repository: joplin/server
|
||||
pullPolicy: IfNotPresent
|
||||
tag: 2.12.1-beta
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 4000m
|
||||
memory: 8Gi
|
||||
|
||||
joplinConfig:
|
||||
baseUrl: http://localhost:30063
|
||||
additionalEnvs: []
|
||||
|
||||
joplinNetwork:
|
||||
webPort: 30063
|
||||
hostNetwork: false
|
||||
|
||||
joplinStorage:
|
||||
pgData:
|
||||
type: ixVolume
|
||||
datasetName: pgData
|
||||
pgBackup:
|
||||
type: ixVolume
|
||||
datasetName: pgBackup
|
||||
|
||||
notes:
|
||||
custom: |
|
||||
## Default Credentials
|
||||
- Username: `admin@localhost`
|
||||
- Password: `admin`
|
||||
|
||||
## Database
|
||||
You can connect to the database using the pgAdmin App from the catalog
|
||||
|
||||
<details>
|
||||
<summary>Database Details</summary>
|
||||
|
||||
- Database: `joplin`
|
||||
- Username: `joplin`
|
||||
- Password: `{{ .Values.joplinDbPass }}`
|
||||
- Host: `{{ .Values.joplinDbHost }}.{{ .Release.Namespace }}.svc.cluster.local`
|
||||
- Port: `5432`
|
||||
|
||||
</details>
|
||||
{{- $_ := unset .Values "joplinDbPass" }}
|
||||
{{- $_ := unset .Values "joplinDbHost" }}
|
||||
Reference in New Issue
Block a user