Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1091d6bd14 | ||
|
|
9f56045009 | ||
|
|
2583236f6d |
@@ -42,10 +42,7 @@ ArgoCD homelab project
|
|||||||
|
|
||||||
| Application | Status |
|
| Application | Status |
|
||||||
| :--- | :---: |
|
| :--- | :---: |
|
||||||
| **amnezia** | [](https://ag.hexor.cy/applications/argocd/amnezia) |
|
|
||||||
| **comfyui** | [](https://ag.hexor.cy/applications/argocd/comfyui) |
|
| **comfyui** | [](https://ag.hexor.cy/applications/argocd/comfyui) |
|
||||||
| **doka2-lobby-list** | [](https://ag.hexor.cy/applications/argocd/doka2-lobby-list) |
|
|
||||||
| **firefly-iii** | [](https://ag.hexor.cy/applications/argocd/firefly-iii) |
|
|
||||||
| **furumi** | [](https://ag.hexor.cy/applications/argocd/furumi) |
|
| **furumi** | [](https://ag.hexor.cy/applications/argocd/furumi) |
|
||||||
| **gitea** | [](https://ag.hexor.cy/applications/argocd/gitea) |
|
| **gitea** | [](https://ag.hexor.cy/applications/argocd/gitea) |
|
||||||
| **greece-notifier** | [](https://ag.hexor.cy/applications/argocd/greece-notifier) |
|
| **greece-notifier** | [](https://ag.hexor.cy/applications/argocd/greece-notifier) |
|
||||||
@@ -56,7 +53,6 @@ ArgoCD homelab project
|
|||||||
| **k8s-secrets** | [](https://ag.hexor.cy/applications/argocd/k8s-secrets) |
|
| **k8s-secrets** | [](https://ag.hexor.cy/applications/argocd/k8s-secrets) |
|
||||||
| **khm** | [](https://ag.hexor.cy/applications/argocd/khm) |
|
| **khm** | [](https://ag.hexor.cy/applications/argocd/khm) |
|
||||||
| **lidarr** | [](https://ag.hexor.cy/applications/argocd/lidarr) |
|
| **lidarr** | [](https://ag.hexor.cy/applications/argocd/lidarr) |
|
||||||
| **llamacpp** | [](https://ag.hexor.cy/applications/argocd/llamacpp) |
|
|
||||||
| **matrix** | [](https://ag.hexor.cy/applications/argocd/matrix) |
|
| **matrix** | [](https://ag.hexor.cy/applications/argocd/matrix) |
|
||||||
| **mtproxy** | [](https://ag.hexor.cy/applications/argocd/mtproxy) |
|
| **mtproxy** | [](https://ag.hexor.cy/applications/argocd/mtproxy) |
|
||||||
| **n8n** | [](https://ag.hexor.cy/applications/argocd/n8n) |
|
| **n8n** | [](https://ag.hexor.cy/applications/argocd/n8n) |
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
apiVersion: batch/v1
|
||||||
|
kind: CronJob
|
||||||
|
metadata:
|
||||||
|
name: firefly-data-importer-sync
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: firefly-data-importer-sync
|
||||||
|
spec:
|
||||||
|
schedule: "17 */6 * * *"
|
||||||
|
timeZone: Europe/London
|
||||||
|
concurrencyPolicy: Forbid
|
||||||
|
startingDeadlineSeconds: 1800
|
||||||
|
successfulJobsHistoryLimit: 2
|
||||||
|
failedJobsHistoryLimit: 5
|
||||||
|
jobTemplate:
|
||||||
|
spec:
|
||||||
|
backoffLimit: 1
|
||||||
|
activeDeadlineSeconds: 1200
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: firefly-data-importer-sync
|
||||||
|
spec:
|
||||||
|
automountServiceAccountToken: false
|
||||||
|
restartPolicy: Never
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/hostname: ai.tail2fe2d.ts.net
|
||||||
|
tolerations:
|
||||||
|
- key: workload
|
||||||
|
operator: Equal
|
||||||
|
value: ai
|
||||||
|
effect: NoSchedule
|
||||||
|
containers:
|
||||||
|
- name: data-importer-sync
|
||||||
|
image: fireflyiii/data-importer:version-2.3.4
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- |-
|
||||||
|
php artisan importer:import /import/import.json
|
||||||
|
status=$?
|
||||||
|
if [ "${status}" -eq 73 ]; then
|
||||||
|
echo "No new transactions; considering the sync successful."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
exit "${status}"
|
||||||
|
env:
|
||||||
|
- name: FIREFLY_III_URL
|
||||||
|
value: http://firefly-iii
|
||||||
|
- name: VANITY_URL
|
||||||
|
value: http://ff.lan
|
||||||
|
- name: FIREFLY_III_ACCESS_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: firefly-data-importer-secrets
|
||||||
|
key: FIREFLY_III_ACCESS_TOKEN
|
||||||
|
- name: ENABLE_BANKING_APP_ID
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: firefly-data-importer-secrets
|
||||||
|
key: ENABLE_BANKING_APP_ID
|
||||||
|
- name: ENABLE_BANKING_PRIVATE_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: firefly-data-importer-secrets
|
||||||
|
key: ENABLE_BANKING_PRIVATE_KEY
|
||||||
|
- name: IMPORT_DIR_ALLOWLIST
|
||||||
|
value: /import
|
||||||
|
# Recurring imports intentionally overlap their date range.
|
||||||
|
# Keep rejecting duplicates, but do not fail the Job for them.
|
||||||
|
- name: IGNORE_DUPLICATE_ERRORS
|
||||||
|
value: "true"
|
||||||
|
- name: TZ
|
||||||
|
value: Europe/London
|
||||||
|
- name: APP_ENV
|
||||||
|
value: production
|
||||||
|
- name: APP_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: LOG_LEVEL
|
||||||
|
value: notice
|
||||||
|
volumeMounts:
|
||||||
|
- name: import-config
|
||||||
|
mountPath: /import
|
||||||
|
readOnly: true
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
memory: 512Mi
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
volumes:
|
||||||
|
- name: import-config
|
||||||
|
secret:
|
||||||
|
secretName: firefly-data-importer-secrets
|
||||||
|
items:
|
||||||
|
- key: import.json
|
||||||
|
path: import.json
|
||||||
|
securityContext:
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
@@ -66,6 +66,10 @@ spec:
|
|||||||
-----BEGIN PRIVATE KEY-----
|
-----BEGIN PRIVATE KEY-----
|
||||||
{{ .private_key | replace "-----BEGIN PRIVATE KEY-----" "" | replace "-----END PRIVATE KEY-----" "" | replace " " "" | trim }}
|
{{ .private_key | replace "-----BEGIN PRIVATE KEY-----" "" | replace "-----END PRIVATE KEY-----" "" | replace " " "" | trim }}
|
||||||
-----END PRIVATE KEY-----
|
-----END PRIVATE KEY-----
|
||||||
|
FIREFLY_III_ACCESS_TOKEN: |-
|
||||||
|
{{ .firefly_access_token }}
|
||||||
|
import.json: |-
|
||||||
|
{{ .import_config }}
|
||||||
data:
|
data:
|
||||||
- secretKey: app_id
|
- secretKey: app_id
|
||||||
sourceRef:
|
sourceRef:
|
||||||
@@ -83,3 +87,19 @@ spec:
|
|||||||
remoteRef:
|
remoteRef:
|
||||||
key: a1867c81-715c-47cd-978d-14ea5bcedea9
|
key: a1867c81-715c-47cd-978d-14ea5bcedea9
|
||||||
property: fields[4].value
|
property: fields[4].value
|
||||||
|
- secretKey: firefly_access_token
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: vaultwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: a1867c81-715c-47cd-978d-14ea5bcedea9
|
||||||
|
property: fields[6].value
|
||||||
|
- secretKey: import_config
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: vaultwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: a1867c81-715c-47cd-978d-14ea5bcedea9
|
||||||
|
property: fields[5].value
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- app.yaml
|
- app.yaml
|
||||||
- data-importer.yaml
|
- data-importer.yaml
|
||||||
|
- data-importer-sync.yaml
|
||||||
- data-importer-ingress.yaml
|
- data-importer-ingress.yaml
|
||||||
- external-secrets.yaml
|
- external-secrets.yaml
|
||||||
- postgres.yaml
|
- postgres.yaml
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ spec:
|
|||||||
- podSelector:
|
- podSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app.kubernetes.io/name: firefly-data-importer
|
app.kubernetes.io/name: firefly-data-importer
|
||||||
|
- podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: firefly-data-importer-sync
|
||||||
# hostNetwork traffic is seen as node traffic rather than Pod traffic.
|
# hostNetwork traffic is seen as node traffic rather than Pod traffic.
|
||||||
- ipBlock:
|
- ipBlock:
|
||||||
cidr: 192.168.1.117/32
|
cidr: 192.168.1.117/32
|
||||||
|
|||||||
Reference in New Issue
Block a user