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

PropertyTypeDescription
apiVersionstring

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kindstring

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadataObjectMeta

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

statusobject

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

specobject

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

.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
PropertyTypeDescription
chop-versionstring

ClickHouse operator version

chop-commitstring

ClickHouse operator git commit SHA

chop-datestring

ClickHouse operator build date

chop-ipstring

IP address of the operator's pod which managed this CHI

clustersinteger

Clusters count

shardsinteger

Shards count

replicasinteger

Replicas count

hostsinteger

Hosts count

statusstring

Status

taskIDstring

Current task id

taskIDsStartedarray

Started task ids

taskIDsCompletedarray

Completed task ids

actionstring

Action

actionsarray

Actions

errorstring

Last error

errorsarray

Errors

updatedinteger

Updated Hosts count

addedinteger

Added Hosts count

deletedinteger

Deleted Hosts count

deleteinteger

About to delete Hosts count

podsarray

Pods

pod-ipsarray

Pod IPs

fqdnsarray

Pods FQDNs

endpointstring

Endpoint

generationinteger

Generation

normalizedobject

Normalized CHI requested

normalizedCompletedobject

Normalized CHI completed

.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
PropertyTypeDescription
taskIDstring

Allows to define custom taskID for named update operation and watch status of this update execution in .status.taskIDs field. By default every update of chi manifest will generate random taskID

stopstring

Allow stop all ClickHouse clusters described in current chi. Stop mechanism works as follows:

  • When stop is 1 then setup Replicas: 0 in each related to current chi StatefulSet resource, all Pods and Service resources will desctroy, but PVCs still live
  • When stop is 0 then Pods will created again and will attach retained PVCs and Service also will created again
restartstring

This is a 'soft restart' button. When set to 'RollingUpdate' operator will restart ClickHouse pods in a graceful way. Remove it after the use in order to avoid unneeded restarts

troubleshootstring

allows troubleshoot Pods during CrashLoopBack state, when you apply wrong configuration, clickhouse-server wouldn't startup

namespaceDomainPatternstring

custom domain suffix which will add to end of Service or Pod name, use it when you use custom cluster domain in your Kubernetes cluster

templatingobject

optional, define policy for auto applying ClickHouseInstallationTemplate inside ClickHouseInstallation

reconcilingobject

optional, allows tuning reconciling cycle for ClickhouseInstallation from clickhouse-operator side

defaultsobject

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

configurationobject

allows configure multiple aspects and behavior for clickhouse-server instance and also allows describe multiple clickhouse-server clusters inside one chi resource

templatesobject

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

useTemplatesarray

list of ClickHouseInstallationTemplate (chit) resource names which will merge with current Chi manifest during render Kubernetes resources to create related ClickHouse clusters

.spec.templating

Description
optional, define policy for auto applying ClickHouseInstallationTemplate inside ClickHouseInstallation
Type
object
PropertyTypeDescription
policystring

when defined as auto inside ClickhouseInstallationTemplate, it will auto add into all ClickHouseInstallation, manual value is default

.spec.reconciling

Description
optional, allows tuning reconciling cycle for ClickhouseInstallation from clickhouse-operator side
Type
object
PropertyTypeDescription
policystring

DEPRECATED

configMapPropagationTimeoutinteger

timeout in seconds when clickhouse-operator will wait when applied ConfigMap during reconcile ClickhouseInstallation pods will updated from cache see details: https://kubernetes.io/docs/concepts/configuration/configmap/#mounted-configmaps-are-updated-automatically

cleanupobject

optional, define behavior for cleanup Kubernetes resources during reconcile cycle

.spec.reconciling.cleanup

Description
optional, define behavior for cleanup Kubernetes resources during reconcile cycle
Type
object
PropertyTypeDescription
unknownObjectsobject

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

reconcileFailedObjectsobject

what clickhouse-operator shall do when reconciling Kubernetes resources are failed, default behavior is Retain

.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
PropertyTypeDescription
statefulSetstring

behavior policy for unknown StatefulSet, Delete by default

pvcstring

behavior policy for unknown PVC, Delete by default

configMapstring

behavior policy for unknown ConfigMap, Delete by default

servicestring

behavior policy for unknown Service, Delete by default

.spec.reconciling.cleanup.reconcileFailedObjects

