infisical: bring self-hosted stack under GitOps (postgres, valkey, backend); secret.yaml excluded template

This commit is contained in:
2026-07-16 21:47:28 +02:00
parent 1d026f8d57
commit 37737670b5
11 changed files with 248 additions and 30 deletions

View File

@@ -0,0 +1,64 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: infisical-postgres
namespace: infisical
spec:
serviceName: infisical-postgres
replicas: 1
selector:
matchLabels:
app: infisical-postgres
template:
metadata:
labels:
app: infisical-postgres
spec:
containers:
- name: postgres
image: postgres:14-alpine
ports:
- containerPort: 5432
env:
# Keep data in a subdir so an RWO volume's lost+found doesn't block initdb
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: infisical-secrets
key: POSTGRES_USER
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: infisical-secrets
key: POSTGRES_PASSWORD
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: infisical-secrets
key: POSTGRES_DB
volumeMounts:
- name: data
mountPath: /var/lib/postgresql/data
readinessProbe:
exec:
command: ["sh", "-c", "pg_isready -U $POSTGRES_USER -d $POSTGRES_DB"]
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 10
failureThreshold: 10
livenessProbe:
exec:
command: ["sh", "-c", "pg_isready -U $POSTGRES_USER -d $POSTGRES_DB"]
initialDelaySeconds: 30
periodSeconds: 15
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: longhorn
resources:
requests:
storage: 8Gi