apps/do/vikunja/extra: add extra vikunja instance

This commit is contained in:
xeruf 2025-01-13 22:41:13 +01:00
parent 2f4f238ef5
commit e489c1f71f
6 changed files with 174 additions and 0 deletions

View file

@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: vikunja-extra-files
namespace: stackspout
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 2Gi
storageClassName: local-path

View file

@ -0,0 +1,21 @@
apiVersion: hydra.ory.sh/v1alpha1
kind: OAuth2Client
metadata:
name: vikunja-extra-oauth-client
# Has to live in the same namespace as the stackspin-*-oauth-variables secret
namespace: flux-system
spec:
# TODO copied from wekan: https://github.com/wekan/wekan/wiki/Keycloak
grantTypes:
- authorization_code
- refresh_token
- client_credentials
- implicit
responseTypes:
- id_token
- code
scope: "openid profile email name"
secretName: stackspin-vikunja-extra-oauth-variables
redirectUris:
- https://{vikunja_extra_domain}/auth/openid/stackspin
tokenEndpointAuthMethod: client_secret_post

View file

@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: vikunja-extra-postgres
namespace: stackspout
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 2Gi
storageClassName: local-path

View file

@ -0,0 +1,27 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: vikunja-extra
namespace: stackspout
spec:
releaseName: vikunja-extra
chart:
spec:
chart: vikunja
version: 1.0.0
sourceRef:
kind: HelmRepository
name: vikunja-xeruf
namespace: flux-system
interval: 5m
valuesFrom:
- kind: ConfigMap
name: stackspin-vikunja-extra-values
optional: false
# Allow overriding values by ConfigMap or Secret
- kind: ConfigMap
name: stackspin-vikunja-extra-override
optional: true
- kind: Secret
name: stackspin-vikunja-extra-override
optional: true

View file

@ -0,0 +1,99 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: stackspin-vikunja-values
namespace: stackspout
data:
# https://kolaente.dev/vikunja/helm-chart/src/branch/main/values.yaml
values.yaml: |
vikunja:
persistence:
data:
existingClaim: vikunja-extra-files
ingress:
main:
enabled: true
annotations:
kubernetes.io/tls-acme: "true"
hosts:
- host: "${vikunja_extra_domain}"
paths:
- path: /api
tls:
- secretName: vikunja-tls
hosts:
- "${vikunja_extra_domain}"
configMaps:
config:
data:
config.yml: |-
auth:
openid:
# https://vikunja.io/docs/openid-example-configurations/
# Example: https://kolaente.dev/vikunja/vikunja/src/branch/main/config.yml.sample#L313
enabled: true
redirecturl: "https://${vikunja_extra_domain}/auth/openid/"
providers:
- name: Stackspin
authurl: "https://${hydra_domain}/"
clientid: "${client_id}"
clientsecret: "${client_secret}"
local:
enabled: false
mailer:
enabled: "${outgoing_mail_enabled}"
host: "${outgoing_mail_smtp_host}"
port: "${outgoing_mail_smtp_port}"
username: "${outgoing_mail_smtp_user}"
password: "${outgoing_mail_smtp_password}"
fromemail: "${outgoing_mail_from_address}"
forcessl: true
service:
#rootpath: "/app/vikunja"
#frontendurl: "https://${vikunja_extra_domain}"
timezone: "CET"
JWTSecret: "${jwt}"
motd: "Welcome to ${domain_extra}!"
database:
type: postgres
host: vikunja-postgresql
password: "${postgresql_password}"
# https://vikunja.io/docs/config-options/#log
log:
standard: stderr
level: debug
databaselevel: debug
mail: stderr
maillevel: debug
defaultsettings:
avatar_provider: gravatar
discoverable_by_name: true
discoverable_by_email: true
week_start: 1
timezone: CET
# TODO default_project_id
global:
labels:
stackspin.net/backupSet: "vikunja-extra"
podLabels:
stackspin.net/backupSet: "vikunja-extra"
podAnnotations:
backup.velero.io/backup-volumes: "data"
postgresql:
enabled: true
commonLabels:
stackspin.net/backupSet: "vikunja-extra"
global:
postgresql:
auth:
database: vikunja
username: vikunja
password: "${postgresql_password}"
postgresPassword: "${postgresql_admin_password}"
primary:
persistence:
existingClaim: vikunja-extra-postgres
podAnnotations:
backup.velero.io/backup-volumes: "data"
typesense:
enabled: false

View file

@ -5,3 +5,4 @@ metadata:
namespace: flux-system
data:
vikunja_domain: do.${domain}
vikunja_extra_domain: do.${domain_extra}