Publish new changes in catalog

This commit is contained in:
sonicaj
2023-11-14 21:12:25 +00:00
parent 0be7b47fd9
commit 04f0341a5b
23 changed files with 1176 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: file://../../../common
version: 1.2.3
digest: sha256:e6ff49b06bf5d4d159e505ae6d153f36cd46170bb519caf90462cd5caebfd0fb
generated: "2023-11-09T16:20:50.070989809+02:00"

View File

@@ -0,0 +1,24 @@
name: vikunja
description: Vikunja is an open-source, self-hostable to-do app.
annotations:
title: Vikunja
type: application
version: 1.0.0
apiVersion: v2
appVersion: 0.21.0
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.2.3
home: https://vikunja.io/
icon: https://media.sys.truenas.net/apps/vikunja/icons/icon.png
sources:
- https://github.com/truenas/charts/tree/master/library/ix-dev/community/vikunja
- https://vikunja.io/
keywords:
- todo

View File

@@ -0,0 +1,11 @@
# Vikunja
[Vikunja](https://vikunja.io) is an open-source, self-hostable to-do app.
> 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.

View File

@@ -0,0 +1,11 @@
# Vikunja
[Vikunja](https://vikunja.io) is an open-source, self-hostable to-do app.
> 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.

Binary file not shown.

View File

@@ -0,0 +1,14 @@
vikunjaNetwork:
webPort: 31000
vikunjaConfig:
url: http://localhost:31000
maxFileSize: 20
vikunjaStorage:
data:
type: pvc
pgData:
type: pvc
pgBackup:
type: emptyDir

View File

@@ -0,0 +1,23 @@
vikunjaNetwork:
webPort: 31000
vikunjaConfig:
url: http://localhost:31000
maxFileSize: 20
vikunjaRunAs:
user: 1000
group: 1000
vikunjaStorage:
data:
type: pvc
pgData:
type: pvc
pgBackup:
type: emptyDir
additionalStorages:
- type: pvc
mountPath: /data1
- type: pvc
mountPath: /data2

View File

@@ -0,0 +1,69 @@
image:
repository: vikunja/api
pullPolicy: IfNotPresent
tag: 0.21.0
frontendImage:
repository: vikunja/frontend
pullPolicy: IfNotPresent
tag: 0.21.0
nginxImage:
repository: nginx
pullPolicy: IfNotPresent
tag: 1.25.3
resources:
limits:
cpu: 4000m
memory: 8Gi
vikunjaConfig:
url: ''
maxFileSize: 20
additionalEnvs: []
vikunjaRunAs:
user: 568
group: 568
vikunjaNetwork:
webPort: 31002
vikunjaStorage:
additionalStorages: []
data:
type: ixVolume
ixVolumeConfig:
datasetName: data
pgData:
type: ixVolume
ixVolumeConfig:
datasetName: pgData
pgBackup:
type: ixVolume
ixVolumeConfig:
datasetName: pgBackup
notes:
custom: |
## Database
You can connect to the database using the pgAdmin App from the catalog
<details>
<summary>Database Details</summary>
- Database: `vikunja`
- Username: `vikunja`
- Password: `{{ .Values.vikunjaDbPass }}`
- Host: `{{ .Values.vikunjaDbHost }}.{{ .Release.Namespace }}.svc.cluster.local`
- Port: `5432`
</details>
{{- $_ := unset .Values "vikunjaDbPass" }}
{{- $_ := unset .Values "vikunjaDbHost" }}
# Not exposed to the user,
# just used internally
vikunjaPorts:
api: 3456
frontHttp: 5000
frontHttp2: 5001

View File

@@ -0,0 +1,23 @@
runAsContext:
- userName: vikunja
groupName: vikunja
gid: 568
uid: 568
description: Vikunja API can run as any non-root user
- userName: nginx
groupName: nginx
gid: 101
uid: 101
description: Vikunja Frontend runs as a non-root user.
- userName: nginx
groupName: nginx
gid: 101
uid: 101
description: Vikunja Proxy runs as a non-root user.
- userName: postgres
groupName: postgres
gid: 999
uid: 999
description: Postgres runs as a non-root user.
capabilities: []
hostMounts: []

View File

@@ -0,0 +1,568 @@
groups:
- name: Vikunja Configuration
description: Configure Vikunja
- name: User and Group Configuration
description: Configure User and Group for Vikunja
- name: Network Configuration
description: Configure Network for Vikunja
- name: Storage Configuration
description: Configure Storage for Vikunja
- name: Resources Configuration
description: Configure Resources for Vikunja
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: TZ
group: Vikunja Configuration
label: Timezone
schema:
type: string
default: Etc/UTC
required: true
$ref:
- definitions/timezone
- variable: vikunjaConfig
label: ""
group: Vikunja Configuration
schema:
type: dict
attrs:
- variable: url
label: URL
description: |
The URL that Vikunja will be accessible from.</br>
Example: </br>
http://server.ip:30080</br>
https://Vikunja.example.com
schema:
type: uri
default: ""
required: true
- variable: maxFileSize
label: Max File Size (in MB)
description: The maximum file size for attachments in MB.
schema:
type: int
default: 20
required: true
min: 1
- variable: additionalEnvs
label: Additional Environment Variables
description: Configure additional environment variables for Vikunja.
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: vikunjaRunAs
label: ""
group: User and Group Configuration
schema:
type: dict
attrs:
- variable: user
label: User ID
description: The user id that Vikunja will run as.
schema:
type: int
min: 2
default: 568
required: true
- variable: group
label: Group ID
description: The group id that Vikunja will run as.
schema:
type: int
min: 2
default: 568
required: true
- variable: vikunjaNetwork
label: ""
group: Network Configuration
schema:
type: dict
attrs:
- variable: webPort
label: Web Port
description: The port for the Vikunja Web UI.
schema:
type: int
default: 31002
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: vikunjaStorage
label: ""
group: Storage Configuration
schema:
type: dict
attrs:
- variable: data
label: Vikunja Data Storage
description: The path to store Vikunja 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
immutable: 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: ixVolumeConfig
label: ixVolume Configuration
description: The configuration for the ixVolume dataset.
schema:
type: dict
show_if: [["type", "=", "ixVolume"]]
$ref:
- "normalize/ixVolume"
attrs:
- variable: aclEnable
label: Enable ACL
description: Enable ACL for the dataset.
schema:
type: boolean
default: false
- variable: datasetName
label: Dataset Name
description: The name of the dataset to use for storage.
schema:
type: string
required: true
immutable: true
hidden: true
default: "data"
- variable: aclEntries
label: ACL Configuration
schema:
type: dict
show_if: [["aclEnable", "=", true]]
attrs: []
- variable: hostPathConfig
label: hostPathConfig
schema:
type: dict
show_if: [["type", "=", "hostPath"]]
attrs:
- variable: aclEnable
label: Enable ACL
description: Enable ACL for the dataset.
schema:
type: boolean
default: false
- variable: acl
label: ACL Configuration
schema:
type: dict
show_if: [["aclEnable", "=", true]]
attrs: []
$ref:
- "normalize/acl"
- variable: hostPath
label: Host Path
description: The host path to use for storage.
schema:
type: hostpath
show_if: [["aclEnable", "=", false]]
required: true
- variable: pgData
label: Postgres Data Storage
description: The path to store 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
immutable: 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: ixVolumeConfig
label: ixVolume Configuration
description: The configuration for the ixVolume dataset.
schema:
type: dict
# Nothing to show for the user
hidden: true
show_if: [["type", "=", "ixVolume"]]
$ref:
- "normalize/ixVolume"
attrs:
- variable: aclEnable
label: Enable ACL
description: Enable ACL for the dataset.
schema:
type: boolean
# Postgres does a CHMOD at startup
# Which fails with ACL
hidden: true
default: false
- variable: datasetName
label: Dataset Name
description: The name of the dataset to use for storage.
schema:
type: string
required: true
immutable: true
hidden: true
default: "pgData"
- variable: aclEntries
label: ACL Configuration
schema:
type: dict
show_if: [["aclEnable", "=", true]]
attrs: []
- variable: hostPathConfig
label: hostPathConfig
schema:
type: dict
show_if: [["type", "=", "hostPath"]]
attrs:
- variable: aclEnable
label: Enable ACL
description: Enable ACL for the dataset.
schema:
type: boolean
# Postgres does a CHMOD at startup
# Which fails with ACL
hidden: true
default: false
- variable: acl
label: ACL Configuration
schema:
type: dict
show_if: [["aclEnable", "=", true]]
attrs: []
$ref:
- "normalize/acl"
- variable: hostPath
label: Host Path
description: The host path to use for storage.
schema:
type: hostpath
show_if: [["aclEnable", "=", false]]
required: true
- variable: pgBackup
label: Postgres Backup Storage
description: The path to store 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
immutable: 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: ixVolumeConfig
label: ixVolume Configuration
description: The configuration for the ixVolume dataset.
schema:
type: dict
# Nothing to show for the user
hidden: true
show_if: [["type", "=", "ixVolume"]]
$ref:
- "normalize/ixVolume"
attrs:
- variable: aclEnable
label: Enable ACL
description: Enable ACL for the dataset.
schema:
type: boolean
# Postgres does a CHMOD at startup
# Which fails with ACL
hidden: true
default: false
- variable: datasetName
label: Dataset Name
description: The name of the dataset to use for storage.
schema:
type: string
required: true
immutable: true
hidden: true
default: "pgBackup"
- variable: aclEntries
label: ACL Configuration
schema:
type: dict
show_if: [["aclEnable", "=", true]]
attrs: []
- variable: hostPathConfig
label: hostPathConfig
schema:
type: dict
show_if: [["type", "=", "hostPath"]]
attrs:
- variable: aclEnable
label: Enable ACL
description: Enable ACL for the dataset.
schema:
type: boolean
# Postgres does a CHMOD at startup
# Which fails with ACL
hidden: true
default: false
- variable: acl
label: ACL Configuration
schema:
type: dict
show_if: [["aclEnable", "=", true]]
attrs: []
$ref:
- "normalize/acl"
- variable: hostPath
label: Host Path
description: The host path to use for storage.
schema:
type: hostpath
show_if: [["aclEnable", "=", false]]
required: true
- variable: additionalStorages
label: Additional Storage
description: Additional storage for Vikunja.
schema:
type: list
default: []
items:
- variable: storageEntry
label: Storage Entry
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.</br>
SMB Share: Is a SMB share that is mounted to a persistent volume claim.
schema:
type: string
required: true
default: "ixVolume"
immutable: true
enum:
- value: "hostPath"
description: Host Path (Path that already exists on the system)
- value: "ixVolume"
description: ixVolume (Dataset created automatically by the system)
- value: "smb-pv-pvc"
description: SMB Share (Mounts a persistent volume claim to a SMB share)
- variable: readOnly
label: Read Only
description: Mount the volume as read only.
schema:
type: boolean
default: false
- variable: mountPath
label: Mount Path
description: The path inside the container to mount the storage.
schema:
type: path
required: true
- variable: hostPathConfig
label: hostPathConfig
schema:
type: dict
show_if: [["type", "=", "hostPath"]]
attrs:
- variable: aclEnable
label: Enable ACL
description: Enable ACL for the dataset.
schema:
type: boolean
default: false
- variable: acl
label: ACL Configuration
schema:
type: dict
show_if: [["aclEnable", "=", true]]
attrs: []
$ref:
- "normalize/acl"
- variable: hostPath
label: Host Path
description: The host path to use for storage.
schema:
type: hostpath
show_if: [["aclEnable", "=", false]]
required: true
- variable: ixVolumeConfig
label: ixVolume Configuration
description: The configuration for the ixVolume dataset.
schema:
type: dict
show_if: [["type", "=", "ixVolume"]]
$ref:
- "normalize/ixVolume"
attrs:
- variable: aclEnable
label: Enable ACL
description: Enable ACL for the dataset.
schema:
type: boolean
default: false
- variable: datasetName
label: Dataset Name
description: The name of the dataset to use for storage.
schema:
type: string
required: true
immutable: true
default: "storage_entry"
- variable: aclEntries
label: ACL Configuration
schema:
type: dict
show_if: [["aclEnable", "=", true]]
attrs: []
- variable: smbConfig
label: SMB Share Configuration
description: The configuration for the SMB Share.
schema:
type: dict
show_if: [["type", "=", "smb-pv-pvc"]]
attrs:
- variable: server
label: Server
description: The server for the SMB share.
schema:
type: string
required: true
- variable: share
label: Share
description: The share name for the SMB share.
schema:
type: string
required: true
- variable: domain
label: Domain (Optional)
description: The domain for the SMB share.
schema:
type: string
- variable: username
label: Username
description: The username for the SMB share.
schema:
type: string
required: true
- variable: password
label: Password
description: The password for the SMB share.
schema:
type: string
required: true
private: true
- variable: size
label: Size (in Gi)
description: The size of the volume quota.
schema:
type: int
required: true
min: 1
default: 1
- 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 Vikunja.
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 Vikunja.
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

View File

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

View File

@@ -0,0 +1,96 @@
{{- define "vikunja.configuration" -}}
{{- $fullname := (include "ix.v1.common.lib.chart.names.fullname" $) -}}
{{- $redisHost := (printf "%s-redis" $fullname) -}}
{{- $redisPass := randAlphaNum 32 -}}
{{- with (lookup "v1" "Secret" .Release.Namespace (printf "%s-redis-creds" $fullname)) -}}
{{- $redisPass = ((index .data "REDIS_PASSWORD") | b64dec) -}}
{{- end -}}
{{- $secretKey := randAlphaNum 64 -}}
{{- with (lookup "v1" "Secret" .Release.Namespace (printf "%s-vikunja" $fullname)) -}}
{{- $secretKey = ((index .data "VIKUNJA_SERVICE_JWTSECRET") | b64dec) -}}
{{- end -}}
{{- $dbHost := (printf "%s-postgres" $fullname) -}}
{{- $dbUser := "vikunja" -}}
{{- $dbName := "vikunja" -}}
{{- $dbPass := (randAlphaNum 32) -}}
{{- with (lookup "v1" "Secret" .Release.Namespace (printf "%s-postgres-creds" $fullname)) -}}
{{- $dbPass = ((index .data "POSTGRES_PASSWORD") | b64dec) -}}
{{- end -}}
{{- $dbURL := (printf "postgres://%s:%s@%s:5432/%s?sslmode=disable" $dbUser $dbPass $dbHost $dbName) -}}
{{/* Temporary set dynamic db details on values,
so we can print them on the notes */}}
{{- $_ := set .Values "vikunjaDbPass" $dbPass -}}
{{- $_ := set .Values "vikunjaDbHost" $dbHost -}}
secret:
postgres-creds:
enabled: true
data:
POSTGRES_USER: {{ $dbUser }}
POSTGRES_DB: {{ $dbName }}
POSTGRES_PASSWORD: {{ $dbPass }}
POSTGRES_HOST: {{ $dbHost }}
POSTGRES_URL: {{ $dbURL }}
redis-creds:
enabled: true
data:
ALLOW_EMPTY_PASSWORD: "no"
REDIS_PASSWORD: {{ $redisPass }}
REDIS_HOST: {{ $redisHost }}
vikunja-creds:
enabled: true
data:
VIKUNJA_SERVICE_JWTSECRET: {{ $secretKey }}
VIKUNJA_DATABASE_USER: {{ $dbUser }}
VIKUNJA_DATABASE_PASSWORD: {{ $dbPass }}
VIKUNJA_DATABASE_HOST: {{ $dbHost }}
VIKUNJA_DATABASE_DATABASE: {{ $dbName }}
VIKUNJA_REDIS_HOST: {{ printf "%s:6379" $redisHost }}
VIKUNJA_REDIS_PASSWORD: {{ $redisPass }}
VIKUNJA_REDIS_DB: "0"
configmap:
vikunja-api:
enabled: true
data:
VIKUNJA_SERVICE_TIMEZONE: {{ .Values.TZ }}
VIKUNJA_SERVICE_INTERFACE:
VIKUNJA_REDIS_ENABLED: "true"
VIKUNJA_KEYVALUE_TYPE: redis
VIKUNJA_DATABASE_TYPE: postgres
VIKUNJA_SERVICE_INTERFACE: {{ printf ":%v" .Values.vikunjaPorts.api | quote }}
VIKUNJA_FILES_MAXSIZE: {{ printf "%vMB" .Values.vikunjaConfig.maxFileSize }}
VIKUNJA_FILES_BASEPATH: /app/vikunja/files
VIKUNJA_SERVICE_FRONTENDURL: {{ printf "%s/" (.Values.vikunjaConfig.url | trimSuffix "/") }}
vikunja-frontend:
enabled: true
data:
VIKUNJA_HTTP_PORT: {{ .Values.vikunjaPorts.frontHttp | quote }}
VIKUNJA_HTTP2_PORT: {{ .Values.vikunjaPorts.frontHttp2 | quote }}
nginx-config:
enabled: true
data:
nginx-config: |
server {
listen {{ .Values.vikunjaNetwork.webPort }};
location /nginx-health {
return 200;
}
location / {
proxy_pass {{ printf "http://%s-frontend:%v" $fullname .Values.vikunjaPorts.frontHttp }};
}
location ~* ^/(api|dav|\.well-known)/ {
proxy_pass {{ printf "http://%s:%v" $fullname .Values.vikunjaPorts.api }};
client_max_body_size {{ printf "%vM" .Values.vikunjaConfig.maxFileSize }};
}
}
{{- end -}}

View File

@@ -0,0 +1,57 @@
{{- define "vikunja.persistence" -}}
persistence:
tmp:
enabled: true
type: emptyDir
targetSelector:
vikunja:
vikunja:
mountPath: /tmp
nginxvar:
enabled: true
type: emptyDir
targetSelector:
vikunja-proxy:
vikunja-proxy:
mountPath: /var/cache/nginx
nginxrun:
enabled: true
type: emptyDir
targetSelector:
vikunja-proxy:
vikunja-proxy:
mountPath: /var/run
data:
enabled: true
{{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.vikunjaStorage.data) | nindent 4 }}
targetSelector:
vikunja-api:
vikunja-api:
mountPath: /app/vikunja/files
nginx:
enabled: true
type: configmap
objectName: nginx-config
defaultMode: "0600"
targetSelector:
vikunja-proxy:
vikunja-proxy:
mountPath: /etc/nginx/conf.d/default.conf
subPath: nginx-config
readOnly: true
{{- range $idx, $storage := .Values.vikunjaStorage.additionalStorages }}
{{ printf "vikunja-%v" (int $idx) }}:
enabled: true
{{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
targetSelector:
vikunja-api:
vikunja-api:
mountPath: {{ $storage.mountPath }}
{{- end -}}
{{- include "ix.v1.common.app.postgresPersistence"
(dict "pgData" .Values.vikunjaStorage.pgData
"pgBackup" .Values.vikunjaStorage.pgBackup
) | nindent 2 }}
{{- end -}}

View File

@@ -0,0 +1,35 @@
{{- define "vikunja.portal" -}}
{{- $host := "$node_ip" -}}
{{- $port := "" -}}
{{- $protocol := "http" -}}
{{- if hasPrefix "https://" .Values.vikunjaConfig.url -}}
{{- $protocol = "https" -}}
{{- end -}}
{{- with .Values.vikunjaConfig.url -}} {{/* Trim protocol and trailing slash */}}
{{- $host = . | trimPrefix "https://" | trimPrefix "http://" | trimSuffix "/" -}}
{{- if contains ":" $host -}}
{{- $port = (split ":" $host)._1 -}}
{{- $host = (split ":" $host)._0 -}}
{{- end -}}
{{- if not $port -}}
{{- if eq $protocol "https" -}}
{{- $port = "443" -}}
{{- else -}}
{{- $port = "80" -}}
{{- end -}}
{{- end -}}
{{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: portal
data:
path: "/"
port: {{ $port | quote }}
protocol: {{ $protocol }}
host: {{ $host }}
{{- end -}}

View File

@@ -0,0 +1,6 @@
{{- define "vikunja.postgres" -}}
workload:
{{- include "ix.v1.common.app.postgres" (dict "secretName" "postgres-creds"
"resources" .Values.resources
"ixChartContext" .Values.ixChartContext) | nindent 2 }}
{{- end -}}

View File

@@ -0,0 +1,6 @@
{{- define "vikunja.redis" -}}
workload:
{{- include "ix.v1.common.app.redis" (dict "secretName" "redis-creds"
"resources" .Values.resources) | nindent 2 }}
{{- end -}}

View File

@@ -0,0 +1,47 @@
{{- define "vikunja.service" -}}
service:
vikunja:
enabled: true
primary: true
type: ClusterIP
targetSelector: vikunja-api
ports:
api:
enabled: true
primary: true
port: {{ .Values.vikunjaPorts.api }}
targetSelector: vikunja-api
proxy:
enabled: true
type: NodePort
targetSelector: vikunja-proxy
ports:
webui:
enabled: true
primary: true
port: {{ .Values.vikunjaNetwork.webPort }}
nodePort: {{ .Values.vikunjaNetwork.webPort }}
targetSelector: vikunja-proxy
frontend:
enabled: true
type: ClusterIP
targetSelector: vikunja-frontend
ports:
webui:
enabled: true
primary: true
port: {{ .Values.vikunjaPorts.frontHttp }}
targetSelector: vikunja-frontend
redis:
enabled: true
type: ClusterIP
targetSelector: redis
ports:
redis:
enabled: true
primary: true
port: 6379
targetPort: 6379
targetSelector: redis
{{- include "ix.v1.common.app.postgresService" $ | nindent 2 }}
{{- end -}}

View File

@@ -0,0 +1,55 @@
{{- define "vikunja.api" -}}
workload:
vikunja-api:
enabled: true
primary: true
type: Deployment
podSpec:
hostNetwork: false
containers:
vikunja-api:
enabled: true
primary: true
imageSelector: image
securityContext:
runAsUser: {{ .Values.vikunjaRunAs.user }}
runAsGroup: {{ .Values.vikunjaRunAs.group }}
runAsNonRoot: false
env:
# Make vikunja skip user creation
PUID: ""
PGID: ""
envFrom:
- secretRef:
name: vikunja-creds
- configMapRef:
name: vikunja-api
{{ with .Values.vikunjaConfig.additionalEnvs }}
envList:
{{ range $env := . }}
- name: {{ $env.name }}
value: {{ $env.value }}
{{ end }}
{{ end }}
probes:
liveness:
enabled: true
type: http
port: {{ .Values.vikunjaPorts.api }}
path: /health
readiness:
enabled: true
type: http
port: {{ .Values.vikunjaPorts.api }}
path: /health
startup:
enabled: true
type: http
port: {{ .Values.vikunjaPorts.api }}
path: /health
initContainers:
{{- include "ix.v1.common.app.redisWait" (dict "name" "01-redis-wait"
"secretName" "redis-creds") | nindent 8 }}
{{- include "ix.v1.common.app.postgresWait" (dict "name" "02-postgres-wait"
"secretName" "postgres-creds") | nindent 8 }}
{{- end -}}

View File

@@ -0,0 +1,40 @@
{{- define "vikunja.frontend" -}}
{{- $fullname := (include "ix.v1.common.lib.chart.names.fullname" $) -}}
{{- $apiUrl := printf "http://%v:%v/health" $fullname .Values.vikunjaPorts.api }}
workload:
vikunja-frontend:
enabled: true
type: Deployment
podSpec:
hostNetwork: false
containers:
vikunja-frontend:
enabled: true
primary: true
imageSelector: frontendImage
securityContext:
runAsUser: 101
runAsGroup: 101
readOnlyRootFilesystem: false
envFrom:
- configMapRef:
name: vikunja-frontend
probes:
liveness:
enabled: true
type: http
port: {{ .Values.vikunjaPorts.frontHttp }}
path: /ready
readiness:
enabled: true
type: http
port: {{ .Values.vikunjaPorts.frontHttp }}
path: /ready
startup:
enabled: true
type: http
port: {{ .Values.vikunjaPorts.frontHttp }}
path: /ready
initContainers:
{{- include "vikunja.wait.init" (dict "url" $apiUrl) | indent 8 }}
{{- end -}}

View File

@@ -0,0 +1,36 @@
{{- define "vikunja.nginx" -}}
{{- $fullname := (include "ix.v1.common.lib.chart.names.fullname" $) -}}
{{- $frontUrl := printf "http://%v-frontend:%v/ready" $fullname .Values.vikunjaPorts.frontHttp }}
workload:
vikunja-proxy:
enabled: true
type: Deployment
podSpec:
hostNetwork: false
containers:
vikunja-proxy:
enabled: true
primary: true
imageSelector: nginxImage
securityContext:
runAsUser: 101
runAsGroup: 101
probes:
liveness:
enabled: true
type: http
port: {{ .Values.vikunjaNetwork.webPort }}
path: /nginx-health
readiness:
enabled: true
type: http
port: {{ .Values.vikunjaNetwork.webPort }}
path: /nginx-health
startup:
enabled: true
type: http
port: {{ .Values.vikunjaNetwork.webPort }}
path: /nginx-health
initContainers:
{{- include "vikunja.wait.init" (dict "url" $frontUrl) | indent 8 }}
{{- end -}}

View File

@@ -0,0 +1,17 @@
{{- define "vikunja.wait.init" -}}
{{- $url := .url }}
wait-url:
enabled: true
type: init
imageSelector: bashImage
command:
- /bin/ash
- -c
- |
echo "Pinging [{{ $url }}] until it is ready..."
until wget --spider --quiet "{{ $url }}"; do
echo "Waiting for [{{ $url }}] to be ready..."
sleep 2
done
echo "URL [{{ $url }}] is ready!"
{{- end -}}

View File

@@ -0,0 +1,16 @@
{{- include "ix.v1.common.loader.init" . -}}
{{/* Merge the templates with Values */}}
{{- $_ := mustMergeOverwrite .Values (include "vikunja.persistence" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "vikunja.configuration" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "vikunja.service" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "vikunja.redis" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "vikunja.postgres" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "vikunja.nginx" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "vikunja.frontend" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "vikunja.api" $ | fromYaml) -}}
{{/* Create the configmap for portal manually*/}}
{{- include "vikunja.portal" $ -}}
{{- include "ix.v1.common.loader.apply" . -}}

View File

@@ -0,0 +1,15 @@
icon_url: https://media.sys.truenas.net/apps/vikunja/icons/icon.png
categories:
- productivity
screenshots:
- https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot1.webp
- https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot2.webp
- https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot3.webp
- https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot4.webp
- https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot5.webp
- https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot6.webp
- https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot7.webp
- https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot8.webp
- https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot9.webp
tags:
- todo