ClickHouseInstallations

描述
define a set of Kubernetes resources (StatefulSet, PVC, Service, ConfigMap) which describe behavior one or more ClickHouse clusters
类型
object
必填
spec

规格

属性类型描述
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

描述
Current ClickHouseInstallation manifest status, contains many fields like a normalized configuration, clickhouse-operator version, current action and all applied action list, current taskID and all applied taskIDs and other
类型
object
属性类型描述
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

描述
Started task ids
类型
array

.status.taskIDsStarted[]

类型
string

.status.taskIDsCompleted

描述
Completed task ids
类型
array

.status.taskIDsCompleted[]

类型
string

.status.actions

描述
Actions
类型
array

.status.actions[]

类型
string

.status.errors

描述
Errors
类型
array

.status.errors[]

类型
string

.status.pods

描述
Pods
类型
array

.status.pods[]

类型
string

.status.pod-ips

描述
Pod IPs
类型
array

.status.pod-ips[]

类型
string

.status.fqdns

描述
Pods FQDNs
类型
array

.status.fqdns[]

类型
string

.status.normalized

描述
Normalized CHI requested
类型
object

.status.normalizedCompleted

描述
Normalized CHI completed
类型
object

.spec

描述
Specification of the desired behavior of one or more ClickHouse clusters More info: https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md
类型
object
属性类型描述
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

描述
optional, define policy for auto applying ClickHouseInstallationTemplate inside ClickHouseInstallation
类型
object
属性类型描述
policystring

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

.spec.reconciling

描述
optional, allows tuning reconciling cycle for ClickhouseInstallation from clickhouse-operator side
类型
object
属性类型描述
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

描述
optional, define behavior for cleanup Kubernetes resources during reconcile cycle
类型
object
属性类型描述
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

描述
what clickhouse-operator shall do when found Kubernetes resources which should be managed with clickhouse-operator, but not have `ownerReference` to any currently managed `ClickHouseInstallation` resource, default behavior is `Delete`
类型
object
属性类型描述
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

描述
what clickhouse-operator shall do when reconciling Kubernetes resources are failed, default behavior is `Retain`
类型
object
属性类型描述
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

描述
define default behavior for whole ClickHouseInstallation, some behavior can be re-define on cluster, shard and replica level More info: https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#specdefaults
类型
object
属性类型描述
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

描述
allows change `<yandex><distributed_ddl></distributed_ddl></yandex>` settings More info: https://clickhouse.tech/docs/en/operations/server-configuration-parameters/settings/#server-settings-distributed_ddl
类型
object
属性类型描述
profilestring

Settings from this profile will be used to execute DDL queries

.spec.defaults.storageManagement

描述
default storage management options
类型
object
属性类型描述
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

描述
optional, configuration of the templates names which will use for generate Kubernetes resources according to one or more ClickHouse clusters described in current ClickHouseInstallation (chi) resource
类型
object
属性类型描述
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

描述
allows configure multiple aspects and behavior for `clickhouse-server` instance and also allows describe multiple `clickhouse-server` clusters inside one `chi` resource
类型
object
属性类型描述
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

描述
allows configure <yandex><zookeeper>..</zookeeper></yandex> section in each `Pod` during generate `ConfigMap` which will mounted in `/etc/clickhouse-server/config.d/` `clickhouse-operator` itself doesn't manage Zookeeper, please install Zookeeper separatelly look examples on https://github.com/Altinity/clickhouse-operator/tree/master/deploy/zookeeper/ currently, zookeeper (or clickhouse-keeper replacement) used for *ReplicatedMergeTree table engines and for `distributed_ddl` More details: https://clickhouse.tech/docs/en/operations/server-configuration-parameters/settings/#server-settings_zookeeper
类型
object
属性类型描述
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

描述
describe every available zookeeper cluster node for interaction
类型
array

.spec.configuration.zookeeper.nodes[]

类型
object
属性类型描述
hoststring

dns name or ip address for Zookeeper node

portinteger

TCP port which used to connect to Zookeeper node

.spec.configuration.users

描述
allows configure <yandex><users>..</users></yandex> section in each `Pod` during generate `ConfigMap` which will mount in `/etc/clickhouse-server/users.d/` you can configure password hashed, authorization restrictions, database level security row filters etc. More details: https://clickhouse.tech/docs/en/operations/settings/settings-users/ Your yaml code will convert to XML, see examples https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#specconfigurationusers
类型
object

.spec.configuration.profiles

描述
allows configure <yandex><profiles>..</profiles></yandex> section in each `Pod` during generate `ConfigMap` which will mount in `/etc/clickhouse-server/users.d/` you can configure any aspect of settings profile More details: https://clickhouse.tech/docs/en/operations/settings/settings-profiles/ Your yaml code will convert to XML, see examples https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#specconfigurationprofiles
类型
object

