Skip to main content

Documentation Index

Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-sync-cloud-1778703015.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

This document provides detailed API reference for the ClickHouse Operator custom resources.

ClickHouseCluster

ClickHouseCluster is the Schema for the clickhouseclusters API.

API Version and Kind

apiVersion: clickhouse.com/v1alpha1
kind: ClickHouseCluster
FieldTypeDescriptionRequiredDefault
specClickHouseClusterSpectrue
statusClickHouseClusterStatustrue
Appears in:

ClickHouseClusterList

ClickHouseClusterList contains a list of ClickHouseCluster.

API Version and Kind

apiVersion: clickhouse.com/v1alpha1
kind: ClickHouseClusterList
FieldTypeDescriptionRequiredDefault
itemsClickHouseCluster arraytrue

ClickHouseClusterSpec

ClickHouseClusterSpec defines the desired state of ClickHouseCluster.
FieldTypeDescriptionRequiredDefault
replicasintegerNumber of replicas in the single shard.false3
shardsintegerNumber of shards in the cluster.false1
keeperClusterRefKeeperClusterReferenceReference to the KeeperCluster that is used for ClickHouse coordination.
When namespace is omitted, the ClickHouseCluster namespace is used.
true
podTemplatePodTemplateSpecParameters passed to the ClickHouse pod spec.false
containerTemplateContainerTemplateSpecParameters passed to the ClickHouse container spec.false
dataVolumeClaimSpecPersistentVolumeClaimSpecSpecification of persistent storage for ClickHouse data.false
labelsobject (keys:string, values:string)Additional labels that are added to resources.false
annotationsobject (keys:string, values:string)Additional annotations that are added to resources.false
podDisruptionBudgetPodDisruptionBudgetSpecPodDisruptionBudget configures the PDB created for each shard.
When unset, the operator defaults to maxUnavailable=1 for single-replica
shards and minAvailable=1 for multi-replica shards.
false
settingsClickHouseSettingsConfiguration parameters for ClickHouse server.false
clusterDomainstringClusterDomain is the Kubernetes cluster domain suffix used for DNS resolution.falsecluster.local
upgradeChannelstringUpgradeChannel specifies the release channel for major version upgrade checks.
When empty, only minor updates will be proposed. Allowed values are: stable, lts or specific major.minor version (e.g. 25.8).
false
versionProbeTemplateVersionProbeTemplateVersionProbeTemplate overrides for the version detection Job.false
externalSecretExternalSecretExternalSecret is an optional reference to an externally-managed Secret containing cluster secrets.
The secret must reside in the same namespace as the cluster.
false
Appears in:

ClickHouseClusterStatus

ClickHouseClusterStatus defines the observed state of ClickHouseCluster.
FieldTypeDescriptionRequiredDefault
conditionsCondition arrayfalse
readyReplicasintegerReadyReplicas Total number of replicas ready to serve requests.false
configurationRevisionstringConfigurationRevision indicates target configuration revision for every replica.true
statefulSetRevisionstringStatefulSetRevision indicates target StatefulSet revision for every replica.true
currentRevisionstringCurrentRevision indicates latest applied ClickHouseCluster spec revision.true
updateRevisionstringUpdateRevision indicates latest requested ClickHouseCluster spec revision.true
observedGenerationintegerObservedGeneration indicates latest generation observed by controller.true
versionstringVersion indicates the version reported by the container image.false
versionProbeRevisionstringVersionProbeRevision is the image hash of the last successful version probe.
When this matches the current image hash, the cached Version is used directly.
false
Appears in:

ClickHouseSettings

ClickHouseSettings defines ClickHouse server settings options.
FieldTypeDescriptionRequiredDefault
defaultUserPasswordDefaultPasswordSelectorSpecifies source and type of the password for default ClickHouse user.false
loggerLoggerConfigConfiguration of ClickHouse server logging.false
tlsClusterTLSSpecTLS settings, allows to configure secure endpoints and certificate verification for ClickHouse server.false
enableDatabaseSyncbooleanEnables synchronization of ClickHouse databases to the newly created replicas and cleanup of stale replicas
after scale down.
Supports only Replicated and integration databases.
falsetrue
extraConfigRawExtensionAdditional ClickHouse configuration that will be merged with the default one.false
extraUsersConfigRawExtensionAdditional ClickHouse users configuration that will be merged with the default one.false
Appears in:

