-
Notifications
You must be signed in to change notification settings - Fork 5
/
values.yaml
151 lines (133 loc) · 4.07 KB
/
values.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# must be an odd number
replicaCount: 1
image:
repository: clickhouse/clickhouse-keeper
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "24.3.6.48-alpine"
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
keeperConfig: |
<clickhouse>
<include_from>/tmp/clickhouse-keeper/config.d/generated-keeper-settings.xml</include_from>
<path>/var/lib/clickhouse-keeper</path>
<logger>
<level>trace</level>
<console>true</console>
</logger>
<listen_host>0.0.0.0</listen_host>
<keeper_server incl="keeper_server">
<tcp_port>2181</tcp_port>
<four_letter_word_white_list>*</four_letter_word_white_list>
<coordination_settings>
<raft_logs_level>information</raft_logs_level>
</coordination_settings>
</keeper_server>
<prometheus>
<endpoint>/metrics</endpoint>
<port>7000</port>
<metrics>true</metrics>
<events>true</events>
<asynchronous_metrics>true</asynchronous_metrics>
<!-- https://github.com/ClickHouse/ClickHouse/issues/46136 -->
<status_info>false</status_info>
</prometheus>
</clickhouse>
command: |
HOST=`hostname -s` &&
DOMAIN=`hostname -d` &&
if [[ $HOST =~ (.*)-([0-9]+)$ ]]; then
NAME=${BASH_REMATCH[1]}
ORD=${BASH_REMATCH[2]}
else
echo "Failed to parse name and ordinal of Pod"
exit 1
fi &&
export MY_ID=$((ORD+1)) &&
mkdir -p /tmp/clickhouse-keeper/config.d/ &&
{
echo "<yandex><keeper_server>"
echo "<server_id>${MY_ID}</server_id>"
echo "<raft_configuration>"
for (( i=1; i<=$SERVERS; i++ )); do
echo "<server><id>${i}</id><hostname>$NAME-$((i-1)).${DOMAIN}</hostname><port>${RAFT_PORT}</port></server>"
done
echo "</raft_configuration>"
echo "</keeper_server></yandex>"
} > /tmp/clickhouse-keeper/config.d/generated-keeper-settings.xml &&
cat /tmp/clickhouse-keeper/config.d/generated-keeper-settings.xml &&
if [[ "1" == "$MY_ID" ]]; then
clickhouse-keeper --config-file=/etc/clickhouse-keeper/keeper_config.xml --force-recovery
else
clickhouse-keeper --config-file=/etc/clickhouse-keeper/keeper_config.xml
fi
livenessProbe:
exec:
command:
- bash
- -xc
- 'date && OK=$(exec 3<>/dev/tcp/127.0.0.1/2181 ; printf "ruok" >&3 ; IFS=; tee <&3; exec 3<&- ;); if [[ "$OK" == "imok" ]]; then exit 0; else exit 1; fi'
initialDelaySeconds: 20
timeoutSeconds: 15
persistence:
## persistence.persistence.enabled -- enabling persistence
##
enabled: true
## persistence.persistence.size -- Volume size
##
size: 10Gi
##
accessMode: ReadWriteOnce
## persistence.persistence.storageClass -- Storage class for PV (e.g. gp2, standard, ...)
##
storageClass: ""
podAnnotations: {}
podLabels: {}
podSecurityContext:
runAsUser: 101
runAsGroup: 101
securityContext: {}
service:
type: ClusterIP
port: 7000
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
# Additional volumes on the output Deployment definition.
volumes: []
# - name: foo
# secret:
# secretName: mysecret
# optional: false
# Additional volumeMounts on the output Deployment definition.
volumeMounts: []
# - name: foo
# mountPath: "/etc/foo"
# readOnly: true
nodeSelector: {}
tolerations: []
affinity: {}