103 lines
3.2 KiB
YAML
103 lines
3.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: rybbit-clickhouse
|
|
labels:
|
|
app.kubernetes.io/controller: clickhouse
|
|
app.kubernetes.io/instance: rybbit
|
|
app.kubernetes.io/managed-by: Helm
|
|
app.kubernetes.io/name: rybbit
|
|
helm.sh/chart: rybbit-4.6.2
|
|
namespace: rybbit
|
|
spec:
|
|
revisionHistoryLimit: 3
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/controller: clickhouse
|
|
app.kubernetes.io/name: rybbit
|
|
app.kubernetes.io/instance: rybbit
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
checksum/configMaps: 26a783f1bf2cd5bcd4f724d505a909d6e3bb7b3715f1dfa01a98609864d4ab3e
|
|
labels:
|
|
app.kubernetes.io/controller: clickhouse
|
|
app.kubernetes.io/instance: rybbit
|
|
app.kubernetes.io/name: rybbit
|
|
spec:
|
|
enableServiceLinks: false
|
|
serviceAccountName: default
|
|
automountServiceAccountToken: true
|
|
hostIPC: false
|
|
hostNetwork: false
|
|
hostPID: false
|
|
dnsPolicy: ClusterFirst
|
|
containers:
|
|
- env:
|
|
- name: CLICKHOUSE_DB
|
|
value: analytics
|
|
- name: CLICKHOUSE_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: clickhouse-user
|
|
name: rybbit-config-secret
|
|
- name: CLICKHOUSE_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: clickhouse-password
|
|
name: rybbit-config-secret
|
|
image: clickhouse/clickhouse-server:26.1.2
|
|
imagePullPolicy: IfNotPresent
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- CMD
|
|
- wget
|
|
- --no-verbose
|
|
- --tries=1
|
|
- --spider
|
|
- http://localhost:8123/ping
|
|
failureThreshold: 5
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 30
|
|
successThreshold: 1
|
|
timeoutSeconds: 5
|
|
name: main
|
|
resources:
|
|
requests:
|
|
cpu: 10m
|
|
memory: 256Mi
|
|
volumeMounts:
|
|
- mountPath: /var/lib/clickhouse
|
|
name: clickhouse
|
|
- mountPath: /etc/clickhouse-server/config.d/network.xml
|
|
mountPropagation: None
|
|
name: clickhouse-config
|
|
readOnly: true
|
|
subPath: network.xml
|
|
- mountPath: /etc/clickhouse-server/config.d/enable_json.xml
|
|
mountPropagation: None
|
|
name: clickhouse-config
|
|
readOnly: true
|
|
subPath: enable_json.xml
|
|
- mountPath: /etc/clickhouse-server/config.d/logging_rules.xml
|
|
mountPropagation: None
|
|
name: clickhouse-config
|
|
readOnly: true
|
|
subPath: logging_rules.xml
|
|
- mountPath: /etc/clickhouse-server/config.d/user_logging.xml
|
|
mountPropagation: None
|
|
name: clickhouse-config
|
|
readOnly: true
|
|
subPath: user_logging.xml
|
|
volumes:
|
|
- name: clickhouse
|
|
persistentVolumeClaim:
|
|
claimName: clickhouse-data
|
|
- configMap:
|
|
name: clickhouse-config
|
|
name: clickhouse-config
|