ClusterTLSSpec

ClusterTLSSpec defines cluster TLS configuration.
FieldTypeDescriptionRequiredDefault
enabledbooleanEnabled indicates whether TLS is enabled, determining if secure ports should be opened.falsefalse
requiredbooleanRequired specifies whether TLS must be enforced for all connections. Disables not secure ports.falsefalse
serverCertSecretLocalObjectReferenceServerCertSecretRef is a reference to a TLS Secret containing the server certificate.
It is expected that the Secret has the same structure as certificates generated by cert-manager,
with the certificate and private key stored under “tls.crt” and “tls.key” keys respectively.
false
caBundleSecretKeySelectorCABundle is a reference to a TLS Secret containing the CA bundle.
If empty and ServerCertSecret is specified, the CA bundle from certificate will be used.
Otherwise, system trusted CA bundle will be used.
Key is defaulted to “ca.crt” if not specified.
false
Appears in:

ConfigMapKeySelector

ConfigMapKeySelector selects a key of a ConfigMap.
FieldTypeDescriptionRequiredDefault
namestringThe name of the ConfigMap in the cluster’s namespace to select from.true
keystringThe key of the ConfigMap to select from. Must be a valid key.true
Appears in:

ContainerImage

ContainerImage defines a container image with repository, tag or hash.
FieldTypeDescriptionRequiredDefault
repositorystringContainer image registry name
Example: docker.io/clickhouse/clickhouse
false
tagstringContainer image tag, mutually exclusive with ‘hash’.
Example: 25.3
false
hashstringContainer image hash, mutually exclusive with ‘tag’.false
Appears in:

ContainerTemplateSpec

ContainerTemplateSpec describes the container configuration overrides for the cluster’s containers.
FieldTypeDescriptionRequiredDefault
imageContainerImageImage is the container image to be deployed.true
imagePullPolicyPullPolicyImagePullPolicy for the image, which defaults to IfNotPresent.false
resourcesResourceRequirementsResources is the resource requirements for the server container.
Deep-merged with operator defaults via SMP. Individual limits and requests override only matching
keys; unset fields preserve operator defaults.
false
volumeMountsVolumeMount arrayVolumeMounts is the list of volume mounts for the container.
Concatenated with operator-generated mounts. Entries sharing a mountPath with an operator
mount are merged into a projected volume.
false
envEnvVar arrayEnv is the list of environment variables to set in the container.
Merged with operator defaults by name.
false
securityContextSecurityContextSecurityContext defines the security options the container should be run with.
A non-nil SecurityContext fully replaces operator defaults; the user owns the
entire struct. When nil, operator defaults are preserved.
More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
false
livenessProbeProbeLivenessProbe overrides the operator’s default liveness probe.false
readinessProbeProbeReadinessProbe overrides the operator’s default readiness probe.false
Appears in:

DefaultPasswordSelector

DefaultPasswordSelector selects the source for the default user’s password.
FieldTypeDescriptionRequiredDefault
passwordTypestringType of the provided password. Consider documentation for possible values https://clickhouse.com/docs/operations/settings/settings-users#user-namepasswordtruepassword
secretSecretKeySelectorSelect password value from a Secret keyfalse
configMapConfigMapKeySelectorSelect password value from a ConfigMap keyfalse
Appears in:

ExternalSecret

ExternalSecret is a reference to a Secret in the same namespace.
FieldTypeDescriptionRequiredDefault
namestringName of the Secret.true
policyExternalSecretPolicyPolicy controls how the operator treats the secret’s content.
Observe (default): blocks reconciliation if any required key is missing.
Manage: generates missing required keys into the existing secret.
falseObserve
Appears in:

