mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-08 09:54:43 +02:00
feat(ghostfolio): suivi de portefeuille sur k8s (PG s01 + Redis)
Nouvel app ArgoCD ghostfolio (namespace ai) : suivi/analyse de portefeuille boursier. Base PostgreSQL dédiée sur storage-01, Redis in-cluster pour le cache. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
0aa4c3650d
commit
4f1c03df08
8 changed files with 360 additions and 54 deletions
71
k8s/apps/ghostfolio/deployment.yaml
Normal file
71
k8s/apps/ghostfolio/deployment.yaml
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ghostfolio
|
||||
namespace: ai
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ghostfolio
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ghostfolio
|
||||
spec:
|
||||
containers:
|
||||
- name: ghostfolio
|
||||
image: ghostfolio/ghostfolio:latest
|
||||
ports:
|
||||
- containerPort: 3333
|
||||
env:
|
||||
# PostgreSQL sur storage-01 (hors cluster) — chaîne complète dans le secret
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: ghostfolio-secret
|
||||
key: database-url
|
||||
# Redis (in-cluster)
|
||||
- name: REDIS_HOST
|
||||
value: "ghostfolio-redis"
|
||||
- name: REDIS_PORT
|
||||
value: "6379"
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: ghostfolio-secret
|
||||
key: redis-password
|
||||
# Secrets applicatifs Ghostfolio
|
||||
- name: ACCESS_TOKEN_SALT
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: ghostfolio-secret
|
||||
key: access-token-salt
|
||||
- name: JWT_SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: ghostfolio-secret
|
||||
key: jwt-secret-key
|
||||
- name: PORT
|
||||
value: "3333"
|
||||
- name: TZ
|
||||
value: "Europe/Paris"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /api/v1/health
|
||||
port: 3333
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 15
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/v1/health
|
||||
port: 3333
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 30
|
||||
14
k8s/apps/ghostfolio/ingress.yaml
Normal file
14
k8s/apps/ghostfolio/ingress.yaml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: ghostfolio
|
||||
namespace: ai
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
routes:
|
||||
- match: Host(`ghostfolio.lab.local`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: ghostfolio
|
||||
port: 3333
|
||||
57
k8s/apps/ghostfolio/redis.yaml
Normal file
57
k8s/apps/ghostfolio/redis.yaml
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ghostfolio-redis
|
||||
namespace: ai
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ghostfolio-redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ghostfolio-redis
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:7-alpine
|
||||
args:
|
||||
- "--requirepass"
|
||||
- "$(REDIS_PASSWORD)"
|
||||
- "--maxmemory"
|
||||
- "128mb"
|
||||
- "--maxmemory-policy"
|
||||
- "allkeys-lru"
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
env:
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: ghostfolio-secret
|
||||
key: redis-password
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 250m
|
||||
memory: 192Mi
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["sh", "-c", "redis-cli -a \"$REDIS_PASSWORD\" ping | grep -q PONG"]
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ghostfolio-redis
|
||||
namespace: ai
|
||||
spec:
|
||||
selector:
|
||||
app: ghostfolio-redis
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
||||
11
k8s/apps/ghostfolio/service.yaml
Normal file
11
k8s/apps/ghostfolio/service.yaml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ghostfolio
|
||||
namespace: ai
|
||||
spec:
|
||||
selector:
|
||||
app: ghostfolio
|
||||
ports:
|
||||
- port: 3333
|
||||
targetPort: 3333
|
||||
Loading…
Add table
Add a link
Reference in a new issue