chore: move trilium to volsync PVCs

This commit is contained in:
SeanOMik 2024-10-17 16:19:14 -04:00
parent 601675952f
commit 360c812371
Signed by: SeanOMik
GPG Key ID: FEC9E2FC15235964
5 changed files with 95 additions and 51 deletions

View File

@ -3,7 +3,7 @@ kind: Kustomization
resources: resources:
- ./fireflyiii/ks.yaml - ./fireflyiii/ks.yaml
- ./cdn - ./cdn
- ./trilium - ./trilium/ks.yaml
- ./mealie/ks.yaml - ./mealie/ks.yaml
- ./huginn - ./huginn
- ../../../common/apps/exim/ks.yaml - ../../../common/apps/exim/ks.yaml

View File

@ -0,0 +1,61 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: trilium
namespace: default
spec:
interval: 5m
chart:
spec:
chart: app-template
version: 3.4.0
sourceRef:
kind: HelmRepository
name: bjws-charts
namespace: flux-system
values:
controllers:
main:
containers:
main:
image:
repository: ghcr.io/zadam/trilium
tag: 0.63.7
env:
TRILIUM_PORT: &port 8080
service:
app:
controller: main
ports:
http:
port: *port
ingress:
main:
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
hosts:
- host: "notes.${SECRET_NEW_DOMAIN}"
paths:
- path: /
service:
identifier: app
port: http
persistence:
data:
existingClaim: trilium
globalMounts:
- path: /home/node/trilium-data
temp:
type: persistentVolumeClaim
storageClass: openebs-zfs-mainpool
accessMode: ReadWriteOnce
size: 2G
globalMounts:
- path: /home/node/trilium-data/log
subPath: log
- path: /home/node/trilium-data/sessions
subPath: sessions
- path: /home/node/trilium-data/backup
subPath: backup

View File

@ -1,4 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- ../../../../../common/templates/volsync
- ./helm-release.yaml - ./helm-release.yaml

View File

@ -1,50 +0,0 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: trilium
namespace: default
spec:
interval: 5m
chart:
spec:
chart: app-template
version: 1.3.x
sourceRef:
kind: HelmRepository
name: bjws-charts
namespace: flux-system
values:
image:
repository: ghcr.io/zadam/trilium
tag: 0.63.7
env:
TRILIUM_PORT: &port 8080
service:
main:
ports:
http:
port: *port
ingress:
main:
enabled: true
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
hosts:
- host: &host "notes.${SECRET_NEW_DOMAIN}"
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- *host
persistence:
storage:
enabled: true
type: hostPath
hostPath: /mnt/MainPool/Kubernetes/trilium
mountPath: /home/node/trilium-data

View File

@ -0,0 +1,32 @@
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app trilium
namespace: flux-system
spec:
timeout: 5m
interval: 10m
targetNamespace: default
path: ./kubernetes/main/apps/default/trilium/app
prune: true
sourceRef:
kind: GitRepository
name: home-cluster
decryption:
provider: sops
secretRef:
name: sops-gpg
dependsOn:
- name: openebs
- name: openebs-sc
- name: volsync
postBuild:
substituteFrom:
- kind: ConfigMap
name: cluster-settings
- kind: Secret
name: cluster-secrets
substitute:
APP: *app
VOLSYNC_CAPACITY: 5Gi