ExternalSecretPolicy

ExternalSecretPolicy controls how the operator treats the external secret’s content.
FieldDescription
ObserveExternalSecretPolicyObserve is the default policy: the operator reads and validates the secret;
reconciliation is blocked if any required key is absent.
Missing required keys and their expected formats are reported via the ExternalSecretValid status condition at runtime.
ManageExternalSecretPolicyManage is the policy where the operator fills in any missing required keys by generating
values for them. The secret is updated but never owned or deleted by the operator.
Appears in:

KeeperCluster

KeeperCluster is the Schema for the keeperclusters API.

API Version and Kind

apiVersion: clickhouse.com/v1alpha1
kind: KeeperCluster
FieldTypeDescriptionRequiredDefault
specKeeperClusterSpectrue
statusKeeperClusterStatustrue
Appears in:

KeeperClusterList

KeeperClusterList contains a list of KeeperCluster.

API Version and Kind

apiVersion: clickhouse.com/v1alpha1
kind: KeeperClusterList
FieldTypeDescriptionRequiredDefault
itemsKeeperCluster arraytrue

KeeperClusterReference

KeeperClusterReference identifies the KeeperCluster used by a ClickHouseCluster.
FieldTypeDescriptionRequiredDefault
namestringName of the KeeperCluster resource.true
namespacestringNamespace of the KeeperCluster resource.
When omitted, the ClickHouseCluster namespace is used.
false
Appears in:

KeeperClusterSpec

KeeperClusterSpec defines the desired state of KeeperCluster.
FieldTypeDescriptionRequiredDefault
replicasintegerNumber of replicas in the clusterfalse3
podTemplatePodTemplateSpecParameters passed to the Keeper pod spec.false
containerTemplateContainerTemplateSpecParameters passed to the Keeper container spec.false
dataVolumeClaimSpecPersistentVolumeClaimSpecSpecification of persistent storage for ClickHouse Keeper data.false
labelsobject (keys:string, values:string)Additional labels that are added to resources.false
annotationsobject (keys:string, values:string)Additional annotations that are added to resources.false
podDisruptionBudgetPodDisruptionBudgetSpecPodDisruptionBudget configures the PDB created for the Keeper cluster.
When unset, the operator defaults to maxUnavailable=replicas/2
(preserving quorum for a 2F+1 cluster).
false
settingsKeeperSettingsConfiguration parameters for ClickHouse Keeper server.false
clusterDomainstringClusterDomain is the Kubernetes cluster domain suffix used for DNS resolution.falsecluster.local
upgradeChannelstringUpgradeChannel specifies the release channel for major version upgrade checks.
When empty, only minor updates will be proposed. Allowed values are: stable, lts or specific major.minor version (e.g. 25.8).
false
versionProbeTemplateVersionProbeTemplateVersionProbeTemplate overrides for the version detection Job.false
Appears in:

KeeperClusterStatus

KeeperClusterStatus defines the observed state of KeeperCluster.
FieldTypeDescriptionRequiredDefault
conditionsCondition arrayfalse
readyReplicasintegerReadyReplicas Total number of replicas ready to serve requests.false
configurationRevisionstringConfigurationRevision indicates target configuration revision for every replica.true
statefulSetRevisionstringStatefulSetRevision indicates target StatefulSet revision for every replica.true
currentRevisionstringCurrentRevision indicates latest applied KeeperCluster spec revision.true
updateRevisionstringCurrentRevision indicates latest requested KeeperCluster spec revision.true
observedGenerationintegerObservedGeneration indicates latest generation observed by controller.true
versionstringVersion indicates the version reported by the container image.false
versionProbeRevisionstringVersionProbeRevision is the image hash of the last successful version probe.
When this matches the current image hash, the cached Version is used directly.
false
Appears in:

KeeperSettings

