Add TimescaleDB (single instance, 10G PVC, no auth) in system namespace

This commit is contained in:
2026-08-16 22:06:48 +03:00
parent fd7c529255
commit f44e0dc4b2
2 changed files with 70 additions and 0 deletions
+65
View File
@@ -0,0 +1,65 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: timescaledb-data
namespace: system
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn
resources:
requests:
storage: 10Gi
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: timescaledb
namespace: system
spec:
serviceName: timescaledb
replicas: 1
selector:
matchLabels:
app: timescaledb
template:
metadata:
labels:
app: timescaledb
spec:
containers:
- name: timescaledb
image: timescale/timescaledb:2.29.1-pg16
env:
- name: POSTGRES_HOST_AUTH_METHOD
value: trust
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
ports:
- containerPort: 5432
name: postgres
volumeMounts:
- name: data
mountPath: /var/lib/postgresql/data
readinessProbe:
exec:
command: ["pg_isready", "-U", "postgres"]
initialDelaySeconds: 5
periodSeconds: 5
volumes:
- name: data
persistentVolumeClaim:
claimName: timescaledb-data
---
apiVersion: v1
kind: Service
metadata:
name: timescaledb
namespace: system
spec:
selector:
app: timescaledb
ports:
- port: 5432
targetPort: 5432