c85c0068a2
- Replace all datetime.utcnow() with datetime.now(tz=timezone.utc) across 8 files - Fix 12 failing tests to match current implementation behavior - Fix pytest_plugins in non-top-level conftest (moved to root conftest.py) - Auto-fix 189 lint issues (import sorting, unused imports) - Add CI/CD pipeline infrastructure (ARC, ArgoCD, Kargo manifests) - Add values-beta.yaml and values-paper.yaml for staged deployments - Update GitHub Actions workflow to use self-hosted-gremlin runners - Add integration-test job to CI pipeline Result: 1596 passed, 0 failed, 0 warnings
109 lines
2.7 KiB
YAML
109 lines
2.7 KiB
YAML
# PostgreSQL 16 — Ephemeral instance for integration tests
|
|
# Namespace is substituted at runtime via envsubst
|
|
# Migrations are loaded from a ConfigMap mounted into /docker-entrypoint-initdb.d/
|
|
#
|
|
# Before applying this manifest, create the migrations ConfigMap:
|
|
# kubectl create configmap postgres-migrations \
|
|
# --from-file=infra/migrations/ \
|
|
# -n ${NAMESPACE}
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: postgres
|
|
namespace: ${NAMESPACE}
|
|
labels:
|
|
app: postgres
|
|
tier: infra
|
|
app.kubernetes.io/part-of: stonks-oracle
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: postgres
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: postgres
|
|
tier: infra
|
|
spec:
|
|
automountServiceAccountToken: false
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 999
|
|
runAsGroup: 999
|
|
fsGroup: 999
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: postgres
|
|
image: postgres:16-alpine
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 5432
|
|
protocol: TCP
|
|
env:
|
|
- name: POSTGRES_USER
|
|
value: "stonks"
|
|
- name: POSTGRES_PASSWORD
|
|
value: "inttest"
|
|
- name: POSTGRES_DB
|
|
value: "stonks"
|
|
- name: PGDATA
|
|
value: "/var/lib/postgresql/data/pgdata"
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop: ["ALL"]
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 5432
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
failureThreshold: 6
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 5432
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 10
|
|
timeoutSeconds: 3
|
|
failureThreshold: 3
|
|
volumeMounts:
|
|
- name: pgdata
|
|
mountPath: /var/lib/postgresql/data
|
|
- name: migrations
|
|
mountPath: /docker-entrypoint-initdb.d
|
|
readOnly: true
|
|
volumes:
|
|
- name: pgdata
|
|
emptyDir:
|
|
sizeLimit: 1Gi
|
|
- name: migrations
|
|
configMap:
|
|
name: postgres-migrations
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: postgres
|
|
namespace: ${NAMESPACE}
|
|
labels:
|
|
app: postgres
|
|
tier: infra
|
|
app.kubernetes.io/part-of: stonks-oracle
|
|
spec:
|
|
selector:
|
|
app: postgres
|
|
ports:
|
|
- port: 5432
|
|
targetPort: 5432
|
|
protocol: TCP
|