Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0db972f481 | ||
|
|
f0f455c7dd | ||
|
|
ede07b72e8 | ||
|
|
4662797118 | ||
|
|
505bfec45a | ||
|
|
a3b5811b83 | ||
|
|
f58f979b3b | ||
|
|
c4a3623e55 | ||
|
|
dd3693095f | ||
|
|
4273e62d68 | ||
|
|
5d8a582e1e |
@@ -42,7 +42,10 @@ 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) |
|
||||||
@@ -53,6 +56,7 @@ 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,53 @@
|
|||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: firefly-data-importer-auth
|
||||||
|
spec:
|
||||||
|
forwardAuth:
|
||||||
|
address: http://auth-proxy.auth-proxy.svc:80/auth
|
||||||
|
trustForwardHeader: true
|
||||||
|
authResponseHeaders:
|
||||||
|
- X-Auth-Request-User
|
||||||
|
- X-Auth-Request-Email
|
||||||
|
- X-Auth-Request-Groups
|
||||||
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: firefly-data-importer
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
# OAuth callback is intentionally public. Data Importer validates both the
|
||||||
|
# state parameter and its browser session before exchanging the code.
|
||||||
|
- match: Host(`import.hexor.cy`) && Path(`/eb-callback`)
|
||||||
|
kind: Rule
|
||||||
|
priority: 200
|
||||||
|
services:
|
||||||
|
- name: firefly-data-importer
|
||||||
|
port: 80
|
||||||
|
# Everything else requires a valid auth-proxy session and group.
|
||||||
|
- match: Host(`import.hexor.cy`)
|
||||||
|
kind: Rule
|
||||||
|
priority: 100
|
||||||
|
middlewares:
|
||||||
|
- name: firefly-data-importer-auth
|
||||||
|
services:
|
||||||
|
- name: firefly-data-importer
|
||||||
|
port: 80
|
||||||
|
tls:
|
||||||
|
secretName: firefly-data-importer-tls
|
||||||
|
---
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Certificate
|
||||||
|
metadata:
|
||||||
|
name: firefly-data-importer-tls
|
||||||
|
spec:
|
||||||
|
secretName: firefly-data-importer-tls
|
||||||
|
issuerRef:
|
||||||
|
name: letsencrypt
|
||||||
|
kind: ClusterIssuer
|
||||||
|
dnsNames:
|
||||||
|
- import.hexor.cy
|
||||||
|
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
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
|
||||||
@@ -46,4 +46,40 @@ 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: |-
|
||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
{{ .private_key | replace "-----BEGIN PRIVATE KEY-----" "" | replace "-----END PRIVATE KEY-----" "" | replace " " "" | trim }}
|
||||||
|
-----END PRIVATE KEY-----
|
||||||
|
data:
|
||||||
|
- secretKey: app_id
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: vaultwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: a1867c81-715c-47cd-978d-14ea5bcedea9
|
||||||
|
property: fields[3].value
|
||||||
|
- secretKey: private_key
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: vaultwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: a1867c81-715c-47cd-978d-14ea5bcedea9
|
||||||
|
property: fields[4].value
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ kind: Kustomization
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
- app.yaml
|
- app.yaml
|
||||||
|
- data-importer.yaml
|
||||||
|
- data-importer-ingress.yaml
|
||||||
- external-secrets.yaml
|
- external-secrets.yaml
|
||||||
- postgres.yaml
|
- postgres.yaml
|
||||||
- storage.yaml
|
- storage.yaml
|
||||||
@@ -21,7 +23,7 @@ helmCharts:
|
|||||||
|
|
||||||
patches:
|
patches:
|
||||||
# Chart 0.1.2 requires postgres.enabled=true. Remove its StatefulSet and
|
# Chart 0.1.2 requires postgres.enabled=true. Remove its StatefulSet and
|
||||||
# redirect the generated database Service to the CloudNativePG primary.
|
# make the generated database Service select the CloudNativePG instance.
|
||||||
- target:
|
- target:
|
||||||
group: apps
|
group: apps
|
||||||
version: v1
|
version: v1
|
||||||
@@ -38,14 +40,10 @@ patches:
|
|||||||
kind: Service
|
kind: Service
|
||||||
name: firefly-iii-postgres
|
name: firefly-iii-postgres
|
||||||
patch: |-
|
patch: |-
|
||||||
- op: remove
|
|
||||||
path: /spec/selector
|
|
||||||
- op: replace
|
- op: replace
|
||||||
path: /spec/type
|
path: /spec/selector
|
||||||
value: ExternalName
|
value:
|
||||||
- op: add
|
cnpg.io/cluster: firefly-postgres
|
||||||
path: /spec/externalName
|
|
||||||
value: firefly-postgres-rw.firefly-iii.svc.cluster.local
|
|
||||||
# The upstream chart does not expose scheduling settings for its CronJob.
|
# The upstream chart does not expose scheduling settings for its CronJob.
|
||||||
- target:
|
- target:
|
||||||
group: batch
|
group: batch
|
||||||
@@ -53,6 +51,15 @@ patches:
|
|||||||
kind: CronJob
|
kind: CronJob
|
||||||
name: firefly-iii-cron
|
name: firefly-iii-cron
|
||||||
patch: |-
|
patch: |-
|
||||||
|
- op: add
|
||||||
|
path: /spec/concurrencyPolicy
|
||||||
|
value: Forbid
|
||||||
|
- op: add
|
||||||
|
path: /spec/jobTemplate/spec/backoffLimit
|
||||||
|
value: 1
|
||||||
|
- op: add
|
||||||
|
path: /spec/jobTemplate/spec/activeDeadlineSeconds
|
||||||
|
value: 600
|
||||||
- op: add
|
- op: add
|
||||||
path: /spec/jobTemplate/spec/template/spec/nodeSelector
|
path: /spec/jobTemplate/spec/template/spec/nodeSelector
|
||||||
value:
|
value:
|
||||||
@@ -64,6 +71,16 @@ patches:
|
|||||||
operator: Equal
|
operator: Equal
|
||||||
value: ai
|
value: ai
|
||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
|
- op: replace
|
||||||
|
path: /spec/jobTemplate/spec/template/spec/containers/0/command
|
||||||
|
value:
|
||||||
|
- /bin/sh
|
||||||
|
- -ec
|
||||||
|
- >-
|
||||||
|
curl --fail --silent --show-error
|
||||||
|
--retry 30 --retry-delay 10 --retry-all-errors
|
||||||
|
--connect-timeout 5 --max-time 30
|
||||||
|
"http://firefly-iii:80/api/v1/cron/${STATIC_CRON_TOKEN}"
|
||||||
# A second independent filter in addition to ingressClassName.
|
# A second independent filter in addition to ingressClassName.
|
||||||
- target:
|
- target:
|
||||||
group: networking.k8s.io
|
group: networking.k8s.io
|
||||||
@@ -74,3 +91,11 @@ patches:
|
|||||||
- op: add
|
- op: add
|
||||||
path: /metadata/labels/firefly.hexor.cy~1private-ai
|
path: /metadata/labels/firefly.hexor.cy~1private-ai
|
||||||
value: "true"
|
value: "true"
|
||||||
|
# The shared Traefik has the same controller identifier and can discover
|
||||||
|
# IngressClass objects. The explicit annotation partitions this Ingress
|
||||||
|
# so only the instance configured with ingressclass=traefik-ai accepts it.
|
||||||
|
- op: add
|
||||||
|
path: /metadata/annotations/kubernetes.io~1ingress.class
|
||||||
|
value: traefik-ai
|
||||||
|
- op: remove
|
||||||
|
path: /spec/ingressClassName
|
||||||
|
|||||||
@@ -19,6 +19,14 @@ spec:
|
|||||||
matchLabels:
|
matchLabels:
|
||||||
app.kubernetes.io/instance: firefly-iii
|
app.kubernetes.io/instance: firefly-iii
|
||||||
app.kubernetes.io/name: firefly-iii
|
app.kubernetes.io/name: firefly-iii
|
||||||
|
- podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: firefly-data-importer
|
||||||
|
# hostNetwork traffic is seen as node traffic rather than Pod traffic.
|
||||||
|
- ipBlock:
|
||||||
|
cidr: 192.168.1.117/32
|
||||||
|
- ipBlock:
|
||||||
|
cidr: 100.77.155.120/32
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 8080
|
port: 8080
|
||||||
@@ -56,4 +64,35 @@ 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:
|
||||||
|
# Shared Traefik serves the public HTTPS importer.
|
||||||
|
- from:
|
||||||
|
- namespaceSelector:
|
||||||
|
matchLabels:
|
||||||
|
kubernetes.io/metadata.name: kube-system
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: traefik
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8080
|
||||||
|
# Keep node traffic allowed for probes and local diagnostics.
|
||||||
|
- from:
|
||||||
|
- ipBlock:
|
||||||
|
cidr: 192.168.1.117/32
|
||||||
|
- ipBlock:
|
||||||
|
cidr: 100.77.155.120/32
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8080
|
||||||
|
|||||||
@@ -114,6 +114,8 @@ spec:
|
|||||||
app.kubernetes.io/name: traefik-ai
|
app.kubernetes.io/name: traefik-ai
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: traefik-ai
|
serviceAccountName: traefik-ai
|
||||||
|
hostNetwork: true
|
||||||
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/hostname: ai.tail2fe2d.ts.net
|
kubernetes.io/hostname: ai.tail2fe2d.ts.net
|
||||||
tolerations:
|
tolerations:
|
||||||
@@ -126,7 +128,7 @@ spec:
|
|||||||
image: rancher/mirrored-library-traefik:3.6.13
|
image: rancher/mirrored-library-traefik:3.6.13
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
args:
|
args:
|
||||||
- --entrypoints.web.address=:8000
|
- --entrypoints.web.address=192.168.1.117:80
|
||||||
- --providers.kubernetesingress=true
|
- --providers.kubernetesingress=true
|
||||||
- --providers.kubernetesingress.namespaces=firefly-iii
|
- --providers.kubernetesingress.namespaces=firefly-iii
|
||||||
- --providers.kubernetesingress.ingressclass=traefik-ai
|
- --providers.kubernetesingress.ingressclass=traefik-ai
|
||||||
@@ -136,15 +138,18 @@ spec:
|
|||||||
- --log.level=INFO
|
- --log.level=INFO
|
||||||
ports:
|
ports:
|
||||||
- name: web
|
- name: web
|
||||||
containerPort: 8000
|
containerPort: 80
|
||||||
hostPort: 80
|
hostPort: 80
|
||||||
|
hostIP: 192.168.1.117
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
|
host: 192.168.1.117
|
||||||
port: web
|
port: web
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
|
host: 192.168.1.117
|
||||||
port: web
|
port: web
|
||||||
periodSeconds: 30
|
periodSeconds: 30
|
||||||
resources:
|
resources:
|
||||||
@@ -159,9 +164,12 @@ spec:
|
|||||||
capabilities:
|
capabilities:
|
||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
|
add:
|
||||||
|
- NET_BIND_SERVICE
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
runAsNonRoot: true
|
runAsNonRoot: false
|
||||||
runAsUser: 65532
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
securityContext:
|
securityContext:
|
||||||
seccompProfile:
|
seccompProfile:
|
||||||
type: RuntimeDefault
|
type: RuntimeDefault
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ persistence:
|
|||||||
existingClaim: firefly-uploads
|
existingClaim: firefly-uploads
|
||||||
|
|
||||||
# Must remain true because chart 0.1.2 validates it. Kustomize removes the
|
# Must remain true because chart 0.1.2 validates it. Kustomize removes the
|
||||||
# generated StatefulSet and redirects this Service to CloudNativePG.
|
# generated StatefulSet and makes this Service select the CloudNativePG Pod.
|
||||||
postgres:
|
postgres:
|
||||||
enabled: true
|
enabled: true
|
||||||
auth:
|
auth:
|
||||||
@@ -66,4 +66,3 @@ firefly:
|
|||||||
limits:
|
limits:
|
||||||
cpu: "2"
|
cpu: "2"
|
||||||
memory: 1Gi
|
memory: 1Gi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user