KeeperSettings defines ClickHouse Keeper server configuration.
FieldTypeDescriptionRequiredDefault
loggerLoggerConfigConfiguration of ClickHouse Keeper server logging.false
tlsClusterTLSSpecTLS settings, allows to configure secure endpoints and certificate verification for ClickHouse Keeper server.false
extraConfigRawExtensionAdditional ClickHouse Keeper configuration that will be merged with the default one.false
Appears in:

LoggerConfig

LoggerConfig defines server logging configuration.
FieldTypeDescriptionRequiredDefault
logToFilebooleanIf false then disable all logging to file.falsetrue
jsonLogsbooleanIf true, then log in JSON format.falsefalse
levelstringServer logger verbosity level.falsetrace
sizestringMaximum log file size.false1000M
countintegerMaximum number of log files to keep.false50
Appears in:

PDBPolicy

PDBPolicy controls whether PodDisruptionBudgets are created.
FieldDescription
EnabledPDBPolicyEnabled enables PodDisruptionBudgets creation by the operator.
DisabledPDBPolicyDisabled disables PodDisruptionBudgets, operator will delete resource with matching labels.
IgnoredPDBPolicyIgnored ignores PodDisruptionBudgets, operator will not create or delete any PDBs, existing PDBs will be left unchanged.
Appears in:

PodDisruptionBudgetSpec

PodDisruptionBudgetSpec configures the PDB created for the cluster. Exactly one of MinAvailable or MaxUnavailable may be set. When neither is set, the operator picks a safe default based on replica count.
FieldTypeDescriptionRequiredDefault
policyPDBPolicyPolicy controls whether the operator creates PodDisruptionBudgets.
Defaults to “Enabled” when unset. Set it to “Disabled” to skip PDB creation (e.g. for development environments).
falseEnabled
minAvailableIntOrStringMinAvailable is the minimum number of pods that must remain available during a disruption.false
maxUnavailableIntOrStringMaxUnavailable is the maximum number of pods that can be unavailable during a disruption.false
unhealthyPodEvictionPolicyUnhealthyPodEvictionPolicyTypeUnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods
should be considered for eviction.
Valid values are “IfReady” and “AlwaysAllow”.
false
Appears in:

PodTemplateSpec

PodTemplateSpec describes the pod configuration overrides for the cluster’s pods.
FieldTypeDescriptionRequiredDefault
terminationGracePeriodSecondsintegerOptional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
Value must be non-negative integer. The value zero indicates stop immediately via
the kill signal (no opportunity to shut down).
If this value is nil, the default grace period will be used instead.
The grace period is the duration in seconds after the processes running in the pod are sent
a termination signal and the time when the processes are forcibly halted with a kill signal.
Set this value longer than the expected cleanup time for your process.
Defaults to 30 seconds.
false
topologySpreadConstraintsTopologySpreadConstraint arrayTopologySpreadConstraints describes how a group of pods ought to spread across topology
domains. Scheduler will schedule pods in a way which abides by the constraints.
All topologySpreadConstraints are ANDed.
Merged with operator defaults by topologyKey.
false
imagePullSecretsLocalObjectReference arrayImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
If specified, these secrets will be passed to individual puller implementations for them to use.
More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
Merged with operator defaults by name.
false
nodeSelectorobject (keys:string, values:string)NodeSelector is a selector which must be true for the pod to fit on a node.
Selector which must match a node’s labels for the pod to be scheduled on that node.
More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
false
affinityAffinityIf specified, the pod’s scheduling constraints.
Appended to operator defaults: scheduling term lists are concatenated.
false
tolerationsToleration arrayIf specified, the pod’s Tolerations.false
schedulerNamestringIf specified, the pod will be dispatched by specified scheduler.
If not specified, the pod will be dispatched by default scheduler.
false
serviceAccountNamestringServiceAccountName is the name of the ServiceAccount to use to run this pod.
More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
false
priorityClassNamestringPriorityClassName is the name of the PriorityClass to use for the pod.false
runtimeClassNamestringRuntimeClassName is the name of the RuntimeClass to use for the pod.false
volumesVolume arrayVolumes defines the list of volumes that can be mounted by containers belonging to the pod.
More info: https://kubernetes.io/docs/concepts/storage/volumes
Merged with operator defaults by name; a user volume replaces any operator volume with the same name.
false
securityContextPodSecurityContextSecurityContext holds pod-level security attributes and common container settings.
A non-nil SecurityContext fully replaces operator defaults; the user owns the
entire struct. When nil, operator defaults are preserved.
false
topologyZoneKeystringTopologyZoneKey is the key of node labels.
Nodes that have a label with this key and identical values are considered to be in the same topology zone.
Set it to enable default TopologySpreadConstraints and Affinity rules to spread pods across zones.
Recommended to be set to “topology.kubernetes.io/zone”
false
nodeHostnameKeystringNodeHostnameKey is the key of node labels.
Nodes that have a label with this key and identical values are considered to be on the same node.
Set it to enable default AntiAffinity rules to spread replicas from the different shards across nodes.
Recommended to be set to “kubernetes.io/hostname”
false
initContainersContainer arrayInitContainers is the list of init containers to run before the main server container starts.
Merged with operator defaults by name.
with the same name.
false
Appears in:

