2# commonLabels -- set of labels that will be applied to all the resources for the operator
4# commonAnnotations -- set of annotations that will be applied to all the resources for the operator
7 # look details in `kubectl explain deployment.spec.strategy`
11 # crdHook.enabled -- enable automatic CRD installation/update via pre-install/pre-upgrade hooks
12 # when disabled, CRDs must be installed manually using kubectl apply
15 # crdHook.image.repository -- image repository for CRD installation job
16 repository: cgr.dev/chainguard-private/kubectl
17 # crdHook.image.tag -- image tag for CRD installation job
18 tag: latest-dev@sha256:6c9c805891b4366b9fe19c537945abbe5f1234b358201d4be622287896bcacd9
19 # crdHook.image.pullPolicy -- image pull policy for CRD installation job
20 pullPolicy: IfNotPresent
21 # crdHook.imagePullSecrets -- image pull secrets for CRD installation job
22 # possible value format `[{"name":"your-secret-name"}]`,
23 # check `kubectl explain pod.spec.imagePullSecrets` for details
25 # crdHook.resources -- resource limits and requests for CRD installation job
33 # crdHook.nodeSelector -- node selector for CRD installation job
35 # crdHook.tolerations -- tolerations for CRD installation job
37 # crdHook.affinity -- affinity for CRD installation job
39 # crdHook.annotations -- additional annotations for CRD installation job
43 # operator.image.registry -- optional image registry prefix (e.g. 1234567890.dkr.ecr.us-east-1.amazonaws.com)
45 # operator.image.repository -- image repository
46 repository: cgr.dev/chainguard-private/clickhouse-operator
47 # operator.image.tag -- image tag (chart's appVersion value will be used if not set)
48 tag: latest@sha256:c08526e0fbf2fb68bbe8d58a42f5f76f9c5029ef7c8d9c14878e3c45dde23cee
49 # operator.image.pullPolicy -- image pull policy
50 pullPolicy: IfNotPresent
51 containerSecurityContext: {}
52 # operator.resources -- custom resource configuration, check `kubectl explain pod.spec.containers.resources` for details
61 # operator.priorityClassName -- priority class name for the clickhouse-operator deployment, check `kubectl explain pod.spec.priorityClassName` for details
64 # operator.env -- additional environment variables for the clickhouse-operator container in deployment
65 # possible format value `[{"name": "SAMPLE", "value": "text"}]`
70 # metrics.image.registry -- optional image registry prefix (e.g. 1234567890.dkr.ecr.us-east-1.amazonaws.com)
72 # metrics.image.repository -- image repository
73 repository: cgr.dev/chainguard-private/clickhouse-operator-metrics-exporter
74 # metrics.image.tag -- image tag (chart's appVersion value will be used if not set)
75 tag: latest@sha256:d53336523396418c847a5658c2aac7eee43a82467134da8bc59b6c1c326ec811
76 # metrics.image.pullPolicy -- image pull policy
77 pullPolicy: IfNotPresent
78 containerSecurityContext: {}
79 # metrics.resources -- custom resource configuration
88 # metrics.env -- additional environment variables for the deployment of metrics-exporter containers
89 # possible format value `[{"name": "SAMPLE", "value": "text"}]`
91# imagePullSecrets -- image pull secret for private images in clickhouse-operator pod
92# possible value format `[{"name":"your-secret-name"}]`,
93# check `kubectl explain pod.spec.imagePullSecrets` for details
95# podLabels -- labels to add to the clickhouse-operator pod
97# podAnnotations -- annotations to add to the clickhouse-operator pod, check `kubectl explain pod.spec.annotations` for details
98# @default -- check the `values.yaml` file
100 prometheus.io/port: '8888'
101 prometheus.io/scrape: 'true'
102 clickhouse-operator-metrics/port: '9999'
103 clickhouse-operator-metrics/scrape: 'true'
104# nameOverride -- override name of the chart
106# fullnameOverride -- full name of the chart.
109 # serviceAccount.create -- specifies whether a service account should be created
111 # serviceAccount.annotations -- annotations to add to the service account
113 # serviceAccount.name -- the name of the service account to use; if not set and create is true, a name is generated using the fullname template
116 # rbac.create -- specifies whether rbac resources should be created
118 # rbac.namespaceScoped -- specifies whether to create roles and rolebindings at the cluster level or namespace level
119 namespaceScoped: false
121 # secret.create -- create a secret with operator credentials
123 # secret.username -- operator credentials username
124 username: clickhouse_operator
125 # secret.password -- operator credentials password
126 password: clickhouse_operator_password
127# nodeSelector -- node for scheduler pod assignment, check `kubectl explain pod.spec.nodeSelector` for details
129# tolerations -- tolerations for scheduler pod assignment, check `kubectl explain pod.spec.tolerations` for details
131# affinity -- affinity for scheduler pod assignment, check `kubectl explain pod.spec.affinity` for details
133# podSecurityContext - operator deployment SecurityContext, check `kubectl explain pod.spec.securityContext` for details
134podSecurityContext: {}
135# topologySpreadConstraints - topologySpreadConstraints affinity for scheduler pod assignment, check `kubectl explain pod.spec.topologySpreadConstraints` for details
136topologySpreadConstraints: []
138 # serviceMonitor.enabled -- ServiceMonitor Custom resource is created for a [prometheus-operator](https://github.com/prometheus-operator/prometheus-operator)
139 # In serviceMonitor will be created two endpoints ch-metrics on port 8888 and op-metrics # 9999. Ypu can specify interval, scrapeTimeout, relabelings, metricRelabelings for each endpoint below
141 # serviceMonitor.additionalLabels -- additional labels for service monitor
144 # serviceMonitor.interval for ch-metrics endpoint --
146 # serviceMonitor.scrapeTimeout for ch-metrics endpoint -- Prometheus ServiceMonitor scrapeTimeout. If empty, Prometheus uses the global scrape timeout unless it is less than the target's scrape interval value in which the latter is used.
148 # serviceMonitor.relabelings for ch-metrics endpoint -- Prometheus [RelabelConfigs] to apply to samples before scraping
150 # serviceMonitor.metricRelabelings for ch-metrics endpoint -- Prometheus [MetricRelabelConfigs] to apply to samples before ingestio
151 metricRelabelings: []
153 # serviceMonitor.interval for op-metrics endpoint --
155 # serviceMonitor.scrapeTimeout for op-metrics endpoint -- Prometheus ServiceMonitor scrapeTimeout. If empty, Prometheus uses the global scrape timeout unless it is less than the target's scrape interval value in which the latter is used.
157 # serviceMonitor.relabelings for op-metrics endpoint -- Prometheus [RelabelConfigs] to apply to samples before scraping
159 # serviceMonitor.metricRelabelings for op-metrics endpoint -- Prometheus [MetricRelabelConfigs] to apply to samples before ingestio
160 metricRelabelings: []
161# configs -- clickhouse operator configs
162# @default -- check the `values.yaml` file for the config content (auto-generated from latest operator release)
166 01-clickhouse-01-listen.xml: |
168 <!-- This file is auto-generated -->
169 <!-- Do not edit this file - all changes would be lost -->
170 <!-- Edit appropriate template in the following folder: -->
171 <!-- deploy/builder/templates-config -->
174 <!-- Listen wildcard address to allow accepting connections from other containers and host network. -->
175 <listen_host>::</listen_host>
176 <listen_host>0.0.0.0</listen_host>
177 <listen_try>1</listen_try>
179 01-clickhouse-02-logger.xml: |
181 <!-- This file is auto-generated -->
182 <!-- Do not edit this file - all changes would be lost -->
183 <!-- Edit appropriate template in the following folder: -->
184 <!-- deploy/builder/templates-config -->
188 <!-- Possible levels: https://github.com/pocoproject/poco/blob/devel/Foundation/include/Poco/Logger.h#L439 -->
190 <log>/var/log/clickhouse-server/clickhouse-server.log</log>
191 <errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
194 <!-- Default behavior is autodetection (log to console if not daemon mode and is tty) -->
198 01-clickhouse-03-query_log.xml: |
200 <!-- This file is auto-generated -->
201 <!-- Do not edit this file - all changes would be lost -->
202 <!-- Edit appropriate template in the following folder: -->
203 <!-- deploy/builder/templates-config -->
206 <query_log replace="1">
207 <database>system</database>
208 <table>query_log</table>
209 <engine>Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 30 day</engine>
210 <flush_interval_milliseconds>7500</flush_interval_milliseconds>
212 <query_thread_log remove="1"/>
214 01-clickhouse-04-part_log.xml: |
216 <!-- This file is auto-generated -->
217 <!-- Do not edit this file - all changes would be lost -->
218 <!-- Edit appropriate template in the following folder: -->
219 <!-- deploy/builder/templates-config -->
222 <part_log replace="1">
223 <database>system</database>
224 <table>part_log</table>
225 <engine>Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 30 day</engine>
226 <flush_interval_milliseconds>7500</flush_interval_milliseconds>
229 01-clickhouse-05-trace_log.xml: |-
231 <!-- This file is auto-generated -->
232 <!-- Do not edit this file - all changes would be lost -->
233 <!-- Edit appropriate template in the following folder: -->
234 <!-- deploy/builder/templates-config -->
237 <trace_log replace="1">
238 <database>system</database>
239 <table>trace_log</table>
240 <engine>Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 30 day</engine>
241 <flush_interval_milliseconds>7500</flush_interval_milliseconds>
247 # This file is auto-generated
248 # Do not edit this file - all changes would be lost
249 # Edit appropriate template in the following folder:
250 # deploy/builder/templates-config
253 # Template parameters available:
257 # CH_CREDENTIALS_SECRET_NAMESPACE=
258 # CH_CREDENTIALS_SECRET_NAME=clickhouse-operator
261 ################################################
265 ################################################
267 # List of namespaces where clickhouse-operator watches for events.
268 # Concurrently running operators should watch on different namespaces.
270 # Regexp is applicable.
274 ################################################
276 ## Configuration files section
278 ################################################
280 # Each 'path' can be either absolute or relative.
281 # In case path is absolute - it is used as is
282 # In case path is relative - it is relative to the folder where configuration file you are reading right now is located.
284 # Path to the folder where ClickHouse configuration files common for all instances within a CHI are located.
286 # Path to the folder where ClickHouse configuration files unique for each instance (host) within a CHI are located.
288 # Path to the folder where ClickHouse configuration files with users' settings are located.
289 # Files are common for all instances within a CHI.
291 ################################################
293 ## Configuration users section
295 ################################################
297 # Default settings for user accounts, created by the operator.
298 # IMPORTANT. These are not access credentials or settings for 'default' user account,
299 # it is a template for filling out missing fields for all user accounts to be created by the operator,
300 # with the following EXCEPTIONS:
301 # 1. 'default' user account DOES NOT use provided password, but uses all the rest of the fields.
302 # Password for 'default' user account has to be provided explicitly, if to be used.
303 # 2. CHOP user account DOES NOT use:
304 # - profile setting. It uses predefined profile called 'clickhouse_operator'
305 # - quota setting. It uses empty quota name.
306 # - networks IP setting. Operator specifies 'networks/ip' user setting to match operators' pod IP only.
307 # - password setting. Password for CHOP account is used from 'clickhouse.access.*' section
309 # Default values for ClickHouse user account(s) created by the operator
310 # 1. user/profile - string
311 # 2. user/quota - string
312 # 3. user/networks/ip - multiple strings
313 # 4. user/password - string
314 # These values can be overwritten on per-user basis.
321 ################################################
323 ## Configuration network section
325 ################################################
327 # Default host_regexp to limit network connectivity from outside
328 hostRegexpTemplate: "(chi-{chi}-[^.]+\\d+-\\d+|clickhouse\\-{chi})\\.{namespace}\\.svc\\.cluster\\.local$"
329 ################################################
331 ## Configuration restart policy section
332 ## Configuration restart policy describes what configuration changes require ClickHouse restart
334 ################################################
335 configurationRestartPolicy:
338 # Special version of "*" - default version - has to satisfy all ClickHouse versions.
339 # Default version will also be used in case ClickHouse version is unknown.
340 # ClickHouse version may be unknown due to host being down - for example, because of incorrect "settings" section.
341 # ClickHouse is not willing to start in case incorrect/unknown settings are provided in config file.
344 # see https://kb.altinity.com/altinity-kb-setup-and-maintenance/altinity-kb-server-config-files/#server-config-configxml-sections-which-dont-require-restart
345 # to be replaced with "select * from system.server_settings where changeable_without_restart = 'No'"
348 - settings/access_control_path: "no"
349 - settings/dictionaries_config: "no"
350 - settings/max_server_memory_*: "no"
351 - settings/max_*_to_drop: "no"
352 - settings/max_concurrent_queries: "no"
353 - settings/models_config: "no"
354 - settings/user_defined_executable_functions_config: "no"
356 - settings/logger/*: "no"
357 - settings/macros/*: "no"
358 - settings/remote_servers/*: "no"
359 - settings/user_directories/*: "no"
360 # these settings should not lead to pod restarts
361 - settings/display_secrets_in_show_and_select: "no"
364 - files/config.d/*.xml: "yes"
365 - files/config.d/*dict*.xml: "no"
366 - files/config.d/*no_restart*: "no"
367 # exceptions in default profile
368 - profiles/default/background_*_pool_size: "yes"
369 - profiles/default/max_*_for_server: "yes"
372 - settings/logger: "yes"
373 #################################################
375 ## Access to ClickHouse instances
377 ################################################
379 # Possible values for 'scheme' are:
380 # 1. http - force http to be used to connect to ClickHouse instances
381 # 2. https - force https to be used to connect to ClickHouse instances
382 # 3. auto - either http or https is selected based on open ports
384 # ClickHouse credentials (username, password and port) to be used by the operator to connect to ClickHouse instances.
385 # These credentials are used for:
386 # 1. Metrics requests
387 # 2. Schema maintenance
388 # User with these credentials can be specified in additional ClickHouse .xml config files,
389 # located in 'clickhouse.configuration.file.path.user' folder
393 # Location of the k8s Secret with username and password to be used by the operator to connect to ClickHouse instances.
394 # Can be used instead of explicitly specified username and password available in sections:
395 # - clickhouse.access.username
396 # - clickhouse.access.password
397 # Secret should have two keys:
401 # Empty `namespace` means that k8s secret would be looked in the same namespace where operator's pod is running.
403 # Empty `name` means no k8s Secret would be looked for
404 name: '{{ include "altinity-clickhouse-operator.fullname" . }}'
405 # Port where to connect to ClickHouse instances to
407 # Timeouts used to limit connection and queries from the operator to ClickHouse instances
408 # Specified in seconds.
410 # Timout to setup connection from the operator to ClickHouse instances. In seconds.
412 # Timout to perform SQL query from the operator to ClickHouse instances. In seconds.
414 ################################################
416 ## Addons specifies additional configuration sections
417 ## Should it be called something like "templates"?
419 ################################################
434 ### users.d is global while description depends on CH version which may vary on per-host basis
435 ### In case of global-ness this may be better to implement via auto-templates
437 ### As a solution, this may be applied on the whole cluster based on any of its hosts
439 ### What to do when host is just created? CH version is not known prior to CH started and user config is required before CH started.
440 ### We do not have any info about the cluster on initial creation
443 "{clickhouseOperatorUser}/access_management": 1
444 "{clickhouseOperatorUser}/named_collection_control": 1
445 "{clickhouseOperatorUser}/show_named_collections": 1
446 "{clickhouseOperatorUser}/show_named_collections_secrets": 1
456 clickhouse_operator/format_display_secrets_in_show_and_select: 1
460 ## this may be added on per-host basis into host's conf.d folder
462 display_secrets_in_show_and_select: 1
464 #################################################
466 ## Metrics collection
468 ################################################
470 # Timeouts used to limit connection and queries from the metrics exporter to ClickHouse instances
471 # Specified in seconds.
473 # Timeout used to limit metrics collection request. In seconds.
474 # Upon reaching this timeout metrics collection is aborted and no more metrics are collected in this cycle.
475 # All collected metrics are returned.
477 # Regexp to match tables in system database to fetch metrics from.
478 # Multiple tables can be matched using regexp. Matched tables are merged using merge() table function.
479 # Default is "^(metrics|custom_metrics)$" which fetches from both system.metrics and system.custom_metrics.
480 tablesRegexp: "^(metrics|custom_metrics)$"
483 ################################################
485 ## Configuration files section
487 ################################################
489 # Each 'path' can be either absolute or relative.
490 # In case path is absolute - it is used as is
491 # In case path is relative - it is relative to the folder where configuration file you are reading right now is located.
493 # Path to the folder where Keeper configuration files common for all instances within a CHK are located.
494 common: chk/keeper_config.d
495 # Path to the folder where Keeper configuration files unique for each instance (host) within a CHK are located.
497 # Path to the folder where Keeper configuration files with users' settings are located.
498 # Files are common for all instances within a CHI.
500 ################################################
502 ## Template(s) management section
504 ################################################
507 # CHI template updates handling policy
508 # Possible policy values:
509 # - ReadOnStart. Accept CHIT updates on the operator's start only.
510 # - ApplyOnNextReconcile. Accept CHIT updates at all time. Apply new CHITs on next regular reconcile of the CHI
511 policy: ApplyOnNextReconcile
512 # Path to the folder where ClickHouseInstallation templates .yaml manifests are located.
513 # Templates are added to the list of all templates and used when CHI is reconciled.
514 # Templates are applied in sorted alpha-numeric order.
515 path: chi/templates.d
517 # CHK template updates handling policy
518 # Possible policy values:
519 # - ReadOnStart. Accept CHIT updates on the operators start only.
520 # - ApplyOnNextReconcile. Accept CHIT updates at all time. Apply new CHITs on next regular reconcile of the CHI
521 policy: ApplyOnNextReconcile
522 # Path to the folder where ClickHouseInstallation templates .yaml manifests are located.
523 # Templates are added to the list of all templates and used when CHI is reconciled.
524 # Templates are applied in sorted alpha-numeric order.
525 path: chk/templates.d
526 ################################################
530 ################################################
532 # Reconcile runtime settings
534 # Max number of concurrent CHI reconciles in progress
535 reconcileCHIsThreadsNumber: 10
536 # The operator reconciles shards concurrently in each CHI with the following limitations:
537 # 1. Number of shards being reconciled (and thus having hosts down) in each CHI concurrently
538 # can not be greater than 'reconcileShardsThreadsNumber'.
539 # 2. Percentage of shards being reconciled (and thus having hosts down) in each CHI concurrently
540 # can not be greater than 'reconcileShardsMaxConcurrencyPercent'.
541 # 3. The first shard is always reconciled alone. Concurrency starts from the second shard and onward.
542 # Thus limiting number of shards being reconciled (and thus having hosts down) in each CHI by both number and percentage
544 # Max number of concurrent shard reconciles within one cluster in progress
545 reconcileShardsThreadsNumber: 5
546 # Max percentage of concurrent shard reconciles within one cluster in progress
547 reconcileShardsMaxConcurrencyPercent: 50
548 # Reconcile StatefulSet scenario
550 # Create StatefulSet scenario
552 # What to do in case created StatefulSet is not in 'Ready' after `reconcile.statefulSet.update.timeout` seconds
554 # 1. abort - abort the process, do nothing with the problematic StatefulSet, leave it as it is,
555 # do not try to fix or delete or update it, just abort reconcile cycle.
556 # Do not proceed to the next StatefulSet(s) and wait for an admin to assist.
557 # 2. delete - delete newly created problematic StatefulSet and follow 'abort' path afterwards.
558 # 3. ignore - ignore an error, pretend nothing happened, continue reconcile and move on to the next StatefulSet.
560 # Update StatefulSet scenario
562 # How many seconds to wait for created/updated StatefulSet to be 'Ready'
564 # How many seconds to wait between checks/polls for created/updated StatefulSet status
566 # What to do in case updated StatefulSet is not in 'Ready' after `reconcile.statefulSet.update.timeout` seconds
568 # 1. abort - abort the process, do nothing with the problematic StatefulSet, leave it as it is,
569 # do not try to fix or delete or update it, just abort reconcile cycle.
570 # Do not proceed to the next StatefulSet(s) and wait for an admin to assist.
571 # 2. rollback - delete Pod and rollback StatefulSet to previous Generation.
572 # Pod would be recreated by StatefulSet based on rollback-ed StatefulSet configuration.
573 # Follow 'abort' path afterwards.
574 # 3. ignore - ignore an error, pretend nothing happened, continue reconcile and move on to the next StatefulSet.
576 # Recreate StatefulSet scenario
578 # What to do in case operator is in need to recreate StatefulSet?
580 # 1. abort - abort the process, do nothing with the problematic StatefulSet, leave it as it is,
581 # do not try to fix or delete or update it, just abort reconcile cycle.
582 # Do not proceed to the next StatefulSet(s) and wait for an admin to assist.
583 # 2. recreate - proceed and recreate StatefulSet.
585 # Triggered when PVC data loss or missing volumes are detected
587 # Triggered when StatefulSet update fails or StatefulSet is not ready
588 onUpdateFailure: recreate
589 # Reconcile Host scenario
591 # The operator during reconcile procedure should wait for a ClickHouse host to achieve the following conditions:
593 # Whether the operator during reconcile procedure should wait for a ClickHouse host:
594 # - to be excluded from a ClickHouse cluster
595 # - to complete all running queries
596 # - to be included into a ClickHouse cluster
597 # respectfully before moving forward with host reconcile
601 # The operator during reconcile procedure should wait for replicas to catch-up
602 # replication delay a.k.a replication lag for the following replicas
604 # All replicas (new and known earlier) are explicitly requested to wait for replication to catch-up
606 # New replicas only are requested to wait for replication to catch-up
608 # Replication catch-up is considered to be completed as soon as replication delay
609 # a.k.a replication lag - calculated as "MAX(absolute_delay) FROM system.replicas"
610 # is within this specified delay (in seconds)
613 # Whether the operator during host launch procedure should wait for startup probe to succeed.
614 # In case probe is unspecified wait is assumed to be completed successfully.
615 # Default option value is to do not wait.
617 # Whether the operator during host launch procedure should wait for readiness probe to succeed.
618 # In case probe is unspecified wait is assumed to be completed successfully.
619 # Default option value is to wait.
621 # The operator during reconcile procedure should drop the following entities:
624 # Whether the operator during reconcile procedure should drop replicas when replica is deleted
626 # Whether the operator during reconcile procedure should drop replicas when replica volume is lost
628 # Whether the operator during reconcile procedure should drop active replicas when replica is deleted or recreated
630 ################################################
632 ## Annotations management section
634 ################################################
637 # 1. Propagating annotations from the CHI's `metadata.annotations` to child objects' `metadata.annotations`,
638 # 2. Propagating annotations from the CHI Template's `metadata.annotations` to CHI's `metadata.annotations`,
639 # Include annotations from the following list:
640 # Applied only when not empty. Empty list means "include all, no selection"
642 # Exclude annotations from the following list:
644 ################################################
646 ## Labels management section
648 ################################################
651 # 1. Propagating labels from the CHI's `metadata.labels` to child objects' `metadata.labels`,
652 # 2. Propagating labels from the CHI Template's `metadata.labels` to CHI's `metadata.labels`,
653 # Include labels from the following list:
654 # Applied only when not empty. Empty list means "include all, no selection"
656 # Exclude labels from the following list:
657 # Applied only when not empty. Empty list means "nothing to exclude, no selection"
659 # Whether to append *Scope* labels to StatefulSet and Pod.
660 # Full list of available *scope* labels check in 'labeler.go'
661 # LabelShardScopeIndex
662 # LabelReplicaScopeIndex
664 # LabelCHIScopeCycleSize
665 # LabelCHIScopeCycleIndex
666 # LabelCHIScopeCycleOffset
667 # LabelClusterScopeIndex
668 # LabelClusterScopeCycleSize
669 # LabelClusterScopeCycleIndex
670 # LabelClusterScopeCycleOffset
672 ################################################
674 ## Metrics management section
676 ################################################
680 ################################################
682 ## Status management section
684 ################################################
691 ################################################
693 ## StatefulSet management section
695 ################################################
697 revisionHistoryLimit: 0
698 ################################################
700 ## Pod management section
702 ################################################
704 # Grace period for Pod termination.
705 # How many seconds to wait between sending
706 # SIGTERM and SIGKILL during Pod termination process.
707 # Increase this number is case of slow shutdown.
708 terminationGracePeriod: 30
709 ################################################
711 ## Log parameters section
713 ################################################
716 alsologtostderr: "false"
722 001-templates.json.example: |
724 "apiVersion": "clickhouse.altinity.com/v1",
725 "kind": "ClickHouseInstallationTemplate",
727 "name": "01-default-volumeclaimtemplate"
731 "volumeClaimTemplates": [
733 "name": "chi-default-volume-claim-template",
748 "name": "chi-default-oneperhost-pod-template",
749 "distribution": "OnePerHost",
753 "name": "clickhouse",
754 "image": "clickhouse/clickhouse-server:23.8",
758 "containerPort": 8123
762 "containerPort": 9000
765 "name": "interserver",
766 "containerPort": 9009
777 default-pod-template.yaml.example: |
778 apiVersion: "clickhouse.altinity.com/v1"
779 kind: "ClickHouseInstallationTemplate"
781 name: "default-oneperhost-pod-template"
785 - name: default-oneperhost-pod-template
786 distribution: "OnePerHost"
787 default-storage-template.yaml.example: |
788 apiVersion: "clickhouse.altinity.com/v1"
789 kind: "ClickHouseInstallationTemplate"
791 name: "default-storage-template-2Gi"
794 volumeClaimTemplates:
795 - name: default-storage-template-2Gi
803 Templates in this folder are packaged with an operator and available via 'useTemplate'
805 01-clickhouse-operator-profile.xml: |
807 <!-- This file is auto-generated -->
808 <!-- Do not edit this file - all changes would be lost -->
809 <!-- Edit appropriate template in the following folder: -->
810 <!-- deploy/builder/templates-config -->
814 # Template parameters available:
818 <!-- clickhouse-operator user is generated by the operator based on config.yaml in runtime -->
820 <clickhouse_operator>
821 <log_queries>0</log_queries>
822 <skip_unavailable_shards>1</skip_unavailable_shards>
823 <http_connection_timeout>10</http_connection_timeout>
824 <max_concurrent_queries_for_all_users>0</max_concurrent_queries_for_all_users>
825 <os_thread_priority>0</os_thread_priority>
826 </clickhouse_operator>
829 02-clickhouse-default-profile.xml: |-
831 <!-- This file is auto-generated -->
832 <!-- Do not edit this file - all changes would be lost -->
833 <!-- Edit appropriate template in the following folder: -->
834 <!-- deploy/builder/templates-config -->
839 <os_thread_priority>2</os_thread_priority>
840 <log_queries>1</log_queries>
841 <connect_timeout_with_failover_ms>1000</connect_timeout_with_failover_ms>
842 <distributed_aggregation_memory_efficient>1</distributed_aggregation_memory_efficient>
843 <parallel_view_processing>1</parallel_view_processing>
844 <do_not_merge_across_partitions_select_final>1</do_not_merge_across_partitions_select_final>
845 <load_balancing>nearest_hostname</load_balancing>
846 <prefer_localhost_replica>0</prefer_localhost_replica>
847 <!-- materialize_ttl_recalculate_only>1</materialize_ttl_recalculate_only> 21.10 and above -->
851 keeperConfdFiles: null
853 01-keeper-01-default-config.xml: |
855 <!-- This file is auto-generated -->
856 <!-- Do not edit this file - all changes would be lost -->
857 <!-- Edit appropriate template in the following folder: -->
858 <!-- deploy/builder/templates-config -->
861 <asynchronous_metrics_keeper_metrics_only>1</asynchronous_metrics_keeper_metrics_only>
863 <coordination_settings>
864 <min_session_timeout_ms>10000</min_session_timeout_ms>
865 <operation_timeout_ms>10000</operation_timeout_ms>
866 <raft_logs_level>information</raft_logs_level>
867 <session_timeout_ms>100000</session_timeout_ms>
868 </coordination_settings>
869 <hostname_checks_enabled>true</hostname_checks_enabled>
870 <log_storage_path>/var/lib/clickhouse-keeper/coordination/logs</log_storage_path>
871 <snapshot_storage_path>/var/lib/clickhouse-keeper/coordination/snapshots</snapshot_storage_path>
872 <storage_path>/var/lib/clickhouse-keeper</storage_path>
873 <tcp_port>2181</tcp_port>
875 <listen_host>::</listen_host>
876 <listen_host>0.0.0.0</listen_host>
877 <listen_try>1</listen_try>
880 <level>information</level>
882 <max_connections>4096</max_connections>
884 01-keeper-02-readiness.xml: |
886 <!-- This file is auto-generated -->
887 <!-- Do not edit this file - all changes would be lost -->
888 <!-- Edit appropriate template in the following folder: -->
889 <!-- deploy/builder/templates-config -->
896 <endpoint>/ready</endpoint>
901 01-keeper-03-enable-reconfig.xml: |-
903 <!-- This file is auto-generated -->
904 <!-- Do not edit this file - all changes would be lost -->
905 <!-- Edit appropriate template in the following folder: -->
906 <!-- deploy/builder/templates-config -->
910 <enable_reconfiguration>false</enable_reconfiguration>
913 keeperTemplatesdFiles:
915 Templates in this folder are packaged with an operator and available via 'useTemplate'
916 keeperUsersdFiles: null
917# additionalResources -- list of additional resources to create (processed via `tpl` function),
918# useful for create ClickHouse clusters together with clickhouse-operator.
919# check `kubectl explain chi` for details
920additionalResources: []
925# name: {{ include "altinity-clickhouse-operator.fullname" . }}-cm
926# namespace: {{ include "altinity-clickhouse-operator.namespace" . }}
931# name: {{ include "altinity-clickhouse-operator.fullname" . }}-s
932# namespace: {{ include "altinity-clickhouse-operator.namespace" . }}
936# apiVersion: clickhouse.altinity.com/v1
937# kind: ClickHouseInstallation
939# name: {{ include "altinity-clickhouse-operator.fullname" . }}-chi
940# namespace: {{ include "altinity-clickhouse-operator.namespace" . }}
949 # dashboards.enabled -- provision grafana dashboards as configMaps (can be synced by grafana dashboards sidecar https://github.com/grafana/helm-charts/blob/grafana-8.3.4/charts/grafana/values.yaml#L778 )
951 # dashboards.additionalLabels -- labels to add to a secret with dashboards
953 # dashboards.additionalLabels.grafana_dashboard - will watch when official grafana helm chart sidecar.dashboards.enabled=true
954 grafana_dashboard: ""
955 # dashboards.annotations -- annotations to add to a secret with dashboards
957 # dashboards.annotations.grafana_folder -- folder where will place dashboards, requires define values in official grafana helm chart sidecar.dashboards.folderAnnotation: grafana_folder
958 grafana_folder: clickhouse-operator