ClickHouseInstallations
- 描述
- define a set of Kubernetes resources (StatefulSet, PVC, Service, ConfigMap) which describe behavior one or more ClickHouse clusters
- 类型
object- 必填
spec
规格
.status
- 描述
- 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
- 类型
object
.status.taskIDsStarted
- 描述
- Started task ids
- 类型
array
.status.taskIDsStarted[]
- 类型
string
.status.taskIDsCompleted
- 描述
- Completed task ids
- 类型
array
.status.taskIDsCompleted[]
- 类型
string
.status.actions
- 描述
- Actions
- 类型
array
.status.actions[]
- 类型
string
.status.errors
- 描述
- Errors
- 类型
array
.status.errors[]
- 类型
string
.status.pods
- 描述
- Pods
- 类型
array
.status.pods[]
- 类型
string
.status.pod-ips
- 描述
- Pod IPs
- 类型
array
.status.pod-ips[]
- 类型
string
.status.fqdns
- 描述
- Pods FQDNs
- 类型
array
.status.fqdns[]
- 类型
string
.status.normalized
- 描述
- Normalized CHI requested
- 类型
object
.status.normalizedCompleted
- 描述
- Normalized CHI completed
- 类型
object
.spec
- 描述
- 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
- 类型
object
.spec.templating
- 描述
- optional, define policy for auto applying ClickHouseInstallationTemplate inside ClickHouseInstallation
- 类型
object
.spec.reconciling
- 描述
- optional, allows tuning reconciling cycle for ClickhouseInstallation from clickhouse-operator side
- 类型
object
.spec.reconciling.cleanup
- 描述
- optional, define behavior for cleanup Kubernetes resources during reconcile cycle
- 类型
object
.spec.reconciling.cleanup.unknownObjects
- 描述
- 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`
- 类型
object
.spec.reconciling.cleanup.reconcileFailedObjects
- 描述
- what clickhouse-operator shall do when reconciling Kubernetes resources are failed, default behavior is `Retain`
- 类型
object
.spec.defaults
- 描述
- 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
- 类型
object
.spec.defaults.distributedDDL
- 描述
- 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
- 类型
object
.spec.defaults.storageManagement
- 描述
- default storage management options
- 类型
object
.spec.defaults.templates
- 描述
- 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
- 类型
object
.spec.configuration
- 描述
- allows configure multiple aspects and behavior for `clickhouse-server` instance and also allows describe multiple `clickhouse-server` clusters inside one `chi` resource
- 类型
object
.spec.configuration.zookeeper
- 描述
- 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
- 类型
object
.spec.configuration.zookeeper.nodes
- 描述
- describe every available zookeeper cluster node for interaction
- 类型
array
.spec.configuration.zookeeper.nodes[]
- 类型
object
.spec.configuration.users
- 描述
- 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
- 类型
object
.spec.configuration.profiles
- 描述
- 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
- 类型
object
.spec.configuration.quotas
- 描述
- 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
- 类型
object
.spec.configuration.settings
- 描述
- 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
- 类型
object
.spec.configuration.files
- 描述
- 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
- 类型
object
.spec.configuration.clusters
- 描述
- 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
- 类型
array
.spec.configuration.clusters[]
- 类型
object
.spec.configuration.clusters[].zookeeper
- 描述
- 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
- 类型
object
.spec.configuration.clusters[].zookeeper.nodes
- 描述
- describe every available zookeeper cluster node for interaction
- 类型
array
.spec.configuration.clusters[].zookeeper.nodes[]
- 类型
object
.spec.configuration.clusters[].settings
- 描述
- 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/
- 类型
object
.spec.configuration.clusters[].files
- 描述
- 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`
- 类型
object
.spec.configuration.clusters[].templates
- 描述
- optional, configuration of the templates names which will use for generate Kubernetes resources according to selected cluster override top-level `chi.spec.configuration.templates`
- 类型
object
.spec.configuration.clusters[].schemaPolicy
- 描述
- describes how schema is propagated within replicas and shards
- 类型
object
.spec.configuration.clusters[].secret
- 描述
- optional, shared secret value to secure cluster communications
- 类型
object
.spec.configuration.clusters[].secret.valueFrom
- 描述
- Cluster shared secret source
- 类型
object
.spec.configuration.clusters[].secret.valueFrom.secretKeyRef
- 描述
- Selects a key of a secret in the clickhouse installation namespace. Should not be used if value is not empty.
- 类型
object- 必填
namekey
.spec.configuration.clusters[].layout
- 描述
- describe current cluster layout, how much shards in cluster, how much replica in shard allows override settings on each shard and replica separatelly
- 类型
object
.spec.configuration.clusters[].layout.shards
- 描述
- 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
- 类型
array
.spec.configuration.clusters[].layout.shards[]
- 类型
object
.spec.configuration.clusters[].layout.shards[].settings
- 描述
- 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/
- 类型
object
.spec.configuration.clusters[].layout.shards[].files
- 描述
- 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`
- 类型
object
.spec.configuration.clusters[].layout.shards[].templates
- 描述
- 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`
- 类型
object
.spec.configuration.clusters[].layout.shards[].replicas
- 描述
- optional, allows override behavior for selected replicas from cluster-level `chi.spec.configuration.clusters` and shard-level `chi.spec.configuration.clusters.layout.shards`
- 类型
array
.spec.configuration.clusters[].layout.shards[].replicas[]
- 类型
object
.spec.configuration.clusters[].layout.shards[].replicas[].settings
- 描述
- 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/
- 类型
object
.spec.configuration.clusters[].layout.shards[].replicas[].files
- 描述
- 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`
- 类型
object
.spec.configuration.clusters[].layout.shards[].replicas[].templates
- 描述
- 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`
- 类型
object
.spec.configuration.clusters[].layout.replicas
- 描述
- 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
- 类型
array
.spec.configuration.clusters[].layout.replicas[]
- 类型
object
.spec.configuration.clusters[].layout.replicas[].settings
- 描述
- 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/
- 类型
object
.spec.configuration.clusters[].layout.replicas[].files
- 描述
- 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
- 类型
object
.spec.configuration.clusters[].layout.replicas[].templates
- 描述
- 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`
- 类型
object
.spec.configuration.clusters[].layout.replicas[].shards
- 描述
- optional, list of shards related to current replica, will ignore if `chi.spec.configuration.clusters.layout.shards` presents
- 类型
array
.spec.configuration.clusters[].layout.replicas[].shards[]
- 类型
object
.spec.configuration.clusters[].layout.replicas[].shards[].settings
- 描述
- 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/
- 类型
object
.spec.configuration.clusters[].layout.replicas[].shards[].files
- 描述
- 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
- 类型
object
.spec.configuration.clusters[].layout.replicas[].shards[].templates
- 描述
- 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`
- 类型
object
.spec.templates
- 描述
- allows define templates which will use for render Kubernetes resources like StatefulSet, ConfigMap, Service, PVC, by default, clickhouse-operator have own templates, but you can override it
- 类型
object
.spec.templates.hostTemplates
- 描述
- hostTemplate will use during apply to generate `clickhose-server` config files
- 类型
array
.spec.templates.hostTemplates[]
- 类型
object
.spec.templates.hostTemplates[].portDistribution
- 描述
- define how will distribute numeric values of named ports in `Pod.spec.containers.ports` and clickhouse-server configs
- 类型
array
.spec.templates.hostTemplates[].portDistribution[]
- 类型
object
.spec.templates.hostTemplates[].spec
- 类型
object
.spec.templates.hostTemplates[].spec.settings
- 描述
- optional, allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in each `Pod` where this template will apply during generate `ConfigMap` which will mount in `/etc/clickhouse-server/conf.d/` More details: https://clickhouse.tech/docs/en/operations/settings/settings/
- 类型
object
.spec.templates.hostTemplates[].spec.files
- 描述
- optional, allows define content of any setting file inside each `Pod` where this template will apply during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
- 类型
object
.spec.templates.hostTemplates[].spec.templates
- 描述
- be careful, this part of CRD allows override template inside template, don't use it if you don't understand what you do
- 类型
object
.spec.templates.podTemplates
- 描述
- podTemplate will use during render `Pod` inside `StatefulSet.spec` and allows define rendered `Pod.spec`, pod scheduling distribution and pod zone More information: https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#spectemplatespodtemplates
- 类型
array
.spec.templates.podTemplates[]
- 类型
object
.spec.templates.podTemplates[].zone
- 描述
- allows define custom zone name and will separate ClickHouse `Pods` between nodes, shortcut for `chi.spec.templates.podTemplates.spec.affinity.podAntiAffinity`
- 类型
object
.spec.templates.podTemplates[].zone.values
- 描述
- optional, if defined, allows select kubernetes nodes by label with `value` in `values`
- 类型
array
.spec.templates.podTemplates[].zone.values[]
- 类型
string
.spec.templates.podTemplates[].podDistribution
- 描述
- define ClickHouse Pod distibution policy between Kubernetes Nodes inside Shard, Replica, Namespace, CHI, another ClickHouse cluster
- 类型
array
.spec.templates.podTemplates[].podDistribution[]
- 类型
object
.spec.templates.podTemplates[].spec
- 描述
- allows define whole Pod.spec inside StaefulSet.spec, look to https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates for details
- 类型
object
.spec.templates.volumeClaimTemplates
- 描述
- allows define template for rendering `PVC` kubernetes resource, which would use inside `Pod` for mount clickhouse `data`, clickhouse `logs` or something else
- 类型
array
.spec.templates.volumeClaimTemplates[]
- 类型
object
.spec.templates.volumeClaimTemplates[].spec
- 描述
- allows define all aspects of `PVC` resource More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims
- 类型
object
.spec.templates.serviceTemplates
- 描述
- allows define template for rendering `Service` which would get endpoint from Pods which scoped chi-wide, cluster-wide, shard-wide, replica-wide level
- 类型
array
.spec.templates.serviceTemplates[]
- 类型
object
.spec.templates.serviceTemplates[].spec
- 描述
- describe behavior of generated Service More info: https://kubernetes.io/docs/concepts/services-networking/service/
- 类型
object
.spec.useTemplates
- 描述
- list of `ClickHouseInstallationTemplate` (chit) resource names which will merge with current `Chi` manifest during render Kubernetes resources to create related ClickHouse clusters
- 类型
array
.spec.useTemplates[]
- 类型
object
API 端点
可用的 API 端点如下:
/apis/clickhouse.altinity.com/v1/namespaces/{namespace}/clickhouseinstallationsDELETE: delete collection of ClickHouseInstallationGET: list objects of kind ClickHouseInstallationPOST: create a new ClickHouseInstallation
/apis/clickhouse.altinity.com/v1/namespaces/{namespace}/clickhouseinstallations/{name}DELETE: delete the specified ClickHouseInstallationGET: read the specified ClickHouseInstallationPATCH: partially update the specified ClickHouseInstallationPUT: replace the specified ClickHouseInstallation
/apis/clickhouse.altinity.com/v1/namespaces/{namespace}/clickhouseinstallations/{name}/statusGET: read status of the specified ClickHouseInstallationPATCH: partially update status of the specified ClickHouseInstallationPUT: replace status of the specified ClickHouseInstallation
/apis/clickhouse.altinity.com/v1/namespaces/{namespace}/clickhouseinstallations
- HTTP 方法
DELETE- 描述
- delete collection of ClickHouseInstallation
- HTTP 响应
- HTTP 方法
GET- 描述
- list objects of kind ClickHouseInstallation
- HTTP 响应
- HTTP 方法
POST- 描述
- create a new ClickHouseInstallation
- 查询参数
- 请求体参数
- HTTP 响应
/apis/clickhouse.altinity.com/v1/namespaces/{namespace}/clickhouseinstallations/{name}
- HTTP 方法
DELETE- 描述
- delete the specified ClickHouseInstallation
- 查询参数
- HTTP 响应
- HTTP 方法
GET- 描述
- read the specified ClickHouseInstallation
- HTTP 响应
- HTTP 方法
PATCH- 描述
- partially update the specified ClickHouseInstallation
- 查询参数
- HTTP 响应
- HTTP 方法
PUT- 描述
- replace the specified ClickHouseInstallation
- 查询参数
- 请求体参数
- HTTP 响应
/apis/clickhouse.altinity.com/v1/namespaces/{namespace}/clickhouseinstallations/{name}/status
- HTTP 方法
GET- 描述
- read status of the specified ClickHouseInstallation
- HTTP 响应
- HTTP 方法
PATCH- 描述
- partially update status of the specified ClickHouseInstallation
- 查询参数
- HTTP 响应
- HTTP 方法
PUT- 描述
- replace status of the specified ClickHouseInstallation
- 查询参数
- 请求体参数
- HTTP 响应