diff --git a/config/config.d/01-clickhouse-02-logger.xml b/config/config.d/01-clickhouse-02-logger.xml index b979fc900..4c7093512 100644 --- a/config/config.d/01-clickhouse-02-logger.xml +++ b/config/config.d/01-clickhouse-02-logger.xml @@ -6,7 +6,7 @@ - + debug /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.err.log diff --git a/deploy/builder/templates-config/config.d/01-clickhouse-02-logger.xml b/deploy/builder/templates-config/config.d/01-clickhouse-02-logger.xml index ad26ba354..ef4541974 100644 --- a/deploy/builder/templates-config/config.d/01-clickhouse-02-logger.xml +++ b/deploy/builder/templates-config/config.d/01-clickhouse-02-logger.xml @@ -1,6 +1,6 @@ - + debug /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.err.log diff --git a/deploy/helm/README.md b/deploy/helm/README.md index ebcc298d0..4e3ea6777 100644 --- a/deploy/helm/README.md +++ b/deploy/helm/README.md @@ -25,9 +25,9 @@ For upgrade please install CRDs separately: | Key | Type | Default | Description | |-----|------|---------|-------------| -| additionalResources | list | `[]` | list of additional resources to create (are processed via `tpl` function), useful for create ClickHouse clusters together with clickhouse-operator, look `kubectl explain chi` for details | -| affinity | object | `{}` | affinity for scheduler pod assignment, look `kubectl explain pod.spec.affinity` for details | -| configs | object | check the values.yaml file for the config content, auto-generated from latest operator release | clickhouse-operator configs | +| additionalResources | list | `[]` | list of additional resources to create (are processed via `tpl` function) | +| affinity | object | `{}` | affinity for scheduler pod assignment | +| configs | object | `{"confdFiles":null,"configdFiles":{"01-clickhouse-01-listen.xml":"\n\n\n\n\n\n\n \n ::\n 0.0.0.0\n 1\n\n","01-clickhouse-02-logger.xml":"\n\n\n\n\n\n\n \n \n debug\n /var/log/clickhouse-server/clickhouse-server.log\n /var/log/clickhouse-server/clickhouse-server.err.log\n 1000M\n 10\n \n 1\n \n\n","01-clickhouse-03-query_log.xml":"\n\n\n\n\n\n\n \n system\n query_log
\n Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 30 day\n 7500\n
\n \n
\n","01-clickhouse-04-part_log.xml":"\n\n\n\n\n\n\n \n system\n part_log
\n Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 30 day\n 7500\n
\n
\n","01-clickhouse-05-trace_log.xml":"\n\n\n\n\n\n\n \n system\n trace_log
\n Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 30 day\n 7500\n
\n
"},"files":{"config.yaml":"# IMPORTANT\n# This file is auto-generated\n# Do not edit this file - all changes would be lost\n# Edit appropriate template in the following folder:\n# deploy/builder/templates-config\n# IMPORTANT\n#\n# Template parameters available:\n# WATCH_NAMESPACES=\n# CH_USERNAME_PLAIN=\n# CH_PASSWORD_PLAIN=\n# CH_CREDENTIALS_SECRET_NAMESPACE=\n# CH_CREDENTIALS_SECRET_NAME=clickhouse-operator\n\n################################################\n##\n## Watch section\n##\n################################################\nwatch:\n # List of namespaces where clickhouse-operator watches for events.\n # Concurrently running operators should watch on different namespaces.\n # IMPORTANT\n # Regexp is applicable.\n #namespaces: [\"dev\", \"test\"]\n namespaces: []\n\nclickhouse:\n configuration:\n ################################################\n ##\n ## Configuration files section\n ##\n ################################################\n file:\n path:\n # Path to the folder where ClickHouse configuration files common for all instances within a CHI are located.\n common: config.d\n # Path to the folder where ClickHouse configuration files unique for each instance (host) within a CHI are located.\n host: conf.d\n # Path to the folder where ClickHouse configuration files with users' settings are located.\n # Files are common for all instances within a CHI.\n user: users.d\n ################################################\n ##\n ## Configuration users section\n ##\n ################################################\n user:\n # Default settings for user accounts, created by the operator.\n # IMPORTANT. These are not access credentials or settings for 'default' user account,\n # it is a template for filling out missing fields for all user accounts to be created by the operator,\n # with the following EXCEPTIONS:\n # 1. 'default' user account DOES NOT use provided password, but uses all the rest of the fields.\n # Password for 'default' user account has to be provided explicitly, if to be used.\n # 2. CHOP user account DOES NOT use:\n # - profile setting. It uses predefined profile called 'clickhouse_operator'\n # - quota setting. It uses empty quota name.\n # - networks IP setting. Operator specifies 'networks/ip' user setting to match operators' pod IP only.\n # - password setting. Password for CHOP account is used from 'clickhouse.access.*' section\n default:\n # Default values for ClickHouse user account(s) created by the operator\n # 1. user/profile - string\n # 2. user/quota - string\n # 3. user/networks/ip - multiple strings\n # 4. user/password - string\n # These values can be overwritten on per-user basis.\n profile: \"default\"\n quota: \"default\"\n networksIP:\n - \"::1\"\n - \"127.0.0.1\"\n password: \"default\"\n ################################################\n ##\n ## Configuration network section\n ##\n ################################################\n network:\n # Default host_regexp to limit network connectivity from outside\n hostRegexpTemplate: \"(chi-{chi}-[^.]+\\\\d+-\\\\d+|clickhouse\\\\-{chi})\\\\.{namespace}\\\\.svc\\\\.cluster\\\\.local$\"\n\n ################################################\n ##\n ## Configuration restart policy section\n ## Configuration restart policy describes what configuration changes require ClickHouse restart\n ##\n ################################################\n configurationRestartPolicy:\n rules:\n # IMPORTANT!\n # Default version will also be used in case ClickHouse version is unknown.\n # ClickHouse version may be unknown due to host being down - for example, because of incorrect \"settings\" section.\n # ClickHouse is not willing to start in case incorrect/unknown settings are provided in config file.\n - version: \"*\"\n rules:\n - settings/*: \"yes\"\n - settings/dictionaries_config: \"no\"\n - settings/logger: \"no\"\n - settings/macros/*: \"no\"\n - settings/max_server_memory_*: \"no\"\n - settings/max_*_to_drop: \"no\"\n - settings/max_concurrent_queries: \"no\"\n - settings/models_config: \"no\"\n - settings/user_defined_executable_functions_config: \"no\"\n\n - zookeeper/*: \"yes\"\n\n - files/config.d/*.xml: \"yes\"\n - files/config.d/*dict*.xml: \"no\"\n\n - profiles/default/background_*_pool_size: \"yes\"\n - profiles/default/max_*_for_server: \"yes\"\n - version: \"21.*\"\n rules:\n - settings/logger: \"yes\"\n\n #################################################\n ##\n ## Access to ClickHouse instances\n ##\n ################################################\n access:\n # Possible values for 'scheme' are:\n # 1. http - force http to be used to connect to ClickHouse instances\n # 2. https - force https to be used to connect to ClickHouse instances\n # 3. auto - either http or https is selected based on open ports\n scheme: \"auto\"\n # ClickHouse credentials (username, password and port) to be used by the operator to connect to ClickHouse instances.\n # These credentials are used for:\n # 1. Metrics requests\n # 2. Schema maintenance\n # 3. DROP DNS CACHE\n # User with these credentials can be specified in additional ClickHouse .xml config files,\n # located in 'clickhouse.configuration.file.path.user' folder\n username: \"\"\n password: \"\"\n rootCA: \"\"\n\n # Location of the k8s Secret with username and password to be used by the operator to connect to ClickHouse instances.\n # Can be used instead of explicitly specified username and password available in sections:\n # - clickhouse.access.username\n # - clickhouse.access.password\n # Secret should have two keys:\n # 1. username\n # 2. password\n secret:\n # Empty `namespace` means that k8s secret would be looked in the same namespace where operator's pod is running.\n namespace: \"\"\n # Empty `name` means no k8s Secret would be looked for\n name: \"{{ include \"altinity-clickhouse-operator.fullname\" . }}\"\n # Port where to connect to ClickHouse instances to\n port: 8123\n\n # Timeouts used to limit connection and queries from the operator to ClickHouse instances\n # Specified in seconds.\n timeouts:\n # Timout to setup connection from the operator to ClickHouse instances. In seconds.\n connect: 1\n # Timout to perform SQL query from the operator to ClickHouse instances. In seconds.\n query: 4\n\n #################################################\n ##\n ## Metrics collection\n ##\n ################################################\n\n metrics:\n # Timeouts used to limit connection and queries from the metrics exporter to ClickHouse instances\n # Specified in seconds.\n timeouts:\n # Timeout used to limit metrics collection request. In seconds.\n # Upon reaching this timeout metrics collection is aborted and no more metrics are collected in this cycle.\n # All collected metrics are returned.\n collect: 9\n\n################################################\n##\n## Template(s) management section\n##\n################################################\ntemplate:\n chi:\n # CHI template updates handling policy\n # Possible policy values:\n # - ReadOnStart. Accept CHIT updates on the operators start only.\n # - ApplyOnNextReconcile. Accept CHIT updates at all time. Apply news CHITs on next regular reconcile of the CHI\n policy: ApplyOnNextReconcile\n\n # Path to the folder where ClickHouseInstallation templates .yaml manifests are located.\n # Templates are added to the list of all templates and used when CHI is reconciled.\n # Templates are applied in sorted alpha-numeric order.\n path: templates.d\n\n################################################\n##\n## Reconcile section\n##\n################################################\nreconcile:\n # Reconcile runtime settings\n runtime:\n # Max number of concurrent CHI reconciles in progress\n reconcileCHIsThreadsNumber: 10\n\n # The operator reconciles shards concurrently in each CHI with the following limitations:\n # 1. Number of shards being reconciled (and thus having hosts down) in each CHI concurrently\n # can not be greater than 'reconcileShardsThreadsNumber'.\n # 2. Percentage of shards being reconciled (and thus having hosts down) in each CHI concurrently\n # can not be greater than 'reconcileShardsMaxConcurrencyPercent'.\n # 3. The first shard is always reconciled alone. Concurrency starts from the second shard and onward.\n # Thus limiting number of shards being reconciled (and thus having hosts down) in each CHI by both number and percentage\n\n # Max number of concurrent shard reconciles within one CHI in progress\n reconcileShardsThreadsNumber: 5\n # Max percentage of concurrent shard reconciles within one CHI in progress\n reconcileShardsMaxConcurrencyPercent: 50\n\n # Reconcile StatefulSet scenario\n statefulSet:\n # Create StatefulSet scenario\n create:\n # What to do in case created StatefulSet is not in 'Ready' after `reconcile.statefulSet.update.timeout` seconds\n # Possible options:\n # 1. abort - abort the process, do nothing with the problematic StatefulSet, leave it as it is,\n # do not try to fix or delete or update it, just abort reconcile cycle.\n # Do not proceed to the next StatefulSet(s) and wait for an admin to assist.\n # 2. delete - delete newly created problematic StatefulSet and follow 'abort' path afterwards.\n # 3. ignore - ignore an error, pretend nothing happened, continue reconcile and move on to the next StatefulSet.\n onFailure: ignore\n\n # Update StatefulSet scenario\n update:\n # How many seconds to wait for created/updated StatefulSet to be 'Ready'\n timeout: 300\n # How many seconds to wait between checks/polls for created/updated StatefulSet status\n pollInterval: 5\n # What to do in case updated StatefulSet is not in 'Ready' after `reconcile.statefulSet.update.timeout` seconds\n # Possible options:\n # 1. abort - abort the process, do nothing with the problematic StatefulSet, leave it as it is,\n # do not try to fix or delete or update it, just abort reconcile cycle.\n # Do not proceed to the next StatefulSet(s) and wait for an admin to assist.\n # 2. rollback - delete Pod and rollback StatefulSet to previous Generation.\n # Pod would be recreated by StatefulSet based on rollback-ed StatefulSet configuration.\n # Follow 'abort' path afterwards.\n # 3. ignore - ignore an error, pretend nothing happened, continue reconcile and move on to the next StatefulSet.\n onFailure: abort\n\n # Reconcile Host scenario\n host:\n # Whether the operator during reconcile procedure should wait for a ClickHouse host:\n # - to be excluded from a ClickHouse cluster\n # - to complete all running queries\n # - to be included into a ClickHouse cluster\n # respectfully before moving forward\n wait:\n exclude: true\n queries: true\n include: false\n\n################################################\n##\n## Annotations management section\n##\n################################################\nannotation:\n # Applied when:\n # 1. Propagating annotations from the CHI's `metadata.annotations` to child objects' `metadata.annotations`,\n # 2. Propagating annotations from the CHI Template's `metadata.annotations` to CHI's `metadata.annotations`,\n # Include annotations from the following list:\n # Applied only when not empty. Empty list means \"include all, no selection\"\n include: []\n # Exclude annotations from the following list:\n exclude: []\n\n################################################\n##\n## Labels management section\n##\n################################################\nlabel:\n # Applied when:\n # 1. Propagating labels from the CHI's `metadata.labels` to child objects' `metadata.labels`,\n # 2. Propagating labels from the CHI Template's `metadata.labels` to CHI's `metadata.labels`,\n # Include labels from the following list:\n # Applied only when not empty. Empty list means \"include all, no selection\"\n include: []\n # Exclude labels from the following list:\n # Applied only when not empty. Empty list means \"nothing to exclude, no selection\"\n exclude: []\n # Whether to append *Scope* labels to StatefulSet and Pod.\n # Full list of available *scope* labels check in 'labeler.go'\n # LabelShardScopeIndex\n # LabelReplicaScopeIndex\n # LabelCHIScopeIndex\n # LabelCHIScopeCycleSize\n # LabelCHIScopeCycleIndex\n # LabelCHIScopeCycleOffset\n # LabelClusterScopeIndex\n # LabelClusterScopeCycleSize\n # LabelClusterScopeCycleIndex\n # LabelClusterScopeCycleOffset\n appendScope: \"no\"\n\n################################################\n##\n## StatefulSet management section\n##\n################################################\nstatefulSet:\n revisionHistoryLimit: 0\n\n################################################\n##\n## Pod management section\n##\n################################################\npod:\n # Grace period for Pod termination.\n # How many seconds to wait between sending\n # SIGTERM and SIGKILL during Pod termination process.\n # Increase this number is case of slow shutdown.\n terminationGracePeriod: 30\n\n################################################\n##\n## Log parameters section\n##\n################################################\nlogger:\n logtostderr: \"true\"\n alsologtostderr: \"false\"\n v: \"1\"\n stderrthreshold: \"\"\n vmodule: \"\"\n log_backtrace_at: \"\""},"templatesdFiles":{"001-templates.json.example":"{\n \"apiVersion\": \"clickhouse.altinity.com/v1\",\n \"kind\": \"ClickHouseInstallationTemplate\",\n \"metadata\": {\n \"name\": \"01-default-volumeclaimtemplate\"\n },\n \"spec\": {\n \"templates\": {\n \"volumeClaimTemplates\": [\n {\n \"name\": \"chi-default-volume-claim-template\",\n \"spec\": {\n \"accessModes\": [\n \"ReadWriteOnce\"\n ],\n \"resources\": {\n \"requests\": {\n \"storage\": \"2Gi\"\n }\n }\n }\n }\n ],\n \"podTemplates\": [\n {\n \"name\": \"chi-default-oneperhost-pod-template\",\n \"distribution\": \"OnePerHost\",\n \"spec\": {\n \"containers\" : [\n {\n \"name\": \"clickhouse\",\n \"image\": \"clickhouse/clickhouse-server:22.3\",\n \"ports\": [\n {\n \"name\": \"http\",\n \"containerPort\": 8123\n },\n {\n \"name\": \"client\",\n \"containerPort\": 9000\n },\n {\n \"name\": \"interserver\",\n \"containerPort\": 9009\n }\n ]\n }\n ]\n }\n }\n ]\n }\n }\n}\n","default-pod-template.yaml.example":"apiVersion: \"clickhouse.altinity.com/v1\"\nkind: \"ClickHouseInstallationTemplate\"\nmetadata:\n name: \"default-oneperhost-pod-template\"\nspec:\n templates:\n podTemplates:\n - name: default-oneperhost-pod-template\n distribution: \"OnePerHost\"\n","default-storage-template.yaml.example":"apiVersion: \"clickhouse.altinity.com/v1\"\nkind: \"ClickHouseInstallationTemplate\"\nmetadata:\n name: \"default-storage-template-2Gi\"\nspec:\n templates:\n volumeClaimTemplates:\n - name: default-storage-template-2Gi\n spec:\n accessModes:\n - ReadWriteOnce\n resources:\n requests:\n storage: 2Gi\n","readme":"Templates in this folder are packaged with an operator and available via 'useTemplate'"},"usersdFiles":{"01-clickhouse-operator-profile.xml":"\n\n\n\n\n\n\n\n \n \n \n 0\n 1\n 10\n 0\n 0\n \n \n\n","02-clickhouse-default-profile.xml":"\n\n\n\n\n\n\n \n \n 2\n 1\n 1000\n 1\n 1\n 1\n nearest_hostname\n \n \n"}}` | clickhouse configs | | dashboards.additionalLabels | object | `{"grafana_dashboard":""}` | labels to add to a secret with dashboards | | dashboards.annotations | object | `{}` | annotations to add to a secret with dashboards | | dashboards.enabled | bool | `false` | provision grafana dashboards as secrets (can be synced by grafana dashboards sidecar https://github.com/grafana/helm-charts/blob/grafana-6.33.1/charts/grafana/values.yaml#L679 ) | diff --git a/deploy/helm/values.yaml b/deploy/helm/values.yaml index 45c1c49b4..5ec8bf985 100644 --- a/deploy/helm/values.yaml +++ b/deploy/helm/values.yaml @@ -109,7 +109,7 @@ configs: - + debug /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.err.log diff --git a/deploy/operator/clickhouse-operator-install-ansible.yaml b/deploy/operator/clickhouse-operator-install-ansible.yaml index 7a55b59af..86d41f4b7 100644 --- a/deploy/operator/clickhouse-operator-install-ansible.yaml +++ b/deploy/operator/clickhouse-operator-install-ansible.yaml @@ -3765,7 +3765,7 @@ data: - + debug /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.err.log diff --git a/deploy/operator/clickhouse-operator-install-bundle-v1beta1.yaml b/deploy/operator/clickhouse-operator-install-bundle-v1beta1.yaml index c5ff3918b..3873e0312 100644 --- a/deploy/operator/clickhouse-operator-install-bundle-v1beta1.yaml +++ b/deploy/operator/clickhouse-operator-install-bundle-v1beta1.yaml @@ -3723,7 +3723,7 @@ data: - + debug /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.err.log diff --git a/deploy/operator/clickhouse-operator-install-bundle.yaml b/deploy/operator/clickhouse-operator-install-bundle.yaml index 1b9b8201a..67ca53ca3 100644 --- a/deploy/operator/clickhouse-operator-install-bundle.yaml +++ b/deploy/operator/clickhouse-operator-install-bundle.yaml @@ -3758,7 +3758,7 @@ data: - + debug /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.err.log diff --git a/deploy/operator/clickhouse-operator-install-template-v1beta1.yaml b/deploy/operator/clickhouse-operator-install-template-v1beta1.yaml index 444cc9848..8b33f9fae 100644 --- a/deploy/operator/clickhouse-operator-install-template-v1beta1.yaml +++ b/deploy/operator/clickhouse-operator-install-template-v1beta1.yaml @@ -3723,7 +3723,7 @@ data: - + debug /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.err.log diff --git a/deploy/operator/clickhouse-operator-install-template.yaml b/deploy/operator/clickhouse-operator-install-template.yaml index c0ba27109..36ecae874 100644 --- a/deploy/operator/clickhouse-operator-install-template.yaml +++ b/deploy/operator/clickhouse-operator-install-template.yaml @@ -3758,7 +3758,7 @@ data: - + debug /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.err.log diff --git a/deploy/operator/clickhouse-operator-install-tf.yaml b/deploy/operator/clickhouse-operator-install-tf.yaml index 3da1417d5..507fff046 100644 --- a/deploy/operator/clickhouse-operator-install-tf.yaml +++ b/deploy/operator/clickhouse-operator-install-tf.yaml @@ -3765,7 +3765,7 @@ data: - + debug /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.err.log