2026-03-16 18:58:35 +01:00
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: StatefulSet
|
|
|
|
|
metadata:
|
|
|
|
|
name: postgres
|
|
|
|
|
namespace: cameleer
|
|
|
|
|
spec:
|
|
|
|
|
serviceName: postgres
|
|
|
|
|
replicas: 1
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
|
|
|
|
app: postgres
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
|
|
|
|
app: postgres
|
|
|
|
|
spec:
|
|
|
|
|
containers:
|
|
|
|
|
- name: postgres
|
feat: remove TimescaleDB, dead PG stores, and storage feature flags
Complete the ClickHouse migration by removing all PostgreSQL analytics
code. PostgreSQL now serves only RBAC, config, and audit — all
observability data is exclusively in ClickHouse.
- Delete 6 dead PostgreSQL store classes (executions, stats, diagrams,
events, metrics, metrics-query) and 2 integration tests
- Delete RetentionScheduler (ClickHouse TTL handles retention)
- Remove all 7 cameleer.storage.* feature flags from application.yml
- Remove all @ConditionalOnProperty from ClickHouse beans in StorageBeanConfig
- Consolidate 14 Flyway migrations (V1-V14) into single clean V1 with
only RBAC/config/audit tables (no TimescaleDB, no analytics tables)
- Switch from timescale/timescaledb-ha:pg16 to postgres:16 everywhere
(docker-compose, deploy/postgres.yaml, test containers)
- Remove TimescaleDB check and /metrics-pipeline from DatabaseAdminController
- Set clickhouse.enabled default to true
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 20:10:58 +02:00
|
|
|
image: postgres:16
|
2026-03-16 18:58:35 +01:00
|
|
|
ports:
|
|
|
|
|
- containerPort: 5432
|
|
|
|
|
name: postgres
|
|
|
|
|
env:
|
|
|
|
|
- name: POSTGRES_DB
|
|
|
|
|
value: cameleer3
|
|
|
|
|
- name: POSTGRES_USER
|
|
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
name: postgres-credentials
|
|
|
|
|
key: POSTGRES_USER
|
|
|
|
|
- name: POSTGRES_PASSWORD
|
|
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
name: postgres-credentials
|
|
|
|
|
key: POSTGRES_PASSWORD
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: data
|
2026-03-17 01:00:20 +01:00
|
|
|
mountPath: /home/postgres/pgdata
|
2026-03-16 18:58:35 +01:00
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
memory: "1Gi"
|
|
|
|
|
cpu: "200m"
|
|
|
|
|
limits:
|
|
|
|
|
memory: "4Gi"
|
|
|
|
|
cpu: "1000m"
|
|
|
|
|
livenessProbe:
|
|
|
|
|
exec:
|
|
|
|
|
command:
|
|
|
|
|
- pg_isready
|
|
|
|
|
- -U
|
|
|
|
|
- cameleer
|
|
|
|
|
- -d
|
|
|
|
|
- cameleer3
|
|
|
|
|
initialDelaySeconds: 15
|
|
|
|
|
periodSeconds: 10
|
|
|
|
|
timeoutSeconds: 3
|
|
|
|
|
failureThreshold: 3
|
|
|
|
|
readinessProbe:
|
|
|
|
|
exec:
|
|
|
|
|
command:
|
|
|
|
|
- pg_isready
|
|
|
|
|
- -U
|
|
|
|
|
- cameleer
|
|
|
|
|
- -d
|
|
|
|
|
- cameleer3
|
|
|
|
|
initialDelaySeconds: 5
|
|
|
|
|
periodSeconds: 5
|
|
|
|
|
timeoutSeconds: 3
|
|
|
|
|
failureThreshold: 3
|
|
|
|
|
volumeClaimTemplates:
|
|
|
|
|
- metadata:
|
|
|
|
|
name: data
|
|
|
|
|
spec:
|
|
|
|
|
accessModes: ["ReadWriteOnce"]
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
storage: 10Gi
|
|
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: Service
|
|
|
|
|
metadata:
|
|
|
|
|
name: postgres
|
|
|
|
|
namespace: cameleer
|
|
|
|
|
spec:
|
|
|
|
|
clusterIP: None
|
|
|
|
|
selector:
|
|
|
|
|
app: postgres
|
|
|
|
|
ports:
|
|
|
|
|
- port: 5432
|
|
|
|
|
targetPort: 5432
|
|
|
|
|
name: postgres
|
2026-03-17 01:00:20 +01:00
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: Service
|
|
|
|
|
metadata:
|
|
|
|
|
name: postgres-external
|
|
|
|
|
namespace: cameleer
|
|
|
|
|
spec:
|
|
|
|
|
type: NodePort
|
|
|
|
|
selector:
|
|
|
|
|
app: postgres
|
|
|
|
|
ports:
|
|
|
|
|
- port: 5432
|
|
|
|
|
targetPort: 5432
|
|
|
|
|
nodePort: 30432
|