gongme: k8s Manifeste fuer initialen Cluster-Deploy
Namespace, StorageClass (Longhorn), Postgres, API, Web, OAuth2-Proxy (Zitadel OIDC) und Traefik-Ingress fuer https://gongme.expertfab.de. Images: git.expertfab.de/expertfab/ef-gongme-{api,web}:latest Auth: Zitadel hinter OAuth2-Proxy v7.7.1 TLS: cert-manager letsencrypt-ClusterIssuer secret-oauth2.yaml enthaelt Platzhalter — CLIENT_ID/SECRET muessen nach Zitadel-App-Anlage eingetragen werden. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
93
k8s/gongme/postgres.yaml
Normal file
93
k8s/gongme/postgres.yaml
Normal file
@@ -0,0 +1,93 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: gongme-postgres
|
||||
namespace: gongme
|
||||
type: Opaque
|
||||
stringData:
|
||||
POSTGRES_DB: gongme
|
||||
POSTGRES_USER: gongme
|
||||
POSTGRES_PASSWORD: "gongme-prod-pw-change-me"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: gongme-postgres-data
|
||||
namespace: gongme
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
storageClassName: longhorn-gongme
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: gongme-postgres
|
||||
namespace: gongme
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gongme-postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: gongme-postgres
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:16-alpine
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: gongme-postgres
|
||||
env:
|
||||
- name: PGDATA
|
||||
value: /var/lib/postgresql/data/pgdata
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
startupProbe:
|
||||
exec:
|
||||
command: ["pg_isready", "-U", "gongme", "-d", "gongme"]
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
failureThreshold: 30
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["pg_isready", "-U", "gongme", "-d", "gongme"]
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["pg_isready", "-U", "gongme", "-d", "gongme"]
|
||||
periodSeconds: 30
|
||||
failureThreshold: 5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: gongme-postgres-data
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gongme-postgres
|
||||
namespace: gongme
|
||||
spec:
|
||||
selector:
|
||||
app: gongme-postgres
|
||||
ports:
|
||||
- port: 5432
|
||||
targetPort: 5432
|
||||
Reference in New Issue
Block a user