From 8b465d32846dd4a44109b49df900f80e1297029f Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Sat, 4 May 2024 22:00:00 -0400 Subject: [PATCH] Add firefly --- firefly-iii/catagorize-ai-sealed-secret.yaml | 15 ++ firefly-iii/catagorize-ai-service.yaml | 13 ++ firefly-iii/catagorize-ai.yaml | 35 ++++ firefly-iii/helmrelease-firefly-iii.yaml | 173 +++++++++++++++++++ firefly-iii/sealed-secret.yaml | 17 ++ 5 files changed, 253 insertions(+) create mode 100644 firefly-iii/catagorize-ai-sealed-secret.yaml create mode 100644 firefly-iii/catagorize-ai-service.yaml create mode 100644 firefly-iii/catagorize-ai.yaml create mode 100644 firefly-iii/helmrelease-firefly-iii.yaml create mode 100644 firefly-iii/sealed-secret.yaml diff --git a/firefly-iii/catagorize-ai-sealed-secret.yaml b/firefly-iii/catagorize-ai-sealed-secret.yaml new file mode 100644 index 0000000..ef20a22 --- /dev/null +++ b/firefly-iii/catagorize-ai-sealed-secret.yaml @@ -0,0 +1,15 @@ +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + creationTimestamp: null + name: firefly-iii-ai + namespace: firefly-ns +spec: + encryptedData: + FIREFLY_PERSONAL_TOKEN: AgDimybAXS9nGY5qbE+YXcWklHXrl6aOTl3dC2pZGEQ5abwbE7H7vsccOMJWPhfbT/x0/gK63qEQeucu3CB8va+QKRF82DE1h9TNe++hjneKl51htDAG8wnzpyLZfQIRMrmYejjC2t1ID3ti5JXVwfzrMwge9bsx5FLSBZQJbTy74gNRBU/q+zz2bvcRXKmQS5kocUBsmJXGBKYYreVd8qAA1eEb13YQYllZ+iJXFmJqYoK/pkYuQO1ClzZHLMA1AIWVughhvQeOmvfNXxm7hMopTHMMRdeXFuGnv1J45ktE0YYInnlGrJoJY3hjRNlWy+fQgqzA0IfcIVF58w2A29pL5oXr+J5v5grAr6gm60Xm+P/c8uRMQeQ9Yv6W3L+mG9ECr9DhNCvAdadGAyK1oVYUoJ1AISMLTbGkQ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XY5Mx81AMvyD49V6DnRH8az1zaxcexvyC/m+4UEqm4Aw8REIf5sogH4Kpu2pKXW/ZrDMI27zyjammG9EF3AGo9Wi2ND8JJH0j4GJXu2auGDrENdJZaM6qDVauYrDFMVw9jj+ZlMLqUd797qMEYDP64ai4VjXXAj2Q4qS4F6wGu29jrHQK8tWeQx5hxl0pwlfUd5i7NyUjGczGaniXelpmQ3Lcpzp/HIXQd+4= + template: + metadata: + creationTimestamp: null + name: firefly-iii-ai + namespace: firefly-ns diff --git a/firefly-iii/catagorize-ai-service.yaml b/firefly-iii/catagorize-ai-service.yaml new file mode 100644 index 0000000..e519457 --- /dev/null +++ b/firefly-iii/catagorize-ai-service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: catagorize-ai-service + namespace: firefly-ns +spec: + selector: + app: firefly-iii + ports: + - protocol: TCP + port: 3000 + targetPort: 3000 + type: ClusterIP diff --git a/firefly-iii/catagorize-ai.yaml b/firefly-iii/catagorize-ai.yaml new file mode 100644 index 0000000..1bb0939 --- /dev/null +++ b/firefly-iii/catagorize-ai.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: catagorize-ai + namespace: firefly-ns +spec: + replicas: 1 + selector: + matchLabels: + app: firefly-iii + template: + metadata: + labels: + app: firefly-iii + spec: + containers: + - name: catagorize-ai + image: ghcr.io/bahuma20/firefly-iii-ai-categorize + ports: + - containerPort: 3000 + env: + - name: FIREFLY_URL + value: https://money.clortox.com + - name: ENABLE_UI + value: "true" + - name: FIREFLY_PERSONAL_TOKEN + valueFrom: + secretKeyRef: + name: firefly-iii-ai + key: FIREFLY_PERSONAL_TOKEN + - name: OPENAI_API_KEY + valueFrom: + secretKeyRef: + name: firefly-iii-ai + key: OPENAI diff --git a/firefly-iii/helmrelease-firefly-iii.yaml b/firefly-iii/helmrelease-firefly-iii.yaml new file mode 100644 index 0000000..8bb16d5 --- /dev/null +++ b/firefly-iii/helmrelease-firefly-iii.yaml @@ -0,0 +1,173 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: firefly + namespace: firefly-ns +spec: + chart: + spec: + chart: firefly-iii + sourceRef: + kind: HelmRepository + name: firefly-iii + namespace: flux-system + interval: 15m0s + timeout: 5m + releaseName: firefly-iii + values: + replicaCount: 1 + + image: + repository: "fireflyiii/core" + pullPolicy: IfNotPresent + tag: version-6.1.6 + + imagePullSecrets: [] + nameOverride: "" + fullnameOverride: "" + + persistence: + # -- If you set this to false, uploaded attachments are not stored persistently and will be lost with every restart of the pod + enabled: true + storageClassName: "longhorn" + accessModes: ReadWriteMany + storage: 20Gi + # -- If you want to use an existing claim, set it here + existingClaim: "" + + # -- Environment variables for Firefly III. See docs at: https://github.com/firefly-iii/firefly-iii/blob/main/.env.example + config: + # -- Set this to the name of a secret to load environment variables from. If defined, values in the secret will override values in config.env + existingSecret: "firefly-iii-secret" + + # -- Set environment variables from configMaps or Secrets + envValueFrom: {} + + # -- Directly defined environment variables. Use this for non-secret configuration values. + env: + DB_HOST: postgresql.postgresql-system.svc.cluster.local + DB_CONNECTION: pgsql + DB_PORT: "5432" + DB_DATABASE: firefly + DB_USERNAME: firefly + DEFAULT_LANGUAGE: "en_US" + DEFAULT_LOCALE: "equal" + TZ: "America/New_York" + TRUSTED_PROXIES: "**" + APP_URL: "https://money.clortox.com" + AUTHENTICATION_GUARD: "remote_user_guard" + AUTHENTICATION_GUARD_HEADER: "X-authentik-email" + + + # -- Create a new Secret from values file to store sensitive environment variables. Make sure to keep your secrets encrypted in the repository! For example, you can use the 'helm secrets' plugin (https://github.com/jkroepke/helm-secrets) to encrypt and manage secrets. If the 'config.existingSecret' value is set, a new Secret will not be created. + secrets: + env: + APP_PASSWORD: "CHANGE_ENCRYPT_ME" + DB_PASSWORD: "CHANGE_ENCRYPT_ME" + + # -- A cronjob for [recurring Firefly III tasks](https://docs.firefly-iii.org/firefly-iii/advanced-installation/cron/). + cronjob: + # -- Set to true to enable the CronJob. Note that you need to specify either cronjob.auth.existingSecret or cronjob.auth.token for it to actually be deployed. + enabled: false + + # -- Authorization for the CronJob. See https://docs.firefly-iii.org/firefly-iii/advanced-installation/cron/#request-a-page-over-the-web + auth: + # -- The name of a secret containing a data.token field with the cronjob token + existingSecret: "" + + # -- The name of the key in the existing secret to get the cronjob token from + secretKey: "token" + + # -- The token in plain text + token: "" + + # -- Annotations for the CronJob + annotations: {} + + # -- When to run the CronJob. Defaults to 03:00 as this is when Firefly III executes regular tasks. + schedule: "0 3 * * *" + + # -- How many pods to keep around for successful jobs + successfulJobsHistoryLimit: 3 + + # -- How many pods to keep around for failed jobs + failedJobsHistoryLimit: 1 + + # -- How to treat failed jobs + restartPolicy: OnFailure + + image: + repository: curlimages/curl + pullPolicy: IfNotPresent + tag: 7.81.0 + + imagePullSecrets: [] + + podAnnotations: {} + + securityContext: {} + + podSecurityContext: {} + + resources: {} + + nodeSelector: {} + + tolerations: [] + + affinity: {} + + podAnnotations: {} + + podSecurityContext: {} + # fsGroup: 2000 + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + service: + type: LoadBalancer + port: 80 + + ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - chart-example.local + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + + resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + nodeSelector: {} + + tolerations: [] + + affinity: {} diff --git a/firefly-iii/sealed-secret.yaml b/firefly-iii/sealed-secret.yaml new file mode 100644 index 0000000..68e02b0 --- /dev/null +++ b/firefly-iii/sealed-secret.yaml @@ -0,0 +1,17 @@ +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + creationTimestamp: null + name: firefly-iii-secret + namespace: firefly-ns +spec: + encryptedData: + APP_KEY: AgCSE+/lOiQJV3HE/UiAzeIXc2hgOMY95RSUO8Q22sK+R6WdpLcc0/gkxhOYtAdFGp1r9TIQQcWcbR2cEZ84GsnhoNJxh2vgaME+g5m0EgzQouczW/GTR56qfu/P+zp/IlIjepJVeAhVAOAInLDn/XUJf6kXyfWG7kHLhB/CHI6P0VC1RcHXAjkArDmpn5wOwDzVSMOCWszd6BXjl/LacRPkC58Oj4GCIlEqXo1meBJ7Lc6IG+x7VSjNv19xKVFqULt/Aep2YowIf3TPlQDhkv39Rro434dzm9q/M88JndE6sOqw1MTO+QqPPSUKPDSTWwD72FV4rmVkeXiTKtvMLlAWywQIOFL7ZIVJ50DjYgWV/tx3xz81lnfgwtFa6cT1OwUOfLrAEAe4iF/3hzgY1dfTMB7eKbY+XGpGvrcqAImfcBfMwc2wqSWj7FA3V5qOwrfeObDE96nvOuDyUqgPgzyyG6JZwkM1R9pgTABbG3sEkbtyxLQfJftooKtQ3obDsP56aS9uzfZ0rsZpT6Ek7fNd9dqG0XEqDOjNgOxW8aCJBq+Uy9Pbvx9e0flBwXJM0FV963ql7b4i5vrG5IuBC/CC5t1qPwaQPd/fMARjF8hIjhcfF8lnwFzT5vYRHIaky68U2u7gUx91vkiM5X3W8G3N4TX9kZI8QKr0pHcMy3zdM4ou95qUrhr6s/BYrULKjtZ4jucVRoX1PXa+D/laa6qk0Di0iw9S+KMdni5XK+If5A== + APP_PASSWORD: AgBPGz6DZ4R5L/MnGFbEu91VtBnuT4XiV1h2LGCwg5XTtlPcaB4EgNTQqFihAqt1GbHjGnJeaNMLgTVRXUuVJgklZ7Si4MGeBOhcUaIkuxa/7/p9I0n1mHYKlic+c7oRUMP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rKD0oG1fNscP4jvvvXIKJ9IDEghPUmd+w3C4stIwsICgpUTGTytHQ1lUzL6OebBiQjXWablwEGbtcFWhqAx07esuFpe2hx4+6HDNpEG5MH7T2/IUrwBS1vrlD4OgzT/TKT2bwjuy62ralrr7CmPcbcqax7pfkpnjK3kDna85xz4JIC4/nguqVqztjTkk7fSxDckAFlp/WLvjwvG7byU3gbQX1Y1X9O8bELvLGA+QuaZ3mMYJNEtyi3lx/RVuiO139PQOfVwrK4jsTjhxp5xxn0dk02haVWlDBg15Mb85D8mn9sA== + STATIC_CRON_TOKEN: AgBkzS4jR9phFQ/LLfwETTQM30sbLO63nNVkdUcmoZJQb85iuNtn9Ji7ROdIFyFCgWeBygOPGtrSXYlnFf3YIfdM+tXOJ9YtYRX78pqCr4mm84ZpNAir2VTMRLQDbrtqejv6LQNPkrRPpC+Xia/nUiqoGo2RFi66ypheegH7DNW1gHHxZibpiFvrwxudYj1q5rFNvw3NMwb6sJZ6FfJyKhMoKlQIJ1P+H2YoqAWU29hFiP1ZCZJ4j8+2cfaKiImlHsmGuTkuZuUi+0F8vCSUncSOtNMXJpD3XYFqexcefalls7OZJ/U4gD8LAS6kMZwBqRsCgKFKXTSpQwFW8L01xXrb6NQyPdnItO1IRg/65BJQeFdSMzgfAGec22+MBRNbJc9y2mw3iKUxPf42y+Gij/8Th9kLA9pmX8NYcBaIBCXbv3B/9O8FEDsf62XaREG1mwU3wEP1HZ6YeWEeRCR6+0MCGUWrVQK6pAS8uWQPDz1LkoKqjnMsa5OsHnmi211KUAqOV7vDOGu0gKF3t035ojfoGiHO8XgLLd2viHH0t5iaRWtWLV46UuA4uLgIwrQtw+0IQnLfb5xaIQet9zQacBIi7t2eelJvvgkdyAJ2lqexQMrHzicKjvfJQ1BbHtK1Lsisw77jvARF71IywC18fHmr0e+zK1obSva3+dPthu36xCCuoJiZ2E9GmvMkveNA0qMQYavct497T7w0iR71p3k80hOsVGIRnqUaTGifzNJNfg== + template: + metadata: + creationTimestamp: null + name: firefly-iii-secret + namespace: firefly-ns