From f44e0dc4b2d3f9f0edfa625f8f3e4cf5759b492f Mon Sep 17 00:00:00 2001 From: Mihai Cimpoesu Date: Sun, 16 Aug 2026 22:06:48 +0300 Subject: [PATCH] Add TimescaleDB (single instance, 10G PVC, no auth) in system namespace --- cluster-config/namespaces.yaml | 5 ++ workloads/timescaledb/timescaledb.yaml | 65 ++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 workloads/timescaledb/timescaledb.yaml diff --git a/cluster-config/namespaces.yaml b/cluster-config/namespaces.yaml index 2bc1137..8c1af23 100644 --- a/cluster-config/namespaces.yaml +++ b/cluster-config/namespaces.yaml @@ -12,3 +12,8 @@ apiVersion: v1 kind: Namespace metadata: name: randomly +--- +apiVersion: v1 +kind: Namespace +metadata: + name: system diff --git a/workloads/timescaledb/timescaledb.yaml b/workloads/timescaledb/timescaledb.yaml new file mode 100644 index 0000000..5b2c864 --- /dev/null +++ b/workloads/timescaledb/timescaledb.yaml @@ -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