Description
what clickhouse-operator shall do when reconciling Kubernetes resources are failed, default behavior is `Retain`
Type
object
PropertyTypeDescription
statefulSetstring

behavior policy for failed StatefulSet reconciling, Retain by default

pvcstring

behavior policy for failed PVC reconciling, Retain by default

configMapstring

behavior policy for failed ConfigMap reconciling, Retain by default

servicestring

behavior policy for failed Service reconciling, Retain by default

.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
PropertyTypeDescription
replicasUseFQDNstring

define should replicas be specified by FQDN in <host></host>. In case of "no" will use short hostname and clickhouse-server will use kubernetes default suffixes for DNS lookup "yes" by default

distributedDDLobject

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

storageManagementobject

default storage management options

templatesobject

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

.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
PropertyTypeDescription
profilestring

Settings from this profile will be used to execute DDL queries

.spec.defaults.storageManagement

Description
default storage management options
Type
object
PropertyTypeDescription
provisionerstring

defines PVC provisioner - be it StatefulSet or the Operator

reclaimPolicystring

defines behavior of PVC deletion. Delete by default, if Retain specified then PVC will be kept when deleting StatefulSet

.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
PropertyTypeDescription
hostTemplatestring

optional, template name from chi.spec.templates.hostTemplates, which will apply to configure every clickhouse-server instance during render ConfigMap resources which will mount into Pod

podTemplatestring

optional, template name from chi.spec.templates.podTemplates, allows customization each Pod resource during render and reconcile each StatefulSet.spec resource described in chi.spec.configuration.clusters

dataVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse data directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

logVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse log directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

serviceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for one Service resource which will created by clickhouse-operator which cover all clusters in whole chi resource

clusterServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each clickhouse cluster described in chi.spec.configuration.clusters

shardServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each shard inside clickhouse cluster described in chi.spec.configuration.clusters

replicaServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each replica inside each shard inside each clickhouse cluster described in chi.spec.configuration.clusters

volumeClaimTemplatestring

DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate

.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
PropertyTypeDescription
zookeeperobject

allows configure .. 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

usersobject

allows configure .. 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

profilesobject

allows configure .. 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

quotasobject

allows configure .. 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

settingsobject

allows configure clickhouse-server settings inside ... 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

filesobject

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

clustersarray

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

.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
PropertyTypeDescription
nodesarray

describe every available zookeeper cluster node for interaction

session_timeout_msinteger

session timeout during connect to Zookeeper

operation_timeout_msinteger

one operation timeout during Zookeeper transactions

rootstring

optional root znode path inside zookeeper to store ClickHouse related data (replication queue or distributed DDL)

identitystring

optional access credentials string with user:password format used when use digest authorization in Zookeeper

.spec.configuration.zookeeper.nodes

Description
describe every available zookeeper cluster node for interaction
Type
array

.spec.configuration.zookeeper.nodes[]

Type
object
PropertyTypeDescription
hoststring

dns name or ip address for Zookeeper node

portinteger

TCP port which used to connect to Zookeeper node

.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
PropertyTypeDescription
namestring

cluster name, used to identify set of ClickHouse servers and wide used during generate names of related Kubernetes resources

zookeeperobject

optional, allows configure .. 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

settingsobject

optional, allows configure clickhouse-server settings inside ... 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/

filesobject

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

templatesobject

optional, configuration of the templates names which will use for generate Kubernetes resources according to selected cluster override top-level chi.spec.configuration.templates

schemaPolicyobject

describes how schema is propagated within replicas and shards

secretobject

optional, shared secret value to secure cluster communications

layoutobject

describe current cluster layout, how much shards in cluster, how much replica in shard allows override settings on each shard and replica separatelly

.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
PropertyTypeDescription
nodesarray

describe every available zookeeper cluster node for interaction

session_timeout_msinteger

session timeout during connect to Zookeeper

operation_timeout_msinteger

one operation timeout during Zookeeper transactions

rootstring

optional root znode path inside zookeeper to store ClickHouse related data (replication queue or distributed DDL)

identitystring

optional access credentials string with user:password format used when use digest authorization in Zookeeper

.spec.configuration.clusters[].zookeeper.nodes

Description
describe every available zookeeper cluster node for interaction
Type
array

.spec.configuration.clusters[].zookeeper.nodes[]