.spec.configuration.quotas

描述
allows configure <yandex><quotas>..</quotas></yandex> section in each `Pod` during generate `ConfigMap` which will mount in `/etc/clickhouse-server/users.d/` you can configure any aspect of resource quotas More details: https://clickhouse.tech/docs/en/operations/quotas/ Your yaml code will convert to XML, see examples https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#specconfigurationquotas
类型
object

.spec.configuration.settings

描述
allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in each `Pod` during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` More details: https://clickhouse.tech/docs/en/operations/settings/settings/ Your yaml code will convert to XML, see examples https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#specconfigurationsettings
类型
object

.spec.configuration.files

描述
allows define content of any setting file inside each `Pod` during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/` every key in this object is the file name every value in this object is the file content you can use `!!binary |` and base64 for binary files, see details here https://yaml.org/type/binary.html each key could contains prefix like USERS, COMMON, HOST or config.d, users.d, cond.d, wrong prefixes will ignored, subfolders also will ignored More details: https://github.com/Altinity/clickhouse-operator/blob/master/docs/chi-examples/05-settings-05-files-nested.yaml
类型
object

.spec.configuration.clusters

描述
describes ClickHouse clusters layout and allows change settings on cluster-level, shard-level and replica-level every cluster is a set of StatefulSet, one StatefulSet contains only one Pod with `clickhouse-server` all Pods will rendered in <remote_server> part of ClickHouse configs, mounted from ConfigMap as `/etc/clickhouse-server/config.d/chop-generated-remote_servers.xml` Clusters will use for Distributed table engine, more details: https://clickhouse.tech/docs/en/engines/table-engines/special/distributed/ If `cluster` contains zookeeper settings (could be inherited from top `chi` level), when you can create *ReplicatedMergeTree tables
类型
array

.spec.configuration.clusters[]

类型
object
属性类型描述
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

描述
optional, allows configure <yandex><zookeeper>..</zookeeper></yandex> section in each `Pod` only in current ClickHouse cluster, during generate `ConfigMap` which will mounted in `/etc/clickhouse-server/config.d/` override top-level `chi.spec.configuration.zookeeper` settings
类型
object
属性类型描述
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

描述
describe every available zookeeper cluster node for interaction
类型
array

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

类型
object
属性类型描述
hoststring

dns name or ip address for Zookeeper node

portinteger

TCP port which used to connect to Zookeeper node

.spec.configuration.clusters[].settings

描述
optional, allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in each `Pod` only in one cluster during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` override top-level `chi.spec.configuration.settings` More details: https://clickhouse.tech/docs/en/operations/settings/settings/
类型
object

.spec.configuration.clusters[].files

描述
optional, allows define content of any setting file inside each `Pod` on current cluster during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/` override top-level `chi.spec.configuration.files`
类型
object

.spec.configuration.clusters[].templates

描述
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected cluster override top-level `chi.spec.configuration.templates`
类型
object
属性类型描述
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

描述
describes how schema is propagated within replicas and shards
类型
object
属性类型描述
replicastring

how schema is propagated within a replica

shardstring

how schema is propagated between shards

.spec.configuration.clusters[].secret

描述
optional, shared secret value to secure cluster communications
类型
object
属性类型描述
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

描述
Cluster shared secret source
类型
object
属性类型描述
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

描述
Selects a key of a secret in the clickhouse installation namespace. Should not be used if value is not empty.
类型
object
必填
namekey
属性类型描述
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

描述
describe current cluster layout, how much shards in cluster, how much replica in shard allows override settings on each shard and replica separatelly
类型
object
属性类型描述
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

描述
optional, allows override top-level `chi.spec.configuration`, cluster-level `chi.spec.configuration.clusters` settings for each shard separately, use it only if you fully understand what you do
类型
array

.spec.configuration.clusters[].layout.shards[]

类型
object
属性类型描述
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

描述
optional, allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in each `Pod` only in one shard during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` override top-level `chi.spec.configuration.settings` and cluster-level `chi.spec.configuration.clusters.settings` More details: https://clickhouse.tech/docs/en/operations/settings/settings/
类型
object

.spec.configuration.clusters[].layout.shards[].files

描述
optional, allows define content of any setting file inside each `Pod` only in one shard during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/` override top-level `chi.spec.configuration.files` and cluster-level `chi.spec.configuration.clusters.files`
类型
object

.spec.configuration.clusters[].layout.shards[].templates

描述
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected shard override top-level `chi.spec.configuration.templates` and cluster-level `chi.spec.configuration.clusters.templates`
类型
object
属性类型描述
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

描述
optional, allows override behavior for selected replicas from cluster-level `chi.spec.configuration.clusters` and shard-level `chi.spec.configuration.clusters.layout.shards`
类型
array

.spec.configuration.clusters[].layout.shards[].replicas[]

类型
object
属性类型描述
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

描述
optional, allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in `Pod` only in one replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/conf.d/` override top-level `chi.spec.configuration.settings`, cluster-level `chi.spec.configuration.clusters.settings` and shard-level `chi.spec.configuration.clusters.layout.shards.settings` More details: https://clickhouse.tech/docs/en/operations/settings/settings/
类型
object

.spec.configuration.clusters[].layout.shards[].replicas[].files

描述
optional, allows define content of any setting file inside `Pod` only in one replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/` override top-level `chi.spec.configuration.files`, cluster-level `chi.spec.configuration.clusters.files` and shard-level `chi.spec.configuration.clusters.layout.shards.files`
类型
object

.spec.configuration.clusters[].layout.shards[].replicas[].templates

描述
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected replica override top-level `chi.spec.configuration.templates`, cluster-level `chi.spec.configuration.clusters.templates` and shard-level `chi.spec.configuration.clusters.layout.shards.templates`
类型
object
属性类型描述
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

描述
optional, allows override top-level `chi.spec.configuration` and cluster-level `chi.spec.configuration.clusters` configuration for each replica and each shard relates to selected replica, use it only if you fully understand what you do
类型
array

.spec.configuration.clusters[].layout.replicas[]

类型
object
属性类型描述
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

描述
optional, allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in `Pod` only in one replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/conf.d/` override top-level `chi.spec.configuration.settings`, cluster-level `chi.spec.configuration.clusters.settings` and will ignore if shard-level `chi.spec.configuration.clusters.layout.shards` present More details: https://clickhouse.tech/docs/en/operations/settings/settings/
类型
object

.spec.configuration.clusters[].layout.replicas[].files

描述
optional, allows define content of any setting file inside each `Pod` only in one replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/` override top-level `chi.spec.configuration.files` and cluster-level `chi.spec.configuration.clusters.files`, will ignore if `chi.spec.configuration.clusters.layout.shards` presents
类型
object

.spec.configuration.clusters[].layout.replicas[].templates

描述
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected replica override top-level `chi.spec.configuration.templates`, cluster-level `chi.spec.configuration.clusters.templates`
类型
object
属性类型描述
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

描述
optional, list of shards related to current replica, will ignore if `chi.spec.configuration.clusters.layout.shards` presents
类型
array

.spec.configuration.clusters[].layout.replicas[].shards[]

类型
object
属性类型描述
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

描述
optional, allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in `Pod` only in one shard related to current replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/conf.d/` override top-level `chi.spec.configuration.settings`, cluster-level `chi.spec.configuration.clusters.settings` and replica-level `chi.spec.configuration.clusters.layout.replicas.settings` More details: https://clickhouse.tech/docs/en/operations/settings/settings/
类型
object

.spec.configuration.clusters[].layout.replicas[].shards[].files

描述
optional, allows define content of any setting file inside each `Pod` only in one shard related to current replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/` override top-level `chi.spec.configuration.files` and cluster-level `chi.spec.configuration.clusters.files`, will ignore if `chi.spec.configuration.clusters.layout.shards` presents
类型
object

.spec.configuration.clusters[].layout.replicas[].shards[].templates

描述
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected replica override top-level `chi.spec.configuration.templates`, cluster-level `chi.spec.configuration.clusters.templates`, replica-level `chi.spec.configuration.clusters.layout.replicas.templates`
类型
object
属性类型描述
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

描述
allows define templates which will use for render Kubernetes resources like StatefulSet, ConfigMap, Service, PVC, by default, clickhouse-operator have own templates, but you can override it
类型
object
属性类型描述
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

描述
hostTemplate will use during apply to generate `clickhose-server` config files
类型
array

.spec.templates.hostTemplates[]

类型
object
属性类型描述
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

描述
define how will distribute numeric values of named ports in `Pod.spec.containers.ports` and clickhouse-server configs
类型
array

.spec.templates.hostTemplates[].portDistribution[]

类型
object
属性类型描述
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

类型
object
属性类型描述
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

描述
optional, allows configure `clickhouse-server` settings inside <yandex>...</yandex> tag in each `Pod` where this template will apply during generate `ConfigMap` which will mount in `/etc/clickhouse-server/conf.d/` More details: https://clickhouse.tech/docs/en/operations/settings/settings/
类型
object

.spec.templates.hostTemplates[].spec.files

描述
optional, allows define content of any setting file inside each `Pod` where this template will apply during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
类型
object

.spec.templates.hostTemplates[].spec.templates

描述
be careful, this part of CRD allows override template inside template, don't use it if you don't understand what you do
类型
object
属性类型描述
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

描述
podTemplate will use during render `Pod` inside `StatefulSet.spec` and allows define rendered `Pod.spec`, pod scheduling distribution and pod zone More information: https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#spectemplatespodtemplates
类型
array

.spec.templates.podTemplates[]

类型
object
属性类型描述
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

描述
allows define custom zone name and will separate ClickHouse `Pods` between nodes, shortcut for `chi.spec.templates.podTemplates.spec.affinity.podAntiAffinity`
类型
object
属性类型描述
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

描述
optional, if defined, allows select kubernetes nodes by label with `value` in `values`
类型
array

.spec.templates.podTemplates[].zone.values[]

类型
string

.spec.templates.podTemplates[].podDistribution

描述
define ClickHouse Pod distibution policy between Kubernetes Nodes inside Shard, Replica, Namespace, CHI, another ClickHouse cluster
类型
array

.spec.templates.podTemplates[].podDistribution[]

类型
object
属性类型描述
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

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

.spec.templates.volumeClaimTemplates

描述
allows define template for rendering `PVC` kubernetes resource, which would use inside `Pod` for mount clickhouse `data`, clickhouse `logs` or something else
类型
array

.spec.templates.volumeClaimTemplates[]

类型
object
属性类型描述
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

描述
allows define all aspects of `PVC` resource More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims
类型
object

.spec.templates.serviceTemplates

描述
allows define template for rendering `Service` which would get endpoint from Pods which scoped chi-wide, cluster-wide, shard-wide, replica-wide level
类型
array

.spec.templates.serviceTemplates[]

类型
object
属性类型描述
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

描述
describe behavior of generated Service More info: https://kubernetes.io/docs/concepts/services-networking/service/
类型
object

.spec.useTemplates

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

.spec.useTemplates[]

类型
object
属性类型描述
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 端点

可用的 API 端点如下:

  • /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 方法
DELETE
描述
delete collection of ClickHouseInstallation
HTTP 响应
HTTP 状态码响应体
200 - OKStatus schema
401 - UnauthorizedEmpty
HTTP 方法
GET
描述
list objects of kind ClickHouseInstallation
HTTP 响应
HTTP 状态码响应体
200 - OKClickHouseInstallationList schema
401 - UnauthorizedEmpty
HTTP 方法
POST
描述
create a new ClickHouseInstallation
查询参数
参数类型描述
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.
请求体参数
参数类型描述
bodyClickHouseInstallation schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKClickHouseInstallation schema
201 - CreatedClickHouseInstallation schema
202 - AcceptedClickHouseInstallation schema
401 - UnauthorizedEmpty

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

HTTP 方法
DELETE
描述
delete the specified ClickHouseInstallation
查询参数
参数类型描述
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 响应
HTTP 状态码响应体
200 - OKStatus schema
202 - AcceptedStatus schema
401 - UnauthorizedEmpty
HTTP 方法
GET
描述
read the specified ClickHouseInstallation
HTTP 响应
HTTP 状态码响应体
200 - OKClickHouseInstallation schema
401 - UnauthorizedEmpty
HTTP 方法
PATCH
描述
partially update the specified ClickHouseInstallation
查询参数
参数类型描述
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 响应
HTTP 状态码响应体
200 - OKClickHouseInstallation schema
401 - UnauthorizedEmpty
HTTP 方法
PUT
描述
replace the specified ClickHouseInstallation
查询参数
参数类型描述
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.
请求体参数
参数类型描述
bodyClickHouseInstallation schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKClickHouseInstallation schema
201 - CreatedClickHouseInstallation schema
401 - UnauthorizedEmpty

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

HTTP 方法
GET
描述
read status of the specified ClickHouseInstallation
HTTP 响应
HTTP 状态码响应体
200 - OKClickHouseInstallation schema
401 - UnauthorizedEmpty
HTTP 方法
PATCH
描述
partially update status of the specified ClickHouseInstallation
查询参数
参数类型描述
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 响应
HTTP 状态码响应体
200 - OKClickHouseInstallation schema
401 - UnauthorizedEmpty
HTTP 方法
PUT
描述
replace status of the specified ClickHouseInstallation
查询参数
参数类型描述
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.
请求体参数
参数类型描述
bodyClickHouseInstallation schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKClickHouseInstallation schema
201 - CreatedClickHouseInstallation schema
401 - UnauthorizedEmpty