diff --git a/clusters/cl01tl/applications/actual/Chart.yaml b/clusters/cl01tl/applications/actual/Chart.yaml new file mode 100644 index 000000000..21a6ef7bd --- /dev/null +++ b/clusters/cl01tl/applications/actual/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: actual +version: 1.0.0 +description: Actual +keywords: + - actual + - budget +home: https://wiki.alexlebens.dev/s/86192f45-94b7-45de-872c-6ef3fec7df5e +sources: + - https://github.com/actualbudget/actual + - https://github.com/actualbudget/actual/pkgs/container/actual + - https://github.com/bjw-s-labs/helm-charts/tree/main/charts/other/app-template +maintainers: + - name: alexlebens +dependencies: + - name: app-template + alias: actual + repository: https://bjw-s-labs.github.io/helm-charts/ + version: 3.7.3 +icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/actual-budget.png +appVersion: v25.5.0 diff --git a/clusters/cl01tl/applications/actual/templates/external-secret.yaml b/clusters/cl01tl/applications/actual/templates/external-secret.yaml new file mode 100644 index 000000000..f6d535267 --- /dev/null +++ b/clusters/cl01tl/applications/actual/templates/external-secret.yaml @@ -0,0 +1,57 @@ +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: actual-data-backup-secret + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: actual-data-backup-secret + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: backup + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + secretStoreRef: + kind: ClusterSecretStore + name: vault + target: + template: + mergePolicy: Merge + engineVersion: v2 + data: + RESTIC_REPOSITORY: "{{ `{{ .BUCKET_ENDPOINT }}` }}/actual/actual-data" + data: + - secretKey: BUCKET_ENDPOINT + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /cl01tl/volsync/restic/config + metadataPolicy: None + property: S3_BUCKET_ENDPOINT + - secretKey: RESTIC_PASSWORD + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /cl01tl/volsync/restic/config + metadataPolicy: None + property: RESTIC_PASSWORD + - secretKey: AWS_DEFAULT_REGION + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /cl01tl/volsync/restic/config + metadataPolicy: None + property: AWS_DEFAULT_REGION + - secretKey: AWS_ACCESS_KEY_ID + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /digital-ocean/home-infra/volsync-backups + metadataPolicy: None + property: access_key + - secretKey: AWS_SECRET_ACCESS_KEY + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /digital-ocean/home-infra/volsync-backups + metadataPolicy: None + property: secret_key diff --git a/clusters/cl01tl/applications/actual/templates/http-route.yaml b/clusters/cl01tl/applications/actual/templates/http-route.yaml new file mode 100644 index 000000000..6a14e8d8c --- /dev/null +++ b/clusters/cl01tl/applications/actual/templates/http-route.yaml @@ -0,0 +1,30 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: http-route-actual + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: http-route-actual + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: web + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + parentRefs: + - group: gateway.networking.k8s.io + kind: Gateway + name: traefik-gateway + namespace: traefik + hostnames: + - actual.alexlebens.net + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - group: '' + kind: Service + name: actual + port: 80 + weight: 100 diff --git a/clusters/cl01tl/applications/actual/templates/replication-source.yaml b/clusters/cl01tl/applications/actual/templates/replication-source.yaml new file mode 100644 index 000000000..38f8b97a5 --- /dev/null +++ b/clusters/cl01tl/applications/actual/templates/replication-source.yaml @@ -0,0 +1,27 @@ +apiVersion: volsync.backube/v1alpha1 +kind: ReplicationSource +metadata: + name: actual-data-backup-source + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: actual-data-backup-source + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: backup + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + sourcePVC: actual-data + trigger: + schedule: 0 4 * * * + restic: + pruneIntervalDays: 7 + repository: actual-data-backup-secret + retain: + hourly: 1 + daily: 3 + weekly: 2 + monthly: 2 + yearly: 4 + copyMethod: Snapshot + storageClassName: ceph-block + volumeSnapshotClassName: ceph-blockpool-snapshot diff --git a/clusters/cl01tl/applications/actual/values.yaml b/clusters/cl01tl/applications/actual/values.yaml new file mode 100644 index 000000000..f937e7f9f --- /dev/null +++ b/clusters/cl01tl/applications/actual/values.yaml @@ -0,0 +1,57 @@ +actual: + controllers: + main: + type: deployment + replicas: 1 + strategy: Recreate + revisionHistoryLimit: 3 + containers: + main: + image: + repository: ghcr.io/actualbudget/actual + tag: 25.5.0 + pullPolicy: IfNotPresent + env: + - name: TZ + value: US/Central + resources: + requests: + cpu: 10m + memory: 128Mi + probes: + liveness: + enabled: false + custom: true + spec: + exec: + command: + - /usr/bin/env + - bash + - -c + - node src/scripts/health-check.js + failureThreshold: 5 + initialDelaySeconds: 60 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 10 + serviceAccount: + create: true + service: + main: + controller: main + ports: + http: + port: 80 + targetPort: 5006 + protocol: HTTP + persistence: + data: + storageClass: ceph-block + accessMode: ReadWriteOnce + size: 2Gi + retain: true + advancedMounts: + main: + main: + - path: /data + readOnly: false