Type
object
PropertyTypeDescription
hoststring

dns name or ip address for Zookeeper node

portinteger

TCP port which used to connect to Zookeeper node

.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
PropertyTypeDescription
hostTemplatestring

optional, template name from chi.spec.templates.hostTemplates, which will apply to configure every clickhouse-server instance during render ConfigMap resources which will mount into Pod

podTemplatestring

optional, template name from chi.spec.templates.podTemplates, allows customization each Pod resource during render and reconcile each StatefulSet.spec resource described in chi.spec.configuration.clusters

dataVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse data directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

logVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse log directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

serviceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for one Service resource which will created by clickhouse-operator which cover all clusters in whole chi resource

clusterServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each clickhouse cluster described in chi.spec.configuration.clusters

shardServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each shard inside clickhouse cluster described in chi.spec.configuration.clusters

replicaServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each replica inside each shard inside each clickhouse cluster described in chi.spec.configuration.clusters

volumeClaimTemplatestring

DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate

.spec.configuration.clusters[].schemaPolicy

Description
describes how schema is propagated within replicas and shards
Type
object
PropertyTypeDescription
replicastring

how schema is propagated within a replica

shardstring

how schema is propagated between shards

.spec.configuration.clusters[].secret

Description
optional, shared secret value to secure cluster communications
Type
object
PropertyTypeDescription
autostring

Auto-generate shared secret value to secure cluster communications

valuestring

Cluster shared secret value in plain text

valueFromobject

Cluster shared secret source

.spec.configuration.clusters[].secret.valueFrom

Description
Cluster shared secret source
Type
object
PropertyTypeDescription
secretKeyRefobject

Selects a key of a secret in the clickhouse installation namespace. Should not be used if value is not empty.

.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
PropertyTypeDescription
namestring

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

keystring

The key of the secret to select from. Must be a valid secret key.

optionalboolean

Specify whether the Secret or its key must be defined

.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
PropertyTypeDescription
typestring

DEPRECATED - to be removed soon

shardsCountinteger

how much shards for current ClickHouse cluster will run in Kubernetes, each shard contains shared-nothing part of data and contains set of replicas, cluster contains 1 shard by default

replicasCountinteger

how much replicas in each shards for current ClickHouse cluster will run in Kubernetes, each replica is a separate StatefulSet which contains only one Pod with clickhouse-server instance, every shard contains 1 replica by default

shardsarray

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

replicasarray

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

.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
PropertyTypeDescription
namestring

optional, by default shard name is generated, but you can override it and setup custom name

definitionTypestring

DEPRECATED - to be removed soon

weightinteger

optional, 1 by default, allows setup shard setting which will use during insert into tables with Distributed engine, will apply in <remote_servers> inside ConfigMap which will mount in /etc/clickhouse-server/config.d/chop-generated-remote_servers.xml More details: https://clickhouse.tech/docs/en/engines/table-engines/special/distributed/

internalReplicationstring

optional, true by default when chi.spec.configuration.clusters[].layout.ReplicaCount > 1 and 0 otherwise allows setup <internal_replication> setting which will use during insert into tables with Distributed engine for insert only in one live replica and other replicas will download inserted data during replication, will apply in <remote_servers> inside ConfigMap which will mount in /etc/clickhouse-server/config.d/chop-generated-remote_servers.xml More details: https://clickhouse.tech/docs/en/engines/table-engines/special/distributed/

settingsobject

optional, allows configure clickhouse-server settings inside ... 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/

filesobject

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

templatesobject

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

replicasCountinteger

optional, how much replicas in selected shard for selected ClickHouse cluster will run in Kubernetes, each replica is a separate StatefulSet which contains only one Pod with clickhouse-server instance, shard contains 1 replica by default override cluster-level chi.spec.configuration.clusters.layout.replicasCount

replicasarray

optional, allows override behavior for selected replicas from cluster-level chi.spec.configuration.clusters and shard-level chi.spec.configuration.clusters.layout.shards

.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
PropertyTypeDescription
hostTemplatestring

optional, template name from chi.spec.templates.hostTemplates, which will apply to configure every clickhouse-server instance during render ConfigMap resources which will mount into Pod

podTemplatestring

optional, template name from chi.spec.templates.podTemplates, allows customization each Pod resource during render and reconcile each StatefulSet.spec resource described in chi.spec.configuration.clusters

dataVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse data directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

logVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse log directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

serviceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for one Service resource which will created by clickhouse-operator which cover all clusters in whole chi resource

clusterServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each clickhouse cluster described in chi.spec.configuration.clusters

shardServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each shard inside clickhouse cluster described in chi.spec.configuration.clusters

replicaServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each replica inside each shard inside each clickhouse cluster described in chi.spec.configuration.clusters

volumeClaimTemplatestring

DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate

.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
PropertyTypeDescription
namestring

optional, by default replica name is generated, but you can override it and setup custom name

secureboolean

optional, setup secure inside clickhouse-server settings for each Pod where current template will apply if specified

tcpPortinteger

optional, setup Pod.spec.containers.ports with name tcp for selected replica, override chi.spec.templates.hostTemplates.spec.tcpPort allows connect to clickhouse-server via TCP Native protocol via kubernetes Service

httpPortinteger

optional, setup Pod.spec.containers.ports with name http for selected replica, override chi.spec.templates.hostTemplates.spec.httpPort allows connect to clickhouse-server via HTTP protocol via kubernetes Service

interserverHTTPPortinteger

optional, setup Pod.spec.containers.ports with name interserver for selected replica, override chi.spec.templates.hostTemplates.spec.interserverHTTPPort allows connect between replicas inside same shard during fetch replicated data parts HTTP protocol

settingsobject

optional, allows configure clickhouse-server settings inside ... 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/

filesobject

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

templatesobject

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

.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
PropertyTypeDescription
hostTemplatestring

optional, template name from chi.spec.templates.hostTemplates, which will apply to configure every clickhouse-server instance during render ConfigMap resources which will mount into Pod

podTemplatestring

optional, template name from chi.spec.templates.podTemplates, allows customization each Pod resource during render and reconcile each StatefulSet.spec resource described in chi.spec.configuration.clusters

dataVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse data directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

logVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse log directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

serviceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for one Service resource which will created by clickhouse-operator which cover all clusters in whole chi resource

clusterServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each clickhouse cluster described in chi.spec.configuration.clusters

shardServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each shard inside clickhouse cluster described in chi.spec.configuration.clusters

replicaServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each replica inside each shard inside each clickhouse cluster described in chi.spec.configuration.clusters

volumeClaimTemplatestring

DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate

.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
PropertyTypeDescription
namestring

optional, by default replica name is generated, but you can override it and setup custom name

settingsobject

optional, allows configure clickhouse-server settings inside ... 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/

filesobject

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

templatesobject

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

shardsCountinteger

optional, count of shards related to current replica, you can override each shard behavior on low-level chi.spec.configuration.clusters.layout.replicas.shards

shardsarray

optional, list of shards related to current replica, will ignore if chi.spec.configuration.clusters.layout.shards presents

.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
PropertyTypeDescription
hostTemplatestring

optional, template name from chi.spec.templates.hostTemplates, which will apply to configure every clickhouse-server instance during render ConfigMap resources which will mount into Pod

podTemplatestring

optional, template name from chi.spec.templates.podTemplates, allows customization each Pod resource during render and reconcile each StatefulSet.spec resource described in chi.spec.configuration.clusters

dataVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse data directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

logVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse log directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

serviceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for one Service resource which will created by clickhouse-operator which cover all clusters in whole chi resource

clusterServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each clickhouse cluster described in chi.spec.configuration.clusters

shardServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each shard inside clickhouse cluster described in chi.spec.configuration.clusters

replicaServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each replica inside each shard inside each clickhouse cluster described in chi.spec.configuration.clusters

volumeClaimTemplatestring

DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate

.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
PropertyTypeDescription
namestring

optional, by default shard name is generated, but you can override it and setup custom name

secureboolean

optional, setup secure inside clickhouse-server settings for each Pod where current template will apply if specified

tcpPortinteger

optional, setup Pod.spec.containers.ports with name tcp for selected shard, override chi.spec.templates.hostTemplates.spec.tcpPort allows connect to clickhouse-server via TCP Native protocol via kubernetes Service

httpPortinteger

optional, setup Pod.spec.containers.ports with name http for selected shard, override chi.spec.templates.hostTemplates.spec.httpPort allows connect to clickhouse-server via HTTP protocol via kubernetes Service

