forked from Altinity/clickhouse-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clickhouse-operator-install-bundle.yaml
3778 lines (3750 loc) · 222 KB
/
clickhouse-operator-install-bundle.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Template Parameters:
#
# KIND=ClickHouseInstallation
# SINGULAR=clickhouseinstallation
# PLURAL=clickhouseinstallations
# SHORT=chi
#
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: clickhouseinstallations.clickhouse.altinity.com
labels:
clickhouse.altinity.com/chop: 0.18.4
spec:
group: clickhouse.altinity.com
scope: Namespaced
names:
kind: ClickHouseInstallation
singular: clickhouseinstallation
plural: clickhouseinstallations
shortNames:
- chi
versions:
- name: v1
served: true
storage: true
additionalPrinterColumns:
- name: version
type: string
description: Operator version
priority: 1 # show in wide view
jsonPath: .status.chop-version
- name: clusters
type: integer
description: Clusters count
priority: 0 # show in standard view
jsonPath: .status.clusters
- name: shards
type: integer
description: Shards count
priority: 1 # show in wide view
jsonPath: .status.shards
- name: hosts
type: integer
description: Hosts count
priority: 0 # show in standard view
jsonPath: .status.hosts
- name: taskID
type: string
description: TaskID
priority: 1 # show in wide view
jsonPath: .status.taskID
- name: status
type: string
description: CHI status
priority: 0 # show in standard view
jsonPath: .status.status
- name: updated
type: integer
description: Updated hosts count
priority: 1 # show in wide view
jsonPath: .status.updated
- name: added
type: integer
description: Added hosts count
priority: 1 # show in wide view
jsonPath: .status.added
- name: deleted
type: integer
description: Hosts deleted count
priority: 1 # show in wide view
jsonPath: .status.deleted
- name: delete
type: integer
description: Hosts to be deleted count
priority: 1 # show in wide view
jsonPath: .status.delete
- name: endpoint
type: string
description: Client access endpoint
priority: 1 # show in wide view
jsonPath: .status.endpoint
- name: age
type: date
description: Age of the resource
# Displayed in all priorities
jsonPath: .metadata.creationTimestamp
subresources:
status: {}
schema:
openAPIV3Schema:
description: "define a set of Kubernetes resources (StatefulSet, PVC, Service, ConfigMap) which describe behavior one or more ClickHouse clusters"
type: object
required:
- spec
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
status:
type: object
description: "Current ClickHouseInstallation manifest status, contains many fields like a normalized configuration, clickhouse-operator version, current action and all applied action list, current taskID and all applied taskIDs and other"
properties:
chop-version:
type: string
description: "ClickHouse operator version"
chop-commit:
type: string
description: "ClickHouse operator git commit SHA"
chop-date:
type: string
description: "ClickHouse operator build date"
clusters:
type: integer
minimum: 0
description: "Clusters count"
shards:
type: integer
minimum: 0
description: "Shards count"
replicas:
type: integer
minimum: 0
description: "Replicas count"
hosts:
type: integer
minimum: 0
description: "Hosts count"
status:
type: string
description: "Status"
taskID:
type: string
description: "Current task id"
taskIDsStarted:
type: array
description: "Started task ids"
items:
type: string
taskIDsCompleted:
type: array
description: "Completed task ids"
items:
type: string
action:
type: string
description: "Action"
actions:
type: array
description: "Actions"
items:
type: string
error:
type: string
description: "Last error"
errors:
type: array
description: "Errors"
items:
type: string
updated:
type: integer
minimum: 0
description: "Updated Hosts count"
added:
type: integer
minimum: 0
description: "Added Hosts count"
deleted:
type: integer
minimum: 0
description: "Deleted Hosts count"
delete:
type: integer
minimum: 0
description: "About to delete Hosts count"
pods:
type: array
description: "Pods"
items:
type: string
fqdns:
type: array
description: "Pods FQDNs"
items:
type: string
endpoint:
type: string
description: "Endpoint"
generation:
type: integer
minimum: 0
description: "Generation"
normalized:
type: object
description: "Normalized CHI"
x-kubernetes-preserve-unknown-fields: true
spec:
type: object
# x-kubernetes-preserve-unknown-fields: true
description: |
Specification of the desired behavior of one or more ClickHouse clusters
More info: https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md"
properties:
taskID:
type: string
description: "Allow define custom taskID for named update and watch status of this update execution in .status.taskIDs field, by default every update of chi manifest will generate random taskID"
# Need to be StringBool
stop:
type: string
description: |
Allow stop all ClickHouse clusters described in current chi.
Stop mechanism works as follows:
- When `stop` is `1` then setup `Replicas: 0` in each related to current `chi` StatefulSet resource, all `Pods` and `Service` resources will desctroy, but PVCs still live
- When `stop` is `0` then `Pods` will created again and will attach retained PVCs and `Service` also will created again
enum:
# List StringBoolXXX constants from model
- ""
- "0"
- "1"
- "False"
- "false"
- "True"
- "true"
- "No"
- "no"
- "Yes"
- "yes"
- "Off"
- "off"
- "On"
- "on"
- "Disable"
- "disable"
- "Enable"
- "enable"
- "Disabled"
- "disabled"
- "Enabled"
- "enabled"
restart:
type: string
description: "This is a 'soft restart' button. When set to 'RollingUpdate' operator will restart ClickHouse pods in a graceful way. Remove it after the use in order to avoid unneeded restarts"
enum:
- ""
- "RollingUpdate"
# Need to be StringBool
troubleshoot:
type: string
description: "allows troubleshoot Pods during CrashLoopBack state, when you apply wrong configuration, `clickhouse-server` wouldn't startup"
enum:
# List StringBoolXXX constants from model
- ""
- "0"
- "1"
- "False"
- "false"
- "True"
- "true"
- "No"
- "no"
- "Yes"
- "yes"
- "Off"
- "off"
- "On"
- "on"
- "Disable"
- "disable"
- "Enable"
- "enable"
- "Disabled"
- "disabled"
- "Enabled"
- "enabled"
namespaceDomainPattern:
type: string
description: "custom domain suffix which will add to end of `Service` or `Pod` name, use it when you use custom cluster domain in your Kubernetes cluster"
templating:
type: object
# nullable: true
description: "optional, define policy for auto applying ClickHouseInstallationTemplate inside ClickHouseInstallation"
properties:
policy:
type: string
description: "when defined as `auto` inside ClickhouseInstallationTemplate, it will auto add into all ClickHouseInstallation, manual value is default"
enum:
- "auto"
- "manual"
reconciling:
type: object
description: "optional, allows tuning reconciling cycle for ClickhouseInstallation from clickhouse-operator side"
# nullable: true
properties:
policy:
type: string
description: DEPRECATED
configMapPropagationTimeout:
type: integer
description: |
timeout in seconds when `clickhouse-operator` will wait when applied `ConfigMap` during reconcile `ClickhouseInstallation` pods will updated from cache
see details: https://kubernetes.io/docs/concepts/configuration/configmap/#mounted-configmaps-are-updated-automatically
minimum: 0
maximum: 3600
cleanup:
type: object
description: "optional, define behavior for cleanup Kubernetes resources during reconcile cycle"
# nullable: true
properties:
unknownObjects:
type: object
description: "what clickhouse-operator shall do when found Kubernetes resources which should be managed with clickhouse-operator, but not have `ownerReference` to any currently managed `ClickHouseInstallation` resource, default behavior is `Delete`"
# nullable: true
properties:
statefulSet:
type: string
description: "behavior policy for unknown StatefulSet, Delete by default"
enum:
# List ObjectsCleanupXXX constants from model
- "Retain"
- "Delete"
pvc:
type: string
description: "behavior policy for unknown PVC, Delete by default"
enum:
# List ObjectsCleanupXXX constants from model
- "Retain"
- "Delete"
configMap:
type: string
description: "behavior policy for unknown ConfigMap, Delete by default"
enum:
# List ObjectsCleanupXXX constants from model
- "Retain"
- "Delete"
service:
type: string
description: "behavior policy for unknown Service, Delete by default"
enum:
# List ObjectsCleanupXXX constants from model
- "Retain"
- "Delete"
reconcileFailedObjects:
type: object
description: "what clickhouse-operator shall do when reconciling Kubernetes resources are failed, default behavior is `Retain`"
# nullable: true
properties:
statefulSet:
type: string
description: "behavior policy for failed StatefulSet reconciling, Retain by default"
enum:
# List ObjectsCleanupXXX constants from model
- "Retain"
- "Delete"
pvc:
type: string
description: "behavior policy for failed PVC reconciling, Retain by default"
enum:
# List ObjectsCleanupXXX constants from model
- "Retain"
- "Delete"
configMap:
type: string
description: "behavior policy for failed ConfigMap reconciling, Retain by default"
enum:
# List ObjectsCleanupXXX constants from model
- "Retain"
- "Delete"
service:
type: string
description: "behavior policy for failed Service reconciling, Retain by default"
enum:
# List ObjectsCleanupXXX constants from model
- "Retain"
- "Delete"
defaults:
type: object
description: |
define default behavior for whole ClickHouseInstallation, some behavior can be re-define on cluster, shard and replica level
More info: https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#specdefaults
# nullable: true
properties:
# Need to be StringBool
replicasUseFQDN:
type: string
description: |
define should replicas be specified by FQDN in `<host></host>`, then "no" then will use short hostname and clickhouse-server will use kubernetes default suffixes for properly DNS lookup
"yes" by default
enum:
# List StringBoolXXX constants from model
- ""
- "0"
- "1"
- "False"
- "false"
- "True"
- "true"
- "No"
- "no"
- "Yes"
- "yes"
- "Off"
- "off"
- "On"
- "on"
- "Disable"
- "disable"
- "Enable"
- "enable"
- "Disabled"
- "disabled"
- "Enabled"
- "enabled"
distributedDDL:
type: object
description: |
allows change `<yandex><distributed_ddl></distributed_ddl></yandex>` settings
More info: https://clickhouse.tech/docs/en/operations/server-configuration-parameters/settings/#server-settings-distributed_ddl
# nullable: true
properties:
profile:
type: string
description: "Settings from this profile will be used to execute DDL queries"
templates:
type: object
description: "optional, configuration of the templates names which will use for generate Kubernetes resources according to one or more ClickHouse clusters described in current ClickHouseInstallation (chi) resource"
# nullable: true
properties:
hostTemplate:
type: string
description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure every `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod`"
podTemplate:
type: string
description: "optional, template name from chi.spec.templates.podTemplates, allows customization each `Pod` resource during render and reconcile each StatefulSet.spec resource described in `chi.spec.configuration.clusters`"
dataVolumeClaimTemplate:
type: string
description: "optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each `PVC` which will mount for clickhouse data directory in each `Pod` during render and reconcile every StatefulSet.spec resource described in `chi.spec.configuration.clusters`"
logVolumeClaimTemplate:
type: string
description: "optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each `PVC` which will mount for clickhouse log directory in each `Pod` during render and reconcile every StatefulSet.spec resource described in `chi.spec.configuration.clusters`"
serviceTemplate:
type: string
description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for one `Service` resource which will created by `clickhouse-operator` which cover all clusters in whole `chi` resource"
clusterServiceTemplate:
type: string
description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover each clickhouse cluster described in `chi.spec.configuration.clusters`"
shardServiceTemplate:
type: string
description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover each shard inside clickhouse cluster described in `chi.spec.configuration.clusters`"
replicaServiceTemplate:
type: string
description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover each replica inside each shard inside each clickhouse cluster described in `chi.spec.configuration.clusters`"
volumeClaimTemplate:
type: string
description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
configuration:
type: object
description: "allows configure multiple aspects and behavior for `clickhouse-server` instance and also allows describe multiple `clickhouse-server` clusters inside one `chi` resource"
# nullable: true
properties:
zookeeper:
type: object
description: |
allows configure <yandex><zookeeper>..</zookeeper></yandex> section in each `Pod` during generate `ConfigMap` which will mounted in `/etc/clickhouse-server/config.d/`
`clickhouse-operator` itself doesn't manage Zookeeper, please install Zookeeper separatelly look examples on https://github.com/Altinity/clickhouse-operator/tree/master/deploy/zookeeper/
currently, zookeeper (or clickhouse-keeper replacement) used for *ReplicatedMergeTree table engines and for `distributed_ddl`
More details: https://clickhouse.tech/docs/en/operations/server-configuration-parameters/settings/#server-settings_zookeeper
# nullable: true
properties:
nodes:
type: array
description: "describe every available zookeeper cluster node for interaction"
# nullable: true
items:
type: object
#required:
# - host
properties:
host:
type: string
description: "dns name or ip address for Zookeeper node"
port:
type: integer
description: "TCP port which used to connect to Zookeeper node"
minimum: 0
maximum: 65535
session_timeout_ms:
type: integer
description: "session timeout during connect to Zookeeper"
operation_timeout_ms:
type: integer
description: "one operation timeout during Zookeeper transactions"
root:
type: string
description: "optional root znode path inside zookeeper to store ClickHouse related data (replication queue or distributed DDL)"
identity:
type: string
description: "optional access credentials string with `user:password` format used when use digest authorization in Zookeeper"
users:
type: object
description: |
allows configure <yandex><users>..</users></yandex> section in each `Pod` during generate `ConfigMap` which will mount in `/etc/clickhouse-server/users.d/`
you can configure password hashed, authorization restrictions, database level security row filters etc.
More details: https://clickhouse.tech/docs/en/operations/settings/settings-users/
Your yaml code will convert to XML, see examples https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#specconfigurationusers
# nullable: true
x-kubernetes-preserve-unknown-fields: true
profiles:
type: object
description: |
allows configure <yandex><profiles>..</profiles></yandex> section in each `Pod` during generate `ConfigMap` which will mount in `/etc/clickhouse-server/users.d/`
you can configure any aspect of settings profile
More details: https://clickhouse.tech/docs/en/operations/settings/settings-profiles/
Your yaml code will convert to XML, see examples https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#specconfigurationprofiles
# nullable: true
x-kubernetes-preserve-unknown-fields: true
quotas:
type: object
description: |
allows configure <yandex><quotas>..</quotas></yandex> section in each `Pod` during generate `ConfigMap` which will mount in `/etc/clickhouse-server/users.d/`
you can configure any aspect of resource quotas
More details: https://clickhouse.tech/docs/en/operations/quotas/
Your yaml code will convert to XML, see examples https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#specconfigurationquotas
# nullable: true
x-kubernetes-preserve-unknown-fields: true
settings:
type: object
description: |
allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in each `Pod` during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/`
More details: https://clickhouse.tech/docs/en/operations/settings/settings/
Your yaml code will convert to XML, see examples https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#specconfigurationsettings
# nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
description: |
allows define content of any setting file inside each `Pod` during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
every key in this object is the file name
every value in this object is the file content
you can use `!!binary |` and base64 for binary files, see details here https://yaml.org/type/binary.html
each key could contains prefix like USERS, COMMON, HOST or config.d, users.d, cond.d, wrong prefixes will ignored, subfolders also will ignored
More details: https://github.com/Altinity/clickhouse-operator/blob/master/docs/chi-examples/05-settings-05-files-nested.yaml
# nullable: true
x-kubernetes-preserve-unknown-fields: true
clusters:
type: array
description: |
describes ClickHouse clusters layout and allows change settings on cluster-level, shard-level and replica-level
every cluster is a set of StatefulSet, one StatefulSet contains only one Pod with `clickhouse-server`
all Pods will rendered in <remote_server> part of ClickHouse configs, mounted from ConfigMap as `/etc/clickhouse-server/config.d/chop-generated-remote_servers.xml`
Clusters will use for Distributed table engine, more details: https://clickhouse.tech/docs/en/engines/table-engines/special/distributed/
If `cluster` contains zookeeper settings (could be inherited from top `chi` level), when you can create *ReplicatedMergeTree tables
# nullable: true
items:
type: object
#required:
# - name
properties:
name:
type: string
description: "cluster name, used to identify set of ClickHouse servers and wide used during generate names of related Kubernetes resources"
minLength: 1
# See namePartClusterMaxLen const
maxLength: 15
pattern: "^[a-zA-Z0-9-]{0,15}$"
zookeeper:
type: object
description: |
optional, allows configure <yandex><zookeeper>..</zookeeper></yandex> section in each `Pod` only in current ClickHouse cluster, during generate `ConfigMap` which will mounted in `/etc/clickhouse-server/config.d/`
override top-level `chi.spec.configuration.zookeeper` settings
# nullable: true
properties:
nodes:
type: array
description: "describe every available zookeeper cluster node for interaction"
# nullable: true
items:
type: object
#required:
# - host
properties:
host:
type: string
description: "dns name or ip address for Zookeeper node"
port:
type: integer
description: "TCP port which used to connect to Zookeeper node"
minimum: 0
maximum: 65535
session_timeout_ms:
type: integer
description: "session timeout during connect to Zookeeper"
operation_timeout_ms:
type: integer
description: "one operation timeout during Zookeeper transactions"
root:
type: string
description: "optional root znode path inside zookeeper to store ClickHouse related data (replication queue or distributed DDL)"
identity:
type: string
description: "optional access credentials string with `user:password` format used when use digest authorization in Zookeeper"
settings:
type: object
description: |
optional, allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in each `Pod` only in one cluster during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/`
override top-level `chi.spec.configuration.settings`
More details: https://clickhouse.tech/docs/en/operations/settings/settings/
# nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
description: |
optional, allows define content of any setting file inside each `Pod` on current cluster during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files`
# nullable: true
x-kubernetes-preserve-unknown-fields: true
templates:
type: object
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected cluster
override top-level `chi.spec.configuration.templates`
# nullable: true
properties:
hostTemplate:
type: string
description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one cluster"
podTemplate:
type: string
description: "optional, template name from chi.spec.templates.podTemplates, allows customization each `Pod` resource during render and reconcile each StatefulSet.spec resource described in `chi.spec.configuration.clusters` only for one cluster"
dataVolumeClaimTemplate:
type: string
description: "optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each `PVC` which will mount for clickhouse data directory in each `Pod` during render and reconcile every StatefulSet.spec resource described in `chi.spec.configuration.clusters` only for one cluster"
logVolumeClaimTemplate:
type: string
description: "optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each `PVC` which will mount for clickhouse log directory in each `Pod` during render and reconcile every StatefulSet.spec resource described in `chi.spec.configuration.clusters` only for one cluster"
serviceTemplate:
type: string
description: "optional, fully ignores for cluster-level"
clusterServiceTemplate:
type: string
description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover each clickhouse cluster described in `chi.spec.configuration.clusters` only for one cluster"
shardServiceTemplate:
type: string
description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover each shard inside clickhouse cluster described in `chi.spec.configuration.clusters` only for one cluster"
replicaServiceTemplate:
type: string
description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover each replica inside each shard inside each clickhouse cluster described in `chi.spec.configuration.clusters` only for one cluster"
volumeClaimTemplate:
type: string
description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
layout:
type: object
description: |
describe current cluster layout, how much shards in cluster, how much replica in shard
allows override settings on each shard and replica separatelly
# nullable: true
properties:
type:
type: string
description: "DEPRECATED - to be removed soon"
shardsCount:
type: integer
description: "how much shards for current ClickHouse cluster will run in Kubernetes, each shard contains shared-nothing part of data and contains set of replicas, cluster contains 1 shard by default"
replicasCount:
type: integer
description: "how much replicas in each shards for current ClickHouse cluster will run in Kubernetes, each replica is a separate `StatefulSet` which contains only one `Pod` with `clickhouse-server` instance, every shard contains 1 replica by default"
shards:
type: array
description: "optional, allows override top-level `chi.spec.configuration`, cluster-level `chi.spec.configuration.clusters` settings for each shard separately, use it only if you fully understand what you do"
# nullable: true
items:
type: object
properties:
name:
type: string
description: "optional, by default shard name is generated, but you can override it and setup custom name"
minLength: 1
# See namePartShardMaxLen const
maxLength: 15
pattern: "^[a-zA-Z0-9-]{0,15}$"
definitionType:
type: string
description: "DEPRECATED - to be removed soon"
weight:
type: integer
description: |
optional, 1 by default, allows setup shard <weight> setting which will use during insert into tables with `Distributed` engine,
will apply in <remote_servers> inside ConfigMap which will mount in /etc/clickhouse-server/config.d/chop-generated-remote_servers.xml
More details: https://clickhouse.tech/docs/en/engines/table-engines/special/distributed/
# Need to be StringBool
internalReplication:
type: string
description: |
optional, `true` by default when `chi.spec.configuration.clusters[].layout.ReplicaCount` > 1 and 0 otherwise
allows setup <internal_replication> setting which will use during insert into tables with `Distributed` engine for insert only in one live replica and other replicas will download inserted data during replication,
will apply in <remote_servers> inside ConfigMap which will mount in /etc/clickhouse-server/config.d/chop-generated-remote_servers.xml
More details: https://clickhouse.tech/docs/en/engines/table-engines/special/distributed/
enum:
# List StringBoolXXX constants from model
- ""
- "0"
- "1"
- "False"
- "false"
- "True"
- "true"
- "No"
- "no"
- "Yes"
- "yes"
- "Off"
- "off"
- "On"
- "on"
- "Disable"
- "disable"
- "Enable"
- "enable"
- "Disabled"
- "disabled"
- "Enabled"
- "enabled"
settings:
type: object
# nullable: true
description: |
optional, allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in each `Pod` only in one shard during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/`
override top-level `chi.spec.configuration.settings` and cluster-level `chi.spec.configuration.clusters.settings`
More details: https://clickhouse.tech/docs/en/operations/settings/settings/
x-kubernetes-preserve-unknown-fields: true
files:
type: object
# nullable: true
description: |
optional, allows define content of any setting file inside each `Pod` only in one shard during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files` and cluster-level `chi.spec.configuration.clusters.files`
x-kubernetes-preserve-unknown-fields: true
templates:
type: object
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected shard
override top-level `chi.spec.configuration.templates` and cluster-level `chi.spec.configuration.clusters.templates`
# nullable: true
properties:
hostTemplate:
type: string
description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one shard"
podTemplate:
type: string
description: "optional, template name from chi.spec.templates.podTemplates, allows customization each `Pod` resource during render and reconcile each StatefulSet.spec resource described in `chi.spec.configuration.clusters` only for one shard"
dataVolumeClaimTemplate:
type: string
description: "optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each `PVC` which will mount for clickhouse data directory in each `Pod` during render and reconcile every StatefulSet.spec resource described in `chi.spec.configuration.clusters` only for one shard"
logVolumeClaimTemplate:
type: string
description: "optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each `PVC` which will mount for clickhouse log directory in each `Pod` during render and reconcile every StatefulSet.spec resource described in `chi.spec.configuration.clusters` only for one shard"
serviceTemplate:
type: string
description: "optional, fully ignores for shard-level"
clusterServiceTemplate:
type: string
description: "optional, fully ignores for shard-level"
shardServiceTemplate:
type: string
description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover shard inside clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard"
replicaServiceTemplate:
type: string
description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover each replica inside each shard inside clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard"
volumeClaimTemplate:
type: string
description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
replicasCount:
type: integer
description: |
optional, how much replicas in selected shard for selected ClickHouse cluster will run in Kubernetes, each replica is a separate `StatefulSet` which contains only one `Pod` with `clickhouse-server` instance,
shard contains 1 replica by default
override cluster-level `chi.spec.configuration.clusters.layout.replicasCount`
minimum: 1
replicas:
type: array
description: |
optional, allows override behavior for selected replicas from cluster-level `chi.spec.configuration.clusters` and shard-level `chi.spec.configuration.clusters.layout.shards`
# nullable: true
items:
# Host
type: object
properties:
name:
type: string
description: "optional, by default replica name is generated, but you can override it and setup custom name"
minLength: 1
# See namePartReplicaMaxLen const
maxLength: 15
pattern: "^[a-zA-Z0-9-]{0,15}$"
tcpPort:
type: integer
description: |
optional, setup `Pod.spec.containers.ports` with name `tcp` for selected replica, override `chi.spec.templates.hostTemplates.spec.tcpPort`
allows connect to `clickhouse-server` via TCP Native protocol via kubernetes `Service`
minimum: 1
maximum: 65535
httpPort:
type: integer
description: |
optional, setup `Pod.spec.containers.ports` with name `http` for selected replica, override `chi.spec.templates.hostTemplates.spec.httpPort`
allows connect to `clickhouse-server` via HTTP protocol via kubernetes `Service`
minimum: 1
maximum: 65535
interserverHTTPPort:
type: integer
description: |
optional, setup `Pod.spec.containers.ports` with name `interserver` for selected replica, override `chi.spec.templates.hostTemplates.spec.interserverHTTPPort`
allows connect between replicas inside same shard during fetch replicated data parts HTTP protocol
minimum: 1
maximum: 65535
settings:
type: object
# nullable: true
description: |
optional, allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in `Pod` only in one replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/conf.d/`
override top-level `chi.spec.configuration.settings`, cluster-level `chi.spec.configuration.clusters.settings` and shard-level `chi.spec.configuration.clusters.layout.shards.settings`
More details: https://clickhouse.tech/docs/en/operations/settings/settings/
x-kubernetes-preserve-unknown-fields: true
files:
type: object
# nullable: true
description: |
optional, allows define content of any setting file inside `Pod` only in one replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files`, cluster-level `chi.spec.configuration.clusters.files` and shard-level `chi.spec.configuration.clusters.layout.shards.files`
x-kubernetes-preserve-unknown-fields: true
templates:
type: object
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected replica
override top-level `chi.spec.configuration.templates`, cluster-level `chi.spec.configuration.clusters.templates` and shard-level `chi.spec.configuration.clusters.layout.shards.templates`
# nullable: true
properties:
hostTemplate:
type: string
description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one replica"
podTemplate:
type: string
description: "optional, template name from chi.spec.templates.podTemplates, allows customization each `Pod` resource during render and reconcile each StatefulSet.spec resource described in `chi.spec.configuration.clusters` only for one replica"
dataVolumeClaimTemplate:
type: string
description: "optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each `PVC` which will mount for clickhouse data directory in each `Pod` during render and reconcile every StatefulSet.spec resource described in `chi.spec.configuration.clusters` only for one shard"
logVolumeClaimTemplate:
type: string
description: "optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each `PVC` which will mount for clickhouse log directory in each `Pod` during render and reconcile every StatefulSet.spec resource described in `chi.spec.configuration.clusters` only for one shard"
serviceTemplate:
type: string
description: "optional, fully ignores for replica-level"
clusterServiceTemplate:
type: string
description: "optional, fully ignores for replica-level"
shardServiceTemplate:
type: string
description: "optional, fully ignores for replica-level"
replicaServiceTemplate:
type: string
description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover each replica inside each shard inside clickhouse cluster described in `chi.spec.configuration.clusters` only for one replica"
volumeClaimTemplate:
type: string
description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
replicas:
type: array
description: "optional, allows override top-level `chi.spec.configuration` and cluster-level `chi.spec.configuration.clusters` configuration for each replica and each shard relates to selected replica, use it only if you fully understand what you do"
# nullable: true
items:
type: object
properties:
name:
type: string
description: "optional, by default replica name is generated, but you can override it and setup custom name"
minLength: 1
# See namePartShardMaxLen const
maxLength: 15
pattern: "^[a-zA-Z0-9-]{0,15}$"
settings:
type: object
description: |
optional, allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in `Pod` only in one replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/conf.d/`
override top-level `chi.spec.configuration.settings`, cluster-level `chi.spec.configuration.clusters.settings` and will ignore if shard-level `chi.spec.configuration.clusters.layout.shards` present
More details: https://clickhouse.tech/docs/en/operations/settings/settings/
# nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
# nullable: true
description: |
optional, allows define content of any setting file inside each `Pod` only in one replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files` and cluster-level `chi.spec.configuration.clusters.files`, will ignore if `chi.spec.configuration.clusters.layout.shards` presents
x-kubernetes-preserve-unknown-fields: true
templates:
type: object
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected replica
override top-level `chi.spec.configuration.templates`, cluster-level `chi.spec.configuration.clusters.templates`
# nullable: true
properties:
hostTemplate:
type: string
description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one replica"
podTemplate:
type: string
description: "optional, template name from chi.spec.templates.podTemplates, allows customization each `Pod` resource during render and reconcile each StatefulSet.spec resource described in `chi.spec.configuration.clusters` only for one replica"
dataVolumeClaimTemplate:
type: string
description: "optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each `PVC` which will mount for clickhouse data directory in each `Pod` during render and reconcile every StatefulSet.spec resource described in `chi.spec.configuration.clusters` only for one shard"
logVolumeClaimTemplate:
type: string
description: "optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each `PVC` which will mount for clickhouse log directory in each `Pod` during render and reconcile every StatefulSet.spec resource described in `chi.spec.configuration.clusters` only for one shard"
serviceTemplate:
type: string
description: "optional, fully ignores for replica-level"
clusterServiceTemplate:
type: string
description: "optional, fully ignores for replica-level"
shardServiceTemplate:
type: string
description: "optional, fully ignores for replica-level"
replicaServiceTemplate:
type: string
description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover each replica inside each shard inside clickhouse cluster described in `chi.spec.configuration.clusters` only for one replica"
volumeClaimTemplate:
type: string
description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
shardsCount:
type: integer
description: "optional, count of shards related to current replica, you can override each shard behavior on low-level `chi.spec.configuration.clusters.layout.replicas.shards`"
minimum: 1
shards:
type: array
description: "optional, list of shards related to current replica, will ignore if `chi.spec.configuration.clusters.layout.shards` presents"
# nullable: true
items:
# Host
type: object
properties:
name:
type: string
description: "optional, by default shard name is generated, but you can override it and setup custom name"
minLength: 1
# See namePartReplicaMaxLen const
maxLength: 15
pattern: "^[a-zA-Z0-9-]{0,15}$"
tcpPort:
type: integer
description: |
optional, setup `Pod.spec.containers.ports` with name `tcp` for selected shard, override `chi.spec.templates.hostTemplates.spec.tcpPort`
allows connect to `clickhouse-server` via TCP Native protocol via kubernetes `Service`
minimum: 1
maximum: 65535
httpPort:
type: integer
description: |
optional, setup `Pod.spec.containers.ports` with name `http` for selected shard, override `chi.spec.templates.hostTemplates.spec.httpPort`
allows connect to `clickhouse-server` via HTTP protocol via kubernetes `Service`
minimum: 1
maximum: 65535
interserverHTTPPort:
type: integer
description: |
optional, setup `Pod.spec.containers.ports` with name `interserver` for selected shard, override `chi.spec.templates.hostTemplates.spec.interserverHTTPPort`
allows connect between replicas inside same shard during fetch replicated data parts HTTP protocol
minimum: 1
maximum: 65535
settings:
type: object
description: |
optional, allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in `Pod` only in one shard related to current replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/conf.d/`
override top-level `chi.spec.configuration.settings`, cluster-level `chi.spec.configuration.clusters.settings` and replica-level `chi.spec.configuration.clusters.layout.replicas.settings`
More details: https://clickhouse.tech/docs/en/operations/settings/settings/
# nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
description: |
optional, allows define content of any setting file inside each `Pod` only in one shard related to current replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files` and cluster-level `chi.spec.configuration.clusters.files`, will ignore if `chi.spec.configuration.clusters.layout.shards` presents
# nullable: true
x-kubernetes-preserve-unknown-fields: true
templates:
type: object
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected replica
override top-level `chi.spec.configuration.templates`, cluster-level `chi.spec.configuration.clusters.templates`, replica-level `chi.spec.configuration.clusters.layout.replicas.templates`
# nullable: true
properties:
hostTemplate: