2026-03-12 19:01:23 +01:00
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: StatefulSet
|
|
|
|
|
metadata:
|
|
|
|
|
name: clickhouse
|
|
|
|
|
namespace: cameleer
|
|
|
|
|
spec:
|
|
|
|
|
serviceName: clickhouse
|
|
|
|
|
replicas: 1
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
|
|
|
|
app: clickhouse
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
|
|
|
|
app: clickhouse
|
|
|
|
|
spec:
|
|
|
|
|
containers:
|
|
|
|
|
- name: clickhouse
|
|
|
|
|
image: clickhouse/clickhouse-server:25.3
|
|
|
|
|
ports:
|
|
|
|
|
- containerPort: 8123
|
|
|
|
|
name: http
|
|
|
|
|
- containerPort: 9000
|
|
|
|
|
name: native
|
|
|
|
|
env:
|
|
|
|
|
- name: CLICKHOUSE_USER
|
2026-03-13 10:59:15 +01:00
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
name: clickhouse-credentials
|
|
|
|
|
key: CLICKHOUSE_USER
|
2026-03-12 19:01:23 +01:00
|
|
|
- name: CLICKHOUSE_PASSWORD
|
2026-03-13 10:59:15 +01:00
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
name: clickhouse-credentials
|
|
|
|
|
key: CLICKHOUSE_PASSWORD
|
2026-03-12 19:01:23 +01:00
|
|
|
- name: CLICKHOUSE_DB
|
|
|
|
|
value: cameleer3
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: data
|
|
|
|
|
mountPath: /var/lib/clickhouse
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
2026-03-13 22:44:03 +01:00
|
|
|
memory: "1Gi"
|
2026-03-12 19:01:23 +01:00
|
|
|
cpu: "200m"
|
|
|
|
|
limits:
|
2026-03-13 22:44:03 +01:00
|
|
|
memory: "4Gi"
|
2026-03-12 19:01:23 +01:00
|
|
|
cpu: "1000m"
|
2026-03-13 10:59:15 +01:00
|
|
|
livenessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /ping
|
|
|
|
|
port: 8123
|
|
|
|
|
initialDelaySeconds: 15
|
|
|
|
|
periodSeconds: 10
|
|
|
|
|
timeoutSeconds: 3
|
|
|
|
|
failureThreshold: 3
|
|
|
|
|
readinessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /ping
|
|
|
|
|
port: 8123
|
|
|
|
|
initialDelaySeconds: 5
|
|
|
|
|
periodSeconds: 5
|
|
|
|
|
timeoutSeconds: 3
|
|
|
|
|
failureThreshold: 3
|
2026-03-12 19:01:23 +01:00
|
|
|
volumeClaimTemplates:
|
|
|
|
|
- metadata:
|
|
|
|
|
name: data
|
|
|
|
|
spec:
|
|
|
|
|
accessModes: ["ReadWriteOnce"]
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
storage: 2Gi
|
|
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: Service
|
|
|
|
|
metadata:
|
|
|
|
|
name: clickhouse
|
|
|
|
|
namespace: cameleer
|
|
|
|
|
spec:
|
|
|
|
|
clusterIP: None
|
|
|
|
|
selector:
|
|
|
|
|
app: clickhouse
|
|
|
|
|
ports:
|
|
|
|
|
- port: 8123
|
|
|
|
|
targetPort: 8123
|
|
|
|
|
name: http
|
|
|
|
|
- port: 9000
|
|
|
|
|
targetPort: 9000
|
|
|
|
|
name: native
|
2026-03-12 21:16:45 +01:00
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: Service
|
|
|
|
|
metadata:
|
|
|
|
|
name: clickhouse-external
|
|
|
|
|
namespace: cameleer
|
|
|
|
|
spec:
|
|
|
|
|
type: NodePort
|
|
|
|
|
selector:
|
|
|
|
|
app: clickhouse
|
|
|
|
|
ports:
|
|
|
|
|
- port: 8123
|
|
|
|
|
targetPort: 8123
|
|
|
|
|
nodePort: 30123
|
|
|
|
|
name: http
|
|
|
|
|
- port: 9000
|
|
|
|
|
targetPort: 9000
|
|
|
|
|
nodePort: 30900
|
|
|
|
|
name: native
|