interserverHTTPPortinteger

optional, setup Pod.spec.containers.ports with name interserver for selected shard, override chi.spec.templates.hostTemplates.spec.interserverHTTPPort allows connect between replicas inside same shard during fetch replicated data parts HTTP protocol

settingsobject

optional, allows configure clickhouse-server settings inside ... 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/

filesobject

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

templatesobject

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

.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
PropertyTypeDescription
hostTemplatestring

optional, template name from chi.spec.templates.hostTemplates, which will apply to configure every clickhouse-server instance during render ConfigMap resources which will mount into Pod

podTemplatestring

optional, template name from chi.spec.templates.podTemplates, allows customization each Pod resource during render and reconcile each StatefulSet.spec resource described in chi.spec.configuration.clusters

dataVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse data directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

logVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse log directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

serviceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for one Service resource which will created by clickhouse-operator which cover all clusters in whole chi resource

clusterServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each clickhouse cluster described in chi.spec.configuration.clusters

shardServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each shard inside clickhouse cluster described in chi.spec.configuration.clusters

replicaServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each replica inside each shard inside each clickhouse cluster described in chi.spec.configuration.clusters

volumeClaimTemplatestring

DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate

.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
PropertyTypeDescription
hostTemplatesarray

hostTemplate will use during apply to generate clickhose-server config files

podTemplatesarray

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

volumeClaimTemplatesarray

allows define template for rendering PVC kubernetes resource, which would use inside Pod for mount clickhouse data, clickhouse logs or something else

serviceTemplatesarray

allows define template for rendering Service which would get endpoint from Pods which scoped chi-wide, cluster-wide, shard-wide, replica-wide level

.spec.templates.hostTemplates

Description
hostTemplate will use during apply to generate `clickhose-server` config files
Type
array

.spec.templates.hostTemplates[]

Type
object
PropertyTypeDescription
namestring

template name, could use to link inside top-level chi.spec.defaults.templates.hostTemplate, cluster-level chi.spec.configuration.clusters.templates.hostTemplate, shard-level chi.spec.configuration.clusters.layout.shards.temlates.hostTemplate, replica-level chi.spec.configuration.clusters.layout.replicas.templates.hostTemplate

portDistributionarray

define how will distribute numeric values of named ports in Pod.spec.containers.ports and clickhouse-server configs

specobject

.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
PropertyTypeDescription
typestring

type of distribution, when Unspecified (default value) then all listen ports on clickhouse-server configuration in all Pods will have the same value, when ClusterScopeIndex then ports will increment to offset from base value depends on shard and replica index inside cluster with combination of chi.spec.templates.podTemlates.spec.HostNetwork it allows setup ClickHouse cluster inside Kubernetes and provide access via external network bypass Kubernetes internal network

.spec.templates.hostTemplates[].spec

Type
object
PropertyTypeDescription
namestring

by default, hostname will generate, but this allows define custom name for each clickhuse-server

secureboolean

optional, setup secure inside clickhouse-server settings for each Pod where current template will apply if specified

tcpPortinteger

optional, setup tcp_port inside clickhouse-server settings for each Pod where current template will apply if specified, should have equal value with chi.spec.templates.podTemplates.spec.containers.ports[name=tcp] More info: https://clickhouse.tech/docs/en/interfaces/tcp/

httpPortinteger

optional, setup http_port inside clickhouse-server settings for each Pod where current template will apply if specified, should have equal value with chi.spec.templates.podTemplates.spec.containers.ports[name=http] More info: https://clickhouse.tech/docs/en/interfaces/http/

interserverHTTPPortinteger

optional, setup interserver_http_port inside clickhouse-server settings for each Pod where current template will apply if specified, should have equal value with chi.spec.templates.podTemplates.spec.containers.ports[name=interserver] More info: https://clickhouse.tech/docs/en/operations/server-configuration-parameters/settings/#interserver-http-port

settingsobject

optional, allows configure clickhouse-server settings inside ... 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/

filesobject

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/

templatesobject

be careful, this part of CRD allows override template inside template, don't use it if you don't understand what you do

.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
PropertyTypeDescription
hostTemplatestring

optional, template name from chi.spec.templates.hostTemplates, which will apply to configure every clickhouse-server instance during render ConfigMap resources which will mount into Pod

podTemplatestring

optional, template name from chi.spec.templates.podTemplates, allows customization each Pod resource during render and reconcile each StatefulSet.spec resource described in chi.spec.configuration.clusters

dataVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse data directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

logVolumeClaimTemplatestring

optional, template name from chi.spec.templates.volumeClaimTemplates, allows customization each PVC which will mount for clickhouse log directory in each Pod during render and reconcile every StatefulSet.spec resource described in chi.spec.configuration.clusters

serviceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for one Service resource which will created by clickhouse-operator which cover all clusters in whole chi resource

clusterServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each clickhouse cluster described in chi.spec.configuration.clusters

shardServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each shard inside clickhouse cluster described in chi.spec.configuration.clusters

replicaServiceTemplatestring

optional, template name from chi.spec.templates.serviceTemplates, allows customization for each Service resource which will created by clickhouse-operator which cover each replica inside each shard inside each clickhouse cluster described in chi.spec.configuration.clusters

volumeClaimTemplatestring

DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate

.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
PropertyTypeDescription
namestring

template name, could use to link inside top-level chi.spec.defaults.templates.podTemplate, cluster-level chi.spec.configuration.clusters.templates.podTemplate, shard-level chi.spec.configuration.clusters.layout.shards.temlates.podTemplate, replica-level chi.spec.configuration.clusters.layout.replicas.templates.podTemplate

generateNamestring

allows define format for generated Pod name, look to https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#spectemplatesservicetemplates for details about aviailable template variables

zoneobject

allows define custom zone name and will separate ClickHouse Pods between nodes, shortcut for chi.spec.templates.podTemplates.spec.affinity.podAntiAffinity

distributionstring

DEPRECATED, shortcut for chi.spec.templates.podTemplates.spec.affinity.podAntiAffinity

podDistributionarray

define ClickHouse Pod distibution policy between Kubernetes Nodes inside Shard, Replica, Namespace, CHI, another ClickHouse cluster

specobject

allows define whole Pod.spec inside StaefulSet.spec, look to https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates for details

metadataObjectMeta

allows pass standard object's metadata from template to Pod More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

.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
PropertyTypeDescription
keystring

optional, if defined, allows select kubernetes nodes by label with name equal key

valuesarray

optional, if defined, allows select kubernetes nodes by label with value in values

.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
PropertyTypeDescription
typestring

you can define multiple affinity policy types

scopestring

scope for apply each podDistribution

numberinteger

define, how much ClickHouse Pods could be inside selected scope with selected distribution type

topologyKeystring

use for inter-pod affinity look to pod.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.topologyKey, More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity

.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
PropertyTypeDescription
namestring

template name, could use to link inside top-level chi.spec.defaults.templates.dataVolumeClaimTemplate or chi.spec.defaults.templates.logVolumeClaimTemplate, cluster-level chi.spec.configuration.clusters.templates.dataVolumeClaimTemplate or chi.spec.configuration.clusters.templates.logVolumeClaimTemplate, shard-level chi.spec.configuration.clusters.layout.shards.temlates.dataVolumeClaimTemplate or chi.spec.configuration.clusters.layout.shards.temlates.logVolumeClaimTemplate replica-level chi.spec.configuration.clusters.layout.replicas.templates.dataVolumeClaimTemplate or chi.spec.configuration.clusters.layout.replicas.templates.logVolumeClaimTemplate

provisionerstring

defines PVC provisioner - be it StatefulSet or the Operator

reclaimPolicystring

defines behavior of PVC deletion. Delete by default, if Retain specified then PVC will be kept when deleting StatefulSet

metadataObjectMeta

allows to pass standard object's metadata from template to PVC More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

specobject

allows define all aspects of PVC resource More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims

.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
PropertyTypeDescription
namestring

template name, could use to link inside chi-level chi.spec.defaults.templates.serviceTemplate cluster-level chi.spec.configuration.clusters.templates.clusterServiceTemplate shard-level chi.spec.configuration.clusters.layout.shards.temlates.shardServiceTemplate replica-level chi.spec.configuration.clusters.layout.replicas.templates.replicaServiceTemplate or chi.spec.configuration.clusters.layout.shards.replicas.replicaServiceTemplate

generateNamestring

allows define format for generated Service name, look to https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#spectemplatesservicetemplates for details about aviailable template variables

metadataObjectMeta

allows pass standard object's metadata from template to Service Could be use for define specificly for Cloud Provider metadata which impact to behavior of service More info: https://kubernetes.io/docs/concepts/services-networking/service/

specobject

describe behavior of generated Service More info: https://kubernetes.io/docs/concepts/services-networking/service/

.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
PropertyTypeDescription
namestring

name of ClickHouseInstallationTemplate (chit) resource

namespacestring

Kubernetes namespace where need search chit resource, depending on watchNamespaces settings in clichouse-operator

useTypestring

optional, current strategy is only merge, and current chi settings have more priority than merged template chit

API Endpoints

The following API endpoints are available:

  • /apis/clickhouse.altinity.com/v1/namespaces/{namespace}/clickhouseinstallations
    • DELETE: delete collection of ClickHouseInstallation
    • GET: list objects of kind ClickHouseInstallation
    • POST: create a new ClickHouseInstallation
  • /apis/clickhouse.altinity.com/v1/namespaces/{namespace}/clickhouseinstallations/{name}
    • DELETE: delete the specified ClickHouseInstallation
    • GET: read the specified ClickHouseInstallation
    • PATCH: partially update the specified ClickHouseInstallation
    • PUT: replace the specified ClickHouseInstallation
  • /apis/clickhouse.altinity.com/v1/namespaces/{namespace}/clickhouseinstallations/{name}/status
    • GET: read status of the specified ClickHouseInstallation
    • PATCH: partially update status of the specified ClickHouseInstallation
    • PUT: 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 codeResponse body
200 - OKStatus schema
401 - UnauthorizedEmpty
HTTP method
GET
Description
list objects of kind ClickHouseInstallation
HTTP responses
HTTP codeResponse body
200 - OKClickHouseInstallationList schema
401 - UnauthorizedEmpty
HTTP method
POST
Description
create a new ClickHouseInstallation
Query parameters
ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
Body parameters
ParameterTypeDescription
bodyClickHouseInstallation schemaapplication/json formatted
HTTP responses
HTTP codeResponse body
200 - OKClickHouseInstallation schema
201 - CreatedClickHouseInstallation schema
202 - AcceptedClickHouseInstallation schema
401 - UnauthorizedEmpty

/apis/clickhouse.altinity.com/v1/namespaces/{namespace}/clickhouseinstallations/{name}

HTTP method
DELETE
Description
delete the specified ClickHouseInstallation
Query parameters
ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
HTTP responses
HTTP codeResponse body
200 - OKStatus schema
202 - AcceptedStatus schema
401 - UnauthorizedEmpty
HTTP method
GET
Description
read the specified ClickHouseInstallation
HTTP responses
HTTP codeResponse body
200 - OKClickHouseInstallation schema
401 - UnauthorizedEmpty
HTTP method
PATCH
Description
partially update the specified ClickHouseInstallation
Query parameters
ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
HTTP responses
HTTP codeResponse body
200 - OKClickHouseInstallation schema
401 - UnauthorizedEmpty
HTTP method
PUT
Description
replace the specified ClickHouseInstallation
Query parameters
ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
Body parameters
ParameterTypeDescription
bodyClickHouseInstallation schemaapplication/json formatted
HTTP responses
HTTP codeResponse body
200 - OKClickHouseInstallation schema
201 - CreatedClickHouseInstallation schema
401 - UnauthorizedEmpty

/apis/clickhouse.altinity.com/v1/namespaces/{namespace}/clickhouseinstallations/{name}/status

HTTP method
GET
Description
read status of the specified ClickHouseInstallation
HTTP responses
HTTP codeResponse body
200 - OKClickHouseInstallation schema
401 - UnauthorizedEmpty
HTTP method
PATCH
Description
partially update status of the specified ClickHouseInstallation
Query parameters
ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
HTTP responses
HTTP codeResponse body
200 - OKClickHouseInstallation schema
401 - UnauthorizedEmpty
HTTP method
PUT
Description
replace status of the specified ClickHouseInstallation
Query parameters
ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
Body parameters
ParameterTypeDescription
bodyClickHouseInstallation schemaapplication/json formatted
HTTP responses
HTTP codeResponse body
200 - OKClickHouseInstallation schema
201 - CreatedClickHouseInstallation schema
401 - UnauthorizedEmpty