SecretKeySelector

SecretKeySelector selects a key of a Secret.
FieldTypeDescriptionRequiredDefault
namestringThe name of the secret in the cluster’s namespace to select from.true
keystringThe key of the secret to select from. Must be a valid secret key.true
Appears in:

TemplateMeta

TemplateMeta defines supported metadata settings for template objects.
FieldTypeDescriptionRequiredDefault
labelsobject (keys:string, values:string)Labels are labels applied to the template objects.false
annotationsobject (keys:string, values:string)Annotations are annotations applied to the template objects.false
Appears in:

VersionProbeContainer

VersionProbeContainer defines container-level overrides for the version probe. Field names and JSON tags match corev1.Container so that SMP merges by name.
FieldTypeDescriptionRequiredDefault
namestringName of the container. If empty, the operator sets it to the version probe container name.trueversion-probe
resourcesResourceRequirementsResources are the compute resource requirements for the version probe container.
Deep-merged with operator defaults via SMP.
false
securityContextSecurityContextSecurityContext defines the security options for the version probe container.
Deep-merged with operator defaults via SMP.
false
Appears in:

VersionProbeJobSpec

VersionProbeJobSpec defines Job-level overrides for the version probe.
FieldTypeDescriptionRequiredDefault
ttlSecondsAfterFinishedintegerTTLSecondsAfterFinished limits the lifetime of a completed Job.false
templateVersionProbePodTemplateTemplate describes the pod that will be created for the version probe Job.false
Appears in:

VersionProbePodSpec

VersionProbePodSpec defines Pod-level overrides for the version probe. Field names and JSON tags match corev1.PodSpec for strategic merge patch compatibility.
FieldTypeDescriptionRequiredDefault
nodeSelectorobject (keys:string, values:string)NodeSelector constrains the version probe Pod to nodes with matching labels.false
tolerationsToleration arrayTolerations for the version probe Pod.false
securityContextPodSecurityContextSecurityContext holds pod-level security attributes for the version probe Pod.false
containersVersionProbeContainer arrayContainers overrides for the version probe Pod.
The name field is optional — the operator fills it with default container.
Additional container with the different name may be specified.
false
Appears in:

VersionProbePodTemplate

VersionProbePodTemplate describes overrides for the version probe Pod.
FieldTypeDescriptionRequiredDefault
metadataTemplateMetaRefer to Kubernetes API documentation for fields of metadata.false
specVersionProbePodSpecSpecification of the desired behavior of the version probe Pod.false
Appears in:

VersionProbeTemplate

VersionProbeTemplate defines overrides for the version detection Job. The structure mirrors batchv1.JobTemplateSpec, exposing only supported fields.
FieldTypeDescriptionRequiredDefault
metadataTemplateMetaRefer to Kubernetes API documentation for fields of metadata.false
specVersionProbeJobSpecSpecification of the desired behavior of the version probe Job.false
Appears in: