From 3b6b744a0cd36b24f3392ce63165e0ebd7c24763 Mon Sep 17 00:00:00 2001 From: alexlebens Date: Tue, 28 May 2024 14:44:54 -0500 Subject: [PATCH] convert to use app-template, add typesense --- .../cl01tl/applications/vikunja/Chart.yaml | 11 +- .../vikunja/templates/external-secret.yaml | 7 + .../cl01tl/applications/vikunja/values.yaml | 232 ++++++++++++------ 3 files changed, 178 insertions(+), 72 deletions(-) diff --git a/clusters/cl01tl/applications/vikunja/Chart.yaml b/clusters/cl01tl/applications/vikunja/Chart.yaml index 0c52a2909..34fb166b9 100644 --- a/clusters/cl01tl/applications/vikunja/Chart.yaml +++ b/clusters/cl01tl/applications/vikunja/Chart.yaml @@ -7,9 +7,14 @@ sources: - https://github.com/bitnami/charts/tree/main/bitnami/redis - https://github.com/alexlebens/helm-charts/charts/postgres-cluster dependencies: - - name: vikunja - version: 0.4.3 - repository: oci://kolaente.dev/vikunja + - name: app-template + alias: vikunja + repository: https://bjw-s.github.io/helm-charts/ + version: 3.2.1 + - name: app-template + alias: typesense + repository: https://bjw-s.github.io/helm-charts/ + version: 3.2.1 - name: redis version: 19.5.0 repository: https://charts.bitnami.com/bitnami diff --git a/clusters/cl01tl/applications/vikunja/templates/external-secret.yaml b/clusters/cl01tl/applications/vikunja/templates/external-secret.yaml index b691ba6a7..782185be6 100644 --- a/clusters/cl01tl/applications/vikunja/templates/external-secret.yaml +++ b/clusters/cl01tl/applications/vikunja/templates/external-secret.yaml @@ -28,6 +28,13 @@ spec: key: /cl01tl/vikunja/config metadataPolicy: None property: redis-password + - secretKey: typesense-apikey + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /cl01tl/vikunja/config + metadataPolicy: None + property: typesense-apikey --- apiVersion: external-secrets.io/v1beta1 diff --git a/clusters/cl01tl/applications/vikunja/values.yaml b/clusters/cl01tl/applications/vikunja/values.yaml index 173b76e15..850aa90ae 100644 --- a/clusters/cl01tl/applications/vikunja/values.yaml +++ b/clusters/cl01tl/applications/vikunja/values.yaml @@ -1,71 +1,166 @@ vikunja: - api: - enabled: true - image: - repository: vikunja/api - tag: 0.22.1 - persistence: - data: - enabled: true - size: 10Gi - mountPath: /app/vikunja/files - storageClass: ceph-block - config: - type: secret - name: vikunja-config-secret - configMaps: - config: - enabled: false - ingress: - main: - enabled: false - env: - VIKUNJA_SERVICE_FRONTENDURL: https://vikunja.alexlebens.dev - VIKUNJA_SERVICE_ENABLEREGISTRATION: "false" - VIKUNJA_SERVICE_TIMEZONE: US/Central - VIKUNJA_REDIS_ENABLED: "true" - VIKUNJA_REDIS_HOST: vikunja-redis-headless:6379 - VIKUNJA_REDIS_PASSWORD: - valueFrom: - secretKeyRef: - name: vikunja-config-secret - key: redis-password - VIKUNJA_DATABASE_USER: - valueFrom: - secretKeyRef: - name: vikunja-postgresql-16-cluster-app - key: user - VIKUNJA_DATABASE_DATABASE: - valueFrom: - secretKeyRef: - name: vikunja-postgresql-16-cluster-app - key: dbname - VIKUNJA_DATABASE_HOST: - valueFrom: - secretKeyRef: - name: vikunja-postgresql-16-cluster-app - key: host - VIKUNJA_DATABASE_PASSWORD: - valueFrom: - secretKeyRef: - name: vikunja-postgresql-16-cluster-app - key: password - frontend: - enabled: true - image: - repository: vikunja/frontend - tag: 0.22.1 - env: - VIKUNJA_API_URL: https://vikunja-api.alexlebens.dev/api/v1/ - ingress: - main: - enabled: false - postgresql: - enabled: false - redis: - enabled: false - typesense: - enabled: false + controllers: + api: + type: deployment + replicas: 1 + strategy: Recreate + revisionHistoryLimit: 3 + containers: + main: + image: + repository: vikunja/api + tag: 0.22.1 + pullPolicy: IfNotPresent + env: + - name: VIKUNJA_SERVICE_FRONTENDURL + value: https://vikunja.alexlebens.dev + - name: VIKUNJA_SERVICE_ENABLEREGISTRATION + value: "false" + - name: VIKUNJA_SERVICE_TIMEZONE + value: US/Central + - name: VIKUNJA_REDIS_ENABLED + value: "true" + - name: VIKUNJA_REDIS_HOST + value: vikunja-redis-headless:6379 + - name: VIKUNJA_REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: vikunja-config-secret + key: redis-password + - name: VIKUNJA_TYPESENSE_ENABLED + value: "true" + - name: VIKUNJA_TYPESENSE_URL + value: http://typesense.vikunja:8108 + - name: VIKUNJA_TYPESENSE_APIKEY + valueFrom: + secretKeyRef: + name: vikunja-config-secret + key: typesense-apikey + - name: VIKUNJA_DATABASE_USER + valueFrom: + secretKeyRef: + name: vikunja-postgresql-16-cluster-app + key: user + - name: VIKUNJA_DATABASE_DATABASE + valueFrom: + secretKeyRef: + name: vikunja-postgresql-16-cluster-app + key: dbname + - name: VIKUNJA_DATABASE_HOST + valueFrom: + secretKeyRef: + name: vikunja-postgresql-16-cluster-app + key: host + - name: VIKUNJA_DATABASE_PASSWORD + valueFrom: + secretKeyRef: + name: vikunja-postgresql-16-cluster-app + key: password + resources: + requests: + cpu: 100m + memory: 256Mi + front: + type: deployment + replicas: 1 + strategy: Recreate + revisionHistoryLimit: 3 + containers: + main: + image: + repository: vikunja/frontend + tag: 0.22.1 + pullPolicy: IfNotPresent + env: + - name: VIKUNJA_API_URL + value: https://vikunja-api.alexlebens.dev/api/v1/ + resources: + requests: + cpu: 100m + memory: 256Mi + serviceAccount: + create: true + service: + api: + controller: api + ports: + http: + port: 3456 + targetPort: 3456 + protocol: HTTP + front: + controller: front + ports: + http: + port: 80 + targetPort: 80 + protocol: HTTP + persistence: + data: + storageClass: ceph-block + accessMode: ReadWriteOnce + size: 10Gi + retain: true + advancedMounts: + api: + main: + - path: /app/vikunja/files + readOnly: false + config: + enabled: true + type: secret + name: vikunja-config-secret + advancedMounts: + api: + main: + - path: /etc/vikunja/config.yml + readOnly: true + mountPropagation: None + subPath: config.yml +typesense: + controllers: + main: + type: deployment + replicas: 1 + strategy: Recreate + revisionHistoryLimit: 3 + containers: + main: + image: + repository: typesense/typesense + tag: 0.26.0 + pullPolicy: IfNotPresent + env: + - name: TYPESENSE_DATA_DIR + value: /data + - name: TYPESENSE_API_KEY + valueFrom: + secretKeyRef: + name: vikunja-config-secret + key: typesense-apikey + resources: + requests: + cpu: 100m + memory: 256Mi + service: + main: + controller: main + ports: + http: + port: 8108 + targetPort: 8108 + protocol: HTTP + persistence: + config: + storageClass: ceph-block + accessMode: ReadWriteOnce + size: 5Gi + retain: true + advancedMounts: + main: + main: + - path: /data + readOnly: false redis: architecture: standalone auth: @@ -77,8 +172,7 @@ cloudflared-api: existingSecretName: vikunja-cloudflared-api-secret cloudflared-front: name: cloudflared-front - existingSecretName: vikunja-cloudflared-front-secret - + existingSecretName: vikunja-cloudflared-front-secret postgres-16-cluster: mode: standalone kubernetesClusterName: cl01tl