Added firefly-iii open banking importer
This commit is contained in:
@@ -0,0 +1,128 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: firefly-data-importer
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: firefly-data-importer
|
||||||
|
annotations:
|
||||||
|
reloader.stakater.com/auto: "true"
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: firefly-data-importer
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: firefly-data-importer
|
||||||
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/hostname: ai.tail2fe2d.ts.net
|
||||||
|
tolerations:
|
||||||
|
- key: workload
|
||||||
|
operator: Equal
|
||||||
|
value: ai
|
||||||
|
effect: NoSchedule
|
||||||
|
containers:
|
||||||
|
- name: data-importer
|
||||||
|
image: fireflyiii/data-importer:version-2.3.4
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
env:
|
||||||
|
- name: FIREFLY_III_URL
|
||||||
|
value: http://firefly-iii
|
||||||
|
- name: VANITY_URL
|
||||||
|
value: http://ff.lan
|
||||||
|
- name: TRUSTED_PROXIES
|
||||||
|
value: "**"
|
||||||
|
- name: EXPECT_SECURE_URL
|
||||||
|
value: "false"
|
||||||
|
- name: VERIFY_TLS_SECURITY
|
||||||
|
value: "true"
|
||||||
|
- name: TZ
|
||||||
|
value: Europe/London
|
||||||
|
- name: APP_ENV
|
||||||
|
value: production
|
||||||
|
- name: APP_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: LOG_LEVEL
|
||||||
|
value: notice
|
||||||
|
- 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
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 30
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
memory: 512Mi
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
securityContext:
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: firefly-data-importer
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: firefly-data-importer
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: firefly-data-importer
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: firefly-data-importer
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: firefly-data-importer
|
||||||
|
firefly.hexor.cy/private-ai: "true"
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-ai
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: import.ff.lan
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: firefly-data-importer
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
|
||||||
@@ -46,4 +46,39 @@ spec:
|
|||||||
remoteRef:
|
remoteRef:
|
||||||
key: a1867c81-715c-47cd-978d-14ea5bcedea9
|
key: a1867c81-715c-47cd-978d-14ea5bcedea9
|
||||||
property: fields[2].value
|
property: fields[2].value
|
||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: firefly-data-importer-secrets
|
||||||
|
spec:
|
||||||
|
refreshInterval: 1h
|
||||||
|
target:
|
||||||
|
name: firefly-data-importer-secrets
|
||||||
|
creationPolicy: Owner
|
||||||
|
deletionPolicy: Delete
|
||||||
|
template:
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
ENABLE_BANKING_APP_ID: |-
|
||||||
|
{{ .app_id }}
|
||||||
|
ENABLE_BANKING_PRIVATE_KEY: |-
|
||||||
|
{{ .private_key }}
|
||||||
|
data:
|
||||||
|
# fields[0]: application UUID; fields[1]: complete PEM private key.
|
||||||
|
- secretKey: app_id
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: vaultwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: REPLACE_WITH_ENABLE_BANKING_BITWARDEN_ITEM_ID
|
||||||
|
property: fields[0].value
|
||||||
|
- secretKey: private_key
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: vaultwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: REPLACE_WITH_ENABLE_BANKING_BITWARDEN_ITEM_ID
|
||||||
|
property: fields[1].value
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ kind: Kustomization
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
- app.yaml
|
- app.yaml
|
||||||
|
- data-importer.yaml
|
||||||
- external-secrets.yaml
|
- external-secrets.yaml
|
||||||
- postgres.yaml
|
- postgres.yaml
|
||||||
- storage.yaml
|
- storage.yaml
|
||||||
|
|||||||
@@ -61,3 +61,24 @@ spec:
|
|||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 8000
|
port: 8000
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: firefly-data-importer-ingress
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: firefly-data-importer
|
||||||
|
policyTypes:
|
||||||
|
- Ingress
|
||||||
|
ingress:
|
||||||
|
# traefik-ai uses hostNetwork and is therefore seen as node traffic.
|
||||||
|
- from:
|
||||||
|
- ipBlock:
|
||||||
|
cidr: 192.168.1.117/32
|
||||||
|
- ipBlock:
|
||||||
|
cidr: 100.77.155.120/32
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8080
|
||||||
|
|||||||
Reference in New Issue
Block a user