92 lines
2.5 KiB
YAML
92 lines
2.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: clickhouse
|
|
labels:
|
|
component: clickhouse
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
component: clickhouse
|
|
template:
|
|
metadata:
|
|
labels:
|
|
component: clickhouse
|
|
spec:
|
|
securityContext:
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: clickhouse
|
|
image: clickhouse/clickhouse-server:24.12-alpine
|
|
ports:
|
|
- name: http
|
|
containerPort: 8123
|
|
protocol: TCP
|
|
- name: native
|
|
containerPort: 9000
|
|
protocol: TCP
|
|
env:
|
|
- name: CLICKHOUSE_SKIP_USER_SETUP
|
|
value: "1"
|
|
volumeMounts:
|
|
- name: clickhouse-data
|
|
mountPath: /var/lib/clickhouse
|
|
- name: clickhouse-config
|
|
mountPath: /etc/clickhouse-server/config.d/logs.xml
|
|
subPath: logs.xml
|
|
readOnly: true
|
|
- name: clickhouse-config
|
|
mountPath: /etc/clickhouse-server/config.d/ipv4-only.xml
|
|
subPath: ipv4-only.xml
|
|
readOnly: true
|
|
- name: clickhouse-config
|
|
mountPath: /etc/clickhouse-server/config.d/low-resources.xml
|
|
subPath: low-resources.xml
|
|
readOnly: true
|
|
- name: clickhouse-users-config
|
|
mountPath: /etc/clickhouse-server/users.d/default-profile-low-resources-overrides.xml
|
|
subPath: default-profile-low-resources-overrides.xml
|
|
readOnly: true
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /ping
|
|
port: 8123
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /ping
|
|
port: 8123
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 20
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
resources:
|
|
limits:
|
|
cpu: "2"
|
|
memory: 2Gi
|
|
ephemeral-storage: 1Gi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 512Mi
|
|
ephemeral-storage: 50Mi
|
|
securityContext:
|
|
readOnlyRootFilesystem: false
|
|
volumes:
|
|
- name: clickhouse-data
|
|
persistentVolumeClaim:
|
|
claimName: clickhouse-data
|
|
- name: clickhouse-config
|
|
configMap:
|
|
name: clickhouse-config
|
|
- name: clickhouse-users-config
|
|
configMap:
|
|
name: clickhouse-config
|
|
restartPolicy: Always
|