ClickHouseInstallations
- Description
- define a set of Kubernetes resources (StatefulSet, PVC, Service, ConfigMap) which describe behavior one or more ClickHouse clusters
- Type
object- Required
spec
Specification
.status
- 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
- Type
object
.status.taskIDsStarted
- Description
- Started task ids
- Type
array
.status.taskIDsStarted[]
- Type
string
.status.taskIDsCompleted
- Description
- Completed task ids
- Type
array
.status.taskIDsCompleted[]
- Type
string
.status.actions
- Description
- Actions
- Type
array
.status.actions[]
- Type
string
.status.errors
- Description
- Errors
- Type
array
.status.errors[]
- Type
string
.status.pods
- Description
- Pods
- Type
array
.status.pods[]
- Type
string
.status.pod-ips
- Description
- Pod IPs
- Type
array
.status.pod-ips[]
- Type
string
.status.fqdns
- Description
- Pods FQDNs
- Type
array
.status.fqdns[]
- Type
string
.status.normalized
- Description
- Normalized CHI requested
- Type
object
.status.normalizedCompleted
- Description
- Normalized CHI completed
- Type
object
.spec
- 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
- Type
object
.spec.templating
- Description
- optional, define policy for auto applying ClickHouseInstallationTemplate inside ClickHouseInstallation
- Type
object
.spec.reconciling
- Description
- optional, allows tuning reconciling cycle for ClickhouseInstallation from clickhouse-operator side
- Type
object
.spec.reconciling.cleanup
- Description
- optional, define behavior for cleanup Kubernetes resources during reconcile cycle
- Type
object
.spec.reconciling.cleanup.unknownObjects
- 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`
- Type
object
.spec.reconciling.cleanup.reconcileFailedObjects
- Description
- what clickhouse-operator shall do when reconciling Kubernetes resources are failed, default behavior is `Retain`
- Type
object
.spec.defaults
- 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
- Type
object
.spec.defaults.distributedDDL
- 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
- Type
object
.spec.defaults.storageManagement
- Description
- default storage management options
- Type
object
.spec.defaults.templates
- 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
- Type
object
.spec.configuration
- Description
- allows configure multiple aspects and behavior for `clickhouse-server` instance and also allows describe multiple `clickhouse-server` clusters inside one `chi` resource
- Type
object
.spec.configuration.zookeeper
- 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
- Type
object
.spec.configuration.zookeeper.nodes
- Description
- describe every available zookeeper cluster node for interaction
- Type
array
.spec.configuration.zookeeper.nodes[]
- Type
object
.spec.configuration.users
- 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
- Type
object
.spec.configuration.profiles
- 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
- Type
object
.spec.configuration.quotas
- 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
- Type
object
.spec.configuration.settings
- 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
- Type
object
.spec.configuration.files
- 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
- Type
object
.spec.configuration.clusters
- 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
- Type
array
.spec.configuration.clusters[]
- Type
object
.spec.configuration.clusters[].zookeeper
- 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
- Type
object
.spec.configuration.clusters[].zookeeper.nodes
- Description
- describe every available zookeeper cluster node for interaction
- Type
array
.spec.configuration.clusters[].zookeeper.nodes[]
- Type
object
.spec.configuration.clusters[].settings
- 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/
- Type
object
.spec.configuration.clusters[].files
- 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`
- Type
object
.spec.configuration.clusters[].templates
- 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`
- Type
object
.spec.configuration.clusters[].schemaPolicy
- Description
- describes how schema is propagated within replicas and shards
- Type
object
.spec.configuration.clusters[].secret
- Description
- optional, shared secret value to secure cluster communications
- Type
object
.spec.configuration.clusters[].secret.valueFrom
- Description
- Cluster shared secret source
- Type
object
.spec.configuration.clusters[].secret.valueFrom.secretKeyRef
- Description
- Selects a key of a secret in the clickhouse installation namespace. Should not be used if value is not empty.
- Type
object- Required
namekey
.spec.configuration.clusters[].layout
- Description
- describe current cluster layout, how much shards in cluster, how much replica in shard allows override settings on each shard and replica separatelly
- Type
object
.spec.configuration.clusters[].layout.shards
- 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
- Type
array
.spec.configuration.clusters[].layout.shards[]
- Type
object
.spec.configuration.clusters[].layout.shards[].settings
- 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/
- Type
object
.spec.configuration.clusters[].layout.shards[].files
- 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`
- Type
object
.spec.configuration.clusters[].layout.shards[].templates
- 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`
- Type
object
.spec.configuration.clusters[].layout.shards[].replicas
- Description
- optional, allows override behavior for selected replicas from cluster-level `chi.spec.configuration.clusters` and shard-level `chi.spec.configuration.clusters.layout.shards`
- Type
array
.spec.configuration.clusters[].layout.shards[].replicas[]
- Type
object
.spec.configuration.clusters[].layout.shards[].replicas[].settings
- 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/
- Type
object
.spec.configuration.clusters[].layout.shards[].replicas[].files
- 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`
- Type
object
.spec.configuration.clusters[].layout.shards[].replicas[].templates
- 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`
- Type
object
.spec.configuration.clusters[].layout.replicas
- 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
- Type
array
.spec.configuration.clusters[].layout.replicas[]
- Type
object
.spec.configuration.clusters[].layout.replicas[].settings
- 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/
- Type
object
.spec.configuration.clusters[].layout.replicas[].files
- 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
- Type
object
.spec.configuration.clusters[].layout.replicas[].templates
- 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`
- Type
object
.spec.configuration.clusters[].layout.replicas[].shards
- Description
- optional, list of shards related to current replica, will ignore if `chi.spec.configuration.clusters.layout.shards` presents
- Type
array
.spec.configuration.clusters[].layout.replicas[].shards[]
- Type
object
.spec.configuration.clusters[].layout.replicas[].shards[].settings
- 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/
- Type
object
.spec.configuration.clusters[].layout.replicas[].shards[].files
- 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
- Type
object
.spec.configuration.clusters[].layout.replicas[].shards[].templates
- 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`
- Type
object
.spec.templates
- Description
- 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
- Type
object
.spec.templates.hostTemplates
- Description
- hostTemplate will use during apply to generate `clickhose-server` config files
- Type
array
.spec.templates.hostTemplates[]
- Type
object
.spec.templates.hostTemplates[].portDistribution
- Description
- define how will distribute numeric values of named ports in `Pod.spec.containers.ports` and clickhouse-server configs
- Type
array
.spec.templates.hostTemplates[].portDistribution[]
- Type
object
.spec.templates.hostTemplates[].spec
- Type
object
.spec.templates.hostTemplates[].spec.settings
- Description
- 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/
- Type
object
.spec.templates.hostTemplates[].spec.files
- Description
- 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/`
- Type
object
.spec.templates.hostTemplates[].spec.templates
- Description
- be careful, this part of CRD allows override template inside template, don't use it if you don't understand what you do
- Type
object
.spec.templates.podTemplates
- Description
- 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
- Type
array
.spec.templates.podTemplates[]
- Type
object
.spec.templates.podTemplates[].zone
- Description
- allows define custom zone name and will separate ClickHouse `Pods` between nodes, shortcut for `chi.spec.templates.podTemplates.spec.affinity.podAntiAffinity`
- Type
object
.spec.templates.podTemplates[].zone.values
- Description
- optional, if defined, allows select kubernetes nodes by label with `value` in `values`
- Type
array
.spec.templates.podTemplates[].zone.values[]
- Type
string
.spec.templates.podTemplates[].podDistribution
- Description
- define ClickHouse Pod distibution policy between Kubernetes Nodes inside Shard, Replica, Namespace, CHI, another ClickHouse cluster
- Type
array
.spec.templates.podTemplates[].podDistribution[]
- Type
object
.spec.templates.podTemplates[].spec
- Description
- allows define whole Pod.spec inside StaefulSet.spec, look to https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates for details
- Type
object
.spec.templates.volumeClaimTemplates
- Description
- allows define template for rendering `PVC` kubernetes resource, which would use inside `Pod` for mount clickhouse `data`, clickhouse `logs` or something else
- Type
array
.spec.templates.volumeClaimTemplates[]
- Type
object
.spec.templates.volumeClaimTemplates[].spec
- Description
- allows define all aspects of `PVC` resource More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims
- Type
object
.spec.templates.serviceTemplates
- Description
- allows define template for rendering `Service` which would get endpoint from Pods which scoped chi-wide, cluster-wide, shard-wide, replica-wide level
- Type
array
.spec.templates.serviceTemplates[]
- Type
object
.spec.templates.serviceTemplates[].spec
- Description
- describe behavior of generated Service More info: https://kubernetes.io/docs/concepts/services-networking/service/
- Type
object
.spec.useTemplates
- Description
- list of `ClickHouseInstallationTemplate` (chit) resource names which will merge with current `Chi` manifest during render Kubernetes resources to create related ClickHouse clusters
- Type
array
.spec.useTemplates[]
- Type
object
API Endpoints
The following API endpoints are available:
/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 method
DELETE- Description
- delete collection of ClickHouseInstallation
- HTTP responses
- HTTP method
GET- Description
- list objects of kind ClickHouseInstallation
- HTTP responses
- HTTP method
POST- Description
- create a new ClickHouseInstallation
- Query parameters
- Body parameters
- HTTP responses
/apis/clickhouse.altinity.com/v1/namespaces/{namespace}/clickhouseinstallations/{name}
- HTTP method
DELETE- Description
- delete the specified ClickHouseInstallation
- Query parameters
- HTTP responses
- HTTP method
GET- Description
- read the specified ClickHouseInstallation
- HTTP responses
- HTTP method
PATCH- Description
- partially update the specified ClickHouseInstallation
- Query parameters
- HTTP responses
- HTTP method
PUT- Description
- replace the specified ClickHouseInstallation
- Query parameters
- Body parameters
- HTTP responses
/apis/clickhouse.altinity.com/v1/namespaces/{namespace}/clickhouseinstallations/{name}/status
- HTTP method
GET- Description
- read status of the specified ClickHouseInstallation
- HTTP responses
- HTTP method
PATCH- Description
- partially update status of the specified ClickHouseInstallation
- Query parameters
- HTTP responses
- HTTP method
PUT- Description
- replace status of the specified ClickHouseInstallation
- Query parameters
- Body parameters
- HTTP responses