deploy: add ClickHouse StatefulSet and server env vars
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -75,6 +75,12 @@ spec:
|
|||||||
name: cameleer-auth
|
name: cameleer-auth
|
||||||
key: CAMELEER_JWT_SECRET
|
key: CAMELEER_JWT_SECRET
|
||||||
optional: true
|
optional: true
|
||||||
|
- name: CLICKHOUSE_ENABLED
|
||||||
|
value: "true"
|
||||||
|
- name: CLICKHOUSE_URL
|
||||||
|
value: "jdbc:clickhouse://clickhouse.cameleer.svc.cluster.local:8123/cameleer?async_insert=1&wait_for_async_insert=0"
|
||||||
|
- name: CAMELEER_STORAGE_METRICS
|
||||||
|
value: "postgres"
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
|
|||||||
75
deploy/clickhouse.yaml
Normal file
75
deploy/clickhouse.yaml
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
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:24.12
|
||||||
|
ports:
|
||||||
|
- containerPort: 8123
|
||||||
|
name: http
|
||||||
|
- containerPort: 9000
|
||||||
|
name: native
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /var/lib/clickhouse
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "2Gi"
|
||||||
|
cpu: "500m"
|
||||||
|
limits:
|
||||||
|
memory: "4Gi"
|
||||||
|
cpu: "2000m"
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /ping
|
||||||
|
port: 8123
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 3
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /ping
|
||||||
|
port: 8123
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 3
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: data
|
||||||
|
spec:
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 50Gi
|
||||||
|
---
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user