forked from Altinity/clickhouse-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
11-local-storage-01-simple-host-path.yaml
55 lines (53 loc) · 1.53 KB
/
11-local-storage-01-simple-host-path.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#
# AWS-specific labels, applicable in 'nodeAffinity' statements
#
# beta.kubernetes.io/arch=amd64
# beta.kubernetes.io/instance-type=t2.medium
# beta.kubernetes.io/os=linux
#
# failure-domain.beta.kubernetes.io/region=us-east-1
# failure-domain.beta.kubernetes.io/zone=us-east-1a
#
# kubernetes.io/hostname=ip-172-20-37-97.ec2.internal
# kubernetes.io/role=node
# node-role.kubernetes.io/node=
#
# kops.k8s.io/instancegroup=nodes2
#
apiVersion: "clickhouse.altinity.com/v1"
kind: "ClickHouseInstallation"
metadata:
name: "volume-hostpath"
spec:
defaults:
templates:
podTemplate: clickhouse-per-host-on-servers-with-ssd
configuration:
clusters:
- name: local-storage
layout:
shardsCount: 3
templates:
podTemplates:
# Specify Pod Templates with affinity
- name: clickhouse-per-host-on-servers-with-ssd
zone:
key: "disktype"
values:
- "ssd"
podDistribution:
- type: ClickHouseAntiAffinity
spec:
volumes:
# Specify volume as path on local filesystem as a directory which will be created, if need be
- name: local-path
hostPath:
path: /mnt/podvolume
type: DirectoryOrCreate
containers:
- name: clickhouse-pod
image: yandex/clickhouse-server:19.3.7
volumeMounts:
# Specify reference to volume on local filesystem
- name: local-path
mountPath: /var/lib/clickhouse