diff --git a/charts/altinity-clickhouse-operator/Chart.yaml b/charts/altinity-clickhouse-operator/Chart.yaml
index 49d58e8..1bce3d2 100644
--- a/charts/altinity-clickhouse-operator/Chart.yaml
+++ b/charts/altinity-clickhouse-operator/Chart.yaml
@@ -7,8 +7,8 @@ description: |-
Refer to operator repo for additional information.
type: application
-version: 0.0.10
-appVersion: 0.16.0
+version: 0.0.11
+appVersion: 0.16.1
home: https://github.com/slamdev/helm-charts/tree/master/charts/altinity-clickhouse-operator
icon: https://artifacthub.io/image/2d6aa29c-c74f-4bff-bede-ba7e6e0315a7@2x
maintainers:
diff --git a/charts/altinity-clickhouse-operator/README.md b/charts/altinity-clickhouse-operator/README.md
index 6e8f6d0..c931e7d 100644
--- a/charts/altinity-clickhouse-operator/README.md
+++ b/charts/altinity-clickhouse-operator/README.md
@@ -1,6 +1,6 @@
# altinity-clickhouse-operator
-![Version: 0.0.10](https://img.shields.io/badge/Version-0.0.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.16.0](https://img.shields.io/badge/AppVersion-0.16.0-informational?style=flat-square)
+![Version: 0.0.11](https://img.shields.io/badge/Version-0.0.11-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.16.1](https://img.shields.io/badge/AppVersion-0.16.1-informational?style=flat-square)
Helm chart to deploy [altinity-clickhouse-operator](https://github.com/Altinity/clickhouse-operator).
diff --git a/charts/altinity-clickhouse-operator/crds/CustomResourceDefinition-clickhouseinstallations.clickhouse.altinity.com.yaml b/charts/altinity-clickhouse-operator/crds/CustomResourceDefinition-clickhouseinstallations.clickhouse.altinity.com.yaml
index 6fdeec7..1640c55 100644
--- a/charts/altinity-clickhouse-operator/crds/CustomResourceDefinition-clickhouseinstallations.clickhouse.altinity.com.yaml
+++ b/charts/altinity-clickhouse-operator/crds/CustomResourceDefinition-clickhouseinstallations.clickhouse.altinity.com.yaml
@@ -1,3 +1,10 @@
+# Template Parameters:
+#
+# KIND=ClickHouseInstallation
+# SINGULAR=clickhouseinstallation
+# PLURAL=clickhouseinstallations
+# SHORT=chi
+#
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
@@ -19,61 +26,63 @@ spec:
- name: version
type: string
description: Operator version
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.version
- name: clusters
type: integer
description: Clusters count
- priority: 0
+ priority: 0 # show in standard view
jsonPath: .status.clusters
- name: shards
type: integer
description: Shards count
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.shards
- name: hosts
type: integer
description: Hosts count
- priority: 0
+ priority: 0 # show in standard view
jsonPath: .status.hosts
- name: taskID
type: string
description: TaskID
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.taskID
- name: status
type: string
description: CHI status
- priority: 0
+ priority: 0 # show in standard view
jsonPath: .status.status
- name: updated
type: integer
description: Updated hosts count
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.updated
- name: added
type: integer
description: Added hosts count
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.added
- name: deleted
type: integer
description: Hosts deleted count
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.deleted
- name: delete
type: integer
description: Hosts to be deleted count
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.delete
- name: endpoint
type: string
description: Client access endpoint
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.endpoint
+ subresources:
+ status: {}
schema:
openAPIV3Schema:
- description: define a set of Kubernetes resources (StatefulSet, PVC, Service, ConfigMap) which describe behavior one or more ClickHouse clusters
+ description: "define a set of Kubernetes resources (StatefulSet, PVC, Service, ConfigMap) which describe behavior one or more ClickHouse clusters"
type: object
required:
- spec
@@ -88,17 +97,107 @@ spec:
type: object
status:
type: object
- description: Current ClickHouseInstallation manifest status, contains many fields like a normalized configuration, clickhouse-operator version, current action and all applied action list, current taskID and all applied taskIDs and other
- x-kubernetes-preserve-unknown-fields: true
+ description: "Current ClickHouseInstallation manifest status, contains many fields like a normalized configuration, clickhouse-operator version, current action and all applied action list, current taskID and all applied taskIDs and other"
+ properties:
+ version:
+ type: string
+ description: "Version"
+ clusters:
+ type: integer
+ minimum: 0
+ description: "Clusters count"
+ shards:
+ type: integer
+ minimum: 0
+ description: "Shards count"
+ replicas:
+ type: integer
+ minimum: 0
+ description: "Replicas count"
+ hosts:
+ type: integer
+ minimum: 0
+ description: "Hosts count"
+ status:
+ type: string
+ description: "Status"
+ taskID:
+ type: string
+ description: "Current task id"
+ taskIDsStarted:
+ type: array
+ description: "Started task ids"
+ items:
+ type: string
+ taskIDsCompleted:
+ type: array
+ description: "Completed task ids"
+ items:
+ type: string
+ action:
+ type: string
+ description: "Action"
+ actions:
+ type: array
+ description: "Actions"
+ items:
+ type: string
+ error:
+ type: string
+ description: "Last error"
+ errors:
+ type: array
+ description: "Errors"
+ items:
+ type: string
+ updated:
+ type: integer
+ minimum: 0
+ description: "Updated Hosts count"
+ added:
+ type: integer
+ minimum: 0
+ description: "Added Hosts count"
+ deleted:
+ type: integer
+ minimum: 0
+ description: "Deleted Hosts count"
+ delete:
+ type: integer
+ minimum: 0
+ description: "About to delete Hosts count"
+ pods:
+ type: array
+ description: "Pods"
+ items:
+ type: string
+ fqdns:
+ type: array
+ description: "Pods FQDNs"
+ items:
+ type: string
+ endpoint:
+ type: string
+ description: "Endpoint"
+ generation:
+ type: integer
+ minimum: 0
+ description: "Generation"
+ normalized:
+ type: object
+ description: "Normalized CHI"
+ x-kubernetes-preserve-unknown-fields: true
spec:
type: object
+ # x-kubernetes-preserve-unknown-fields: true
description: |
Specification of the desired behavior of one or more ClickHouse clusters
More info: https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md"
properties:
taskID:
type: string
- description: Allow define custom taskID for named update and watch status of this update execution in .status.taskIDs field, by default every update of chi manifest will generate random taskID
+ description: "Allow define custom taskID for named update and watch status of this update execution in .status.taskIDs field, by default every update of chi manifest will generate random taskID"
+ # Need to be StringBool
stop:
type: string
description: |
@@ -107,6 +206,7 @@ spec:
- 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
enum:
+ # List StringBoolXXX constants from model
- ""
- "0"
- "1"
@@ -122,24 +222,26 @@ spec:
- "off"
- "On"
- "on"
- - Disable
- - disable
- - Enable
- - enable
- - Disabled
- - disabled
- - Enabled
- - enabled
+ - "Disable"
+ - "disable"
+ - "Enable"
+ - "enable"
+ - "Disabled"
+ - "disabled"
+ - "Enabled"
+ - "enabled"
restart:
type: string
- description: restart policy for StatefulSets. When value `RollingUpdate` it allow graceful restart one by one instead of restart all StatefulSet simultaneously
+ description: "restart policy for StatefulSets. When value `RollingUpdate` it allow graceful restart one by one instead of restart all StatefulSet simultaneously"
enum:
- ""
- - RollingUpdate
+ - "RollingUpdate"
+ # Need to be StringBool
troubleshoot:
type: string
- description: allows troubleshoot Pods during CrashLoopBack state, when you apply wrong configuration, `clickhouse-server` wouldn't startup
+ description: "allows troubleshoot Pods during CrashLoopBack state, when you apply wrong configuration, `clickhouse-server` wouldn't startup"
enum:
+ # List StringBoolXXX constants from model
- ""
- "0"
- "1"
@@ -155,30 +257,32 @@ spec:
- "off"
- "On"
- "on"
- - Disable
- - disable
- - Enable
- - enable
- - Disabled
- - disabled
- - Enabled
- - enabled
+ - "Disable"
+ - "disable"
+ - "Enable"
+ - "enable"
+ - "Disabled"
+ - "disabled"
+ - "Enabled"
+ - "enabled"
namespaceDomainPattern:
type: string
- description: 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
+ description: "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"
templating:
type: object
- description: optional, define policy for auto applying ClickHouseInstallationTemplate inside ClickHouseInstallation
+ # nullable: true
+ description: "optional, define policy for auto applying ClickHouseInstallationTemplate inside ClickHouseInstallation"
properties:
policy:
type: string
- description: when defined as `auto` inside ClickhouseInstallationTemplate, it will auto add into all ClickHouseInstallation, manual value is default
+ description: "when defined as `auto` inside ClickhouseInstallationTemplate, it will auto add into all ClickHouseInstallation, manual value is default"
enum:
- - auto
- - manual
+ - "auto"
+ - "manual"
reconciling:
type: object
- description: optional, allows tuning reconciling cycle for ClickhouseInstallation from clickhouse-operator side
+ description: "optional, allows tuning reconciling cycle for ClickhouseInstallation from clickhouse-operator side"
+ # nullable: true
properties:
policy:
type: string
@@ -191,76 +295,90 @@ spec:
maximum: 3600
cleanup:
type: object
- description: optional, define behavior for cleanup Kubernetes resources during reconcile cycle
+ description: "optional, define behavior for cleanup Kubernetes resources during reconcile cycle"
+ # nullable: true
properties:
unknownObjects:
type: object
- description: what clickhouse-operator shall do when found Kubernetes resources which should be managed with clickhouse-operator, but not have `ownerReference` to any currently managed `ClickHouseInstallation` resource, default behavior is `Delete`
+ description: "what clickhouse-operator shall do when found Kubernetes resources which should be managed with clickhouse-operator, but not have `ownerReference` to any currently managed `ClickHouseInstallation` resource, default behavior is `Delete`"
+ # nullable: true
properties:
statefulSet:
type: string
- description: behavior policy for unknown StatefulSet, Delete by default
+ description: "behavior policy for unknown StatefulSet, Delete by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
pvc:
type: string
- description: behavior policy for unknown PVC, Delete by default
+ description: "behavior policy for unknown PVC, Delete by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
configMap:
type: string
- description: behavior policy for unknown ConfigMap, Delete by default
+ description: "behavior policy for unknown ConfigMap, Delete by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
service:
type: string
- description: behavior policy for unknown Service, Delete by default
+ description: "behavior policy for unknown Service, Delete by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
reconcileFailedObjects:
type: object
- description: what clickhouse-operator shall do when reconciling Kubernetes resources are failed, default behavior is `Retain`
+ description: "what clickhouse-operator shall do when reconciling Kubernetes resources are failed, default behavior is `Retain`"
+ # nullable: true
properties:
statefulSet:
type: string
- description: behavior policy for failed StatefulSet reconciling, Retain by default
+ description: "behavior policy for failed StatefulSet reconciling, Retain by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
pvc:
type: string
- description: behavior policy for failed PVC reconciling, Retain by default
+ description: "behavior policy for failed PVC reconciling, Retain by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
configMap:
type: string
- description: behavior policy for failed ConfigMap reconciling, Retain by default
+ description: "behavior policy for failed ConfigMap reconciling, Retain by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
service:
type: string
- description: behavior policy for failed Service reconciling, Retain by default
+ description: "behavior policy for failed Service reconciling, Retain by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
defaults:
type: object
description: |
define default behavior for whole ClickHouseInstallation, some behavior can be re-define on cluster, shard and replica level
More info: https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#specdefaults
+ # nullable: true
properties:
+ # Need to be StringBool
replicasUseFQDN:
type: string
description: |
define should replicas be specified by FQDN in ``, then "no" then will use short hostname and clickhouse-server will use kubernetes default suffixes for properly DNS lookup
"yes" by default
enum:
+ # List StringBoolXXX constants from model
- ""
- "0"
- "1"
@@ -276,57 +394,60 @@ spec:
- "off"
- "On"
- "on"
- - Disable
- - disable
- - Enable
- - enable
- - Disabled
- - disabled
- - Enabled
- - enabled
+ - "Disable"
+ - "disable"
+ - "Enable"
+ - "enable"
+ - "Disabled"
+ - "disabled"
+ - "Enabled"
+ - "enabled"
distributedDDL:
type: object
description: |
allows change `` settings
More info: https://clickhouse.tech/docs/en/operations/server-configuration-parameters/settings/#server-settings-distributed_ddl
+ # nullable: true
properties:
profile:
type: string
- description: Settings from this profile will be used to execute DDL queries
+ description: "Settings from this profile will be used to execute DDL queries"
templates:
type: object
- description: optional, configuration of the templates names which will use for generate Kubernetes resources according to one or more ClickHouse clusters described in current ClickHouseInstallation (chi) resource
+ description: "optional, configuration of the templates names which will use for generate Kubernetes resources according to one or more ClickHouse clusters described in current ClickHouseInstallation (chi) resource"
+ # nullable: true
properties:
hostTemplate:
type: string
- description: 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`
+ description: "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`"
podTemplate:
type: string
- description: 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`
+ description: "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`"
dataVolumeClaimTemplate:
type: string
- description: 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`
+ description: "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`"
logVolumeClaimTemplate:
type: string
- description: 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`
+ description: "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`"
serviceTemplate:
type: string
- description: 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
+ description: "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"
clusterServiceTemplate:
type: string
- description: 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`
+ description: "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`"
shardServiceTemplate:
type: string
- description: 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`
+ description: "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`"
replicaServiceTemplate:
type: string
- description: 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`
+ description: "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`"
volumeClaimTemplate:
type: string
- description: DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate
+ description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
configuration:
type: object
- description: allows configure multiple aspects and behavior for `clickhouse-server` instance and also allows describe multiple `clickhouse-server` clusters inside one `chi` resource
+ description: "allows configure multiple aspects and behavior for `clickhouse-server` instance and also allows describe multiple `clickhouse-server` clusters inside one `chi` resource"
+ # nullable: true
properties:
zookeeper:
type: object
@@ -335,33 +456,37 @@ spec:
`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
+ # nullable: true
properties:
nodes:
type: array
- description: describe every available zookeeper cluster node for interaction
+ description: "describe every available zookeeper cluster node for interaction"
+ # nullable: true
items:
type: object
+ #required:
+ # - host
properties:
host:
type: string
- description: dns name or ip address for Zookeeper node
+ description: "dns name or ip address for Zookeeper node"
port:
type: integer
- description: TCP port which used to connect to Zookeeper node
+ description: "TCP port which used to connect to Zookeeper node"
minimum: 0
maximum: 65535
session_timeout_ms:
type: integer
- description: session timeout during connect to Zookeeper
+ description: "session timeout during connect to Zookeeper"
operation_timeout_ms:
type: integer
- description: one operation timeout during Zookeeper transactions
+ description: "one operation timeout during Zookeeper transactions"
root:
type: string
- description: optional root znode path inside zookeeper to store ClickHouse related data (replication queue or distributed DDL)
+ description: "optional root znode path inside zookeeper to store ClickHouse related data (replication queue or distributed DDL)"
identity:
type: string
- description: optional access credentials string with `user:password` format used when use digest authorization in Zookeeper
+ description: "optional access credentials string with `user:password` format used when use digest authorization in Zookeeper"
users:
type: object
description: |
@@ -369,6 +494,7 @@ spec:
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
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
profiles:
type: object
@@ -377,6 +503,7 @@ spec:
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
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
quotas:
type: object
@@ -385,6 +512,7 @@ spec:
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
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
settings:
type: object
@@ -392,6 +520,7 @@ spec:
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
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
@@ -402,6 +531,7 @@ spec:
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
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
clusters:
type: array
@@ -411,129 +541,144 @@ spec:
all Pods will rendered in 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
+ # nullable: true
items:
type: object
+ #required:
+ # - name
properties:
name:
type: string
- description: cluster name, used to identify set of ClickHouse servers and wide used during generate names of related Kubernetes resources
+ description: "cluster name, used to identify set of ClickHouse servers and wide used during generate names of related Kubernetes resources"
minLength: 1
+ # See namePartClusterMaxLen const
maxLength: 15
- pattern: ^[a-zA-Z0-9-]{0,15}$
+ pattern: "^[a-zA-Z0-9-]{0,15}$"
zookeeper:
type: object
description: |
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
+ # nullable: true
properties:
nodes:
type: array
- description: describe every available zookeeper cluster node for interaction
+ description: "describe every available zookeeper cluster node for interaction"
+ # nullable: true
items:
type: object
+ #required:
+ # - host
properties:
host:
type: string
- description: dns name or ip address for Zookeeper node
+ description: "dns name or ip address for Zookeeper node"
port:
type: integer
- description: TCP port which used to connect to Zookeeper node
+ description: "TCP port which used to connect to Zookeeper node"
minimum: 0
maximum: 65535
session_timeout_ms:
type: integer
- description: session timeout during connect to Zookeeper
+ description: "session timeout during connect to Zookeeper"
operation_timeout_ms:
type: integer
- description: one operation timeout during Zookeeper transactions
+ description: "one operation timeout during Zookeeper transactions"
root:
type: string
- description: optional root znode path inside zookeeper to store ClickHouse related data (replication queue or distributed DDL)
+ description: "optional root znode path inside zookeeper to store ClickHouse related data (replication queue or distributed DDL)"
identity:
type: string
- description: optional access credentials string with `user:password` format used when use digest authorization in Zookeeper
+ description: "optional access credentials string with `user:password` format used when use digest authorization in Zookeeper"
settings:
type: object
description: |
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/
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
description: |
optional, allows define content of any setting file inside each `Pod` on current cluster during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files`
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
templates:
type: object
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected cluster
override top-level `chi.spec.configuration.templates`
+ # nullable: true
properties:
hostTemplate:
type: string
- description: optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one cluster
+ description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one cluster"
podTemplate:
type: string
- description: 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` only for one cluster
+ description: "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` only for one cluster"
dataVolumeClaimTemplate:
type: string
- description: 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` only for one cluster
+ description: "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` only for one cluster"
logVolumeClaimTemplate:
type: string
- description: 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` only for one cluster
+ description: "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` only for one cluster"
serviceTemplate:
type: string
- description: optional, fully ignores for cluster-level
+ description: "optional, fully ignores for cluster-level"
clusterServiceTemplate:
type: string
- description: 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` only for one cluster
+ description: "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` only for one cluster"
shardServiceTemplate:
type: string
- description: 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` only for one cluster
+ description: "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` only for one cluster"
replicaServiceTemplate:
type: string
- description: 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` only for one cluster
+ description: "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` only for one cluster"
volumeClaimTemplate:
type: string
- description: DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate
+ description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
layout:
type: object
description: |
describe current cluster layout, how much shards in cluster, how much replica in shard
allows override settings on each shard and replica separatelly
+ # nullable: true
properties:
type:
type: string
- description: DEPRECATED - to be removed soon
+ description: "DEPRECATED - to be removed soon"
shardsCount:
type: integer
- description: 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
+ description: "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"
replicasCount:
type: integer
- description: 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
+ description: "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"
shards:
type: array
- description: optional, allows override top-level `chi.spec.configuration`, cluster-level `chi.spec.configuration.clusters` settings for each shard separately, use it only if you fully understand what you do
+ description: "optional, allows override top-level `chi.spec.configuration`, cluster-level `chi.spec.configuration.clusters` settings for each shard separately, use it only if you fully understand what you do"
+ # nullable: true
items:
type: object
properties:
name:
type: string
- description: optional, by default shard name is generated, but you can override it and setup custom name
+ description: "optional, by default shard name is generated, but you can override it and setup custom name"
minLength: 1
+ # See namePartShardMaxLen const
maxLength: 15
- pattern: ^[a-zA-Z0-9-]{0,15}$
+ pattern: "^[a-zA-Z0-9-]{0,15}$"
definitionType:
type: string
- description: DEPRECATED - to be removed soon
+ description: "DEPRECATED - to be removed soon"
weight:
type: integer
description: |
optional, 1 by default, allows setup shard setting which will use during insert into tables with `Distributed` engine,
will apply in 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/
+ # Need to be StringBool
internalReplication:
type: string
description: |
@@ -542,6 +687,7 @@ spec:
will apply in 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/
enum:
+ # List StringBoolXXX constants from model
- ""
- "0"
- "1"
@@ -557,16 +703,17 @@ spec:
- "off"
- "On"
- "on"
- - Disable
- - disable
- - Enable
- - enable
- - Disabled
- - disabled
- - Enabled
- - enabled
+ - "Disable"
+ - "disable"
+ - "Enable"
+ - "enable"
+ - "Disabled"
+ - "disabled"
+ - "Enabled"
+ - "enabled"
settings:
type: object
+ # nullable: true
description: |
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`
@@ -574,6 +721,7 @@ spec:
x-kubernetes-preserve-unknown-fields: true
files:
type: object
+ # nullable: true
description: |
optional, allows define content of any setting file inside each `Pod` only in one shard during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files` and cluster-level `chi.spec.configuration.clusters.files`
@@ -583,34 +731,35 @@ spec:
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected shard
override top-level `chi.spec.configuration.templates` and cluster-level `chi.spec.configuration.clusters.templates`
+ # nullable: true
properties:
hostTemplate:
type: string
- description: optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one shard
+ description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one shard"
podTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
dataVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
logVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
serviceTemplate:
type: string
- description: optional, fully ignores for shard-level
+ description: "optional, fully ignores for shard-level"
clusterServiceTemplate:
type: string
- description: optional, fully ignores for shard-level
+ description: "optional, fully ignores for shard-level"
shardServiceTemplate:
type: string
- description: optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover shard inside clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard
+ description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover shard inside clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard"
replicaServiceTemplate:
type: string
- description: 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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard
+ description: "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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard"
volumeClaimTemplate:
type: string
- description: DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate
+ description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
replicasCount:
type: integer
description: |
@@ -622,15 +771,18 @@ spec:
type: array
description: |
optional, allows override behavior for selected replicas from cluster-level `chi.spec.configuration.clusters` and shard-level `chi.spec.configuration.clusters.layout.shards`
+ # nullable: true
items:
+ # Host
type: object
properties:
name:
type: string
- description: optional, by default replica name is generated, but you can override it and setup custom name
+ description: "optional, by default replica name is generated, but you can override it and setup custom name"
minLength: 1
+ # See namePartReplicaMaxLen const
maxLength: 15
- pattern: ^[a-zA-Z0-9-]{0,15}$
+ pattern: "^[a-zA-Z0-9-]{0,15}$"
tcpPort:
type: integer
description: |
@@ -654,6 +806,7 @@ spec:
maximum: 65535
settings:
type: object
+ # nullable: true
description: |
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`
@@ -661,6 +814,7 @@ spec:
x-kubernetes-preserve-unknown-fields: true
files:
type: object
+ # nullable: true
description: |
optional, allows define content of any setting file inside `Pod` only in one replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files`, cluster-level `chi.spec.configuration.clusters.files` and shard-level `chi.spec.configuration.clusters.layout.shards.files`
@@ -670,55 +824,60 @@ spec:
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected replica
override top-level `chi.spec.configuration.templates`, cluster-level `chi.spec.configuration.clusters.templates` and shard-level `chi.spec.configuration.clusters.layout.shards.templates`
+ # nullable: true
properties:
hostTemplate:
type: string
- description: optional, template name from chi.spec.templates.hostTemplates, which will apply to configure `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one replica
+ description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one replica"
podTemplate:
type: string
- description: 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` only for one replica
+ description: "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` only for one replica"
dataVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
logVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
serviceTemplate:
type: string
- description: optional, fully ignores for replica-level
+ description: "optional, fully ignores for replica-level"
clusterServiceTemplate:
type: string
- description: optional, fully ignores for replica-level
+ description: "optional, fully ignores for replica-level"
shardServiceTemplate:
type: string
- description: optional, fully ignores for replica-level
+ description: "optional, fully ignores for replica-level"
replicaServiceTemplate:
type: string
- description: 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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one replica
+ description: "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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one replica"
volumeClaimTemplate:
type: string
- description: DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate
+ description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
replicas:
type: array
- description: optional, allows override top-level `chi.spec.configuration` and cluster-level `chi.spec.configuration.clusters` configuration for each replica and each shard relates to selected replica, use it only if you fully understand what you do
+ description: "optional, allows override top-level `chi.spec.configuration` and cluster-level `chi.spec.configuration.clusters` configuration for each replica and each shard relates to selected replica, use it only if you fully understand what you do"
+ # nullable: true
items:
type: object
properties:
name:
type: string
- description: optional, by default replica name is generated, but you can override it and setup custom name
+ description: "optional, by default replica name is generated, but you can override it and setup custom name"
minLength: 1
+ # See namePartShardMaxLen const
maxLength: 15
- pattern: ^[a-zA-Z0-9-]{0,15}$
+ pattern: "^[a-zA-Z0-9-]{0,15}$"
settings:
type: object
description: |
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/
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
+ # nullable: true
description: |
optional, allows define content of any setting file inside each `Pod` only in one replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files` and cluster-level `chi.spec.configuration.clusters.files`, will ignore if `chi.spec.configuration.clusters.layout.shards` presents
@@ -728,50 +887,54 @@ spec:
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected replica
override top-level `chi.spec.configuration.templates`, cluster-level `chi.spec.configuration.clusters.templates`
+ # nullable: true
properties:
hostTemplate:
type: string
- description: optional, template name from chi.spec.templates.hostTemplates, which will apply to configure `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one replica
+ description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one replica"
podTemplate:
type: string
- description: 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` only for one replica
+ description: "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` only for one replica"
dataVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
logVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
serviceTemplate:
type: string
- description: optional, fully ignores for replica-level
+ description: "optional, fully ignores for replica-level"
clusterServiceTemplate:
type: string
- description: optional, fully ignores for replica-level
+ description: "optional, fully ignores for replica-level"
shardServiceTemplate:
type: string
- description: optional, fully ignores for replica-level
+ description: "optional, fully ignores for replica-level"
replicaServiceTemplate:
type: string
- description: 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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one replica
+ description: "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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one replica"
volumeClaimTemplate:
type: string
- description: DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate
+ description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
shardsCount:
type: integer
- description: optional, count of shards related to current replica, you can override each shard behavior on low-level `chi.spec.configuration.clusters.layout.replicas.shards`
+ description: "optional, count of shards related to current replica, you can override each shard behavior on low-level `chi.spec.configuration.clusters.layout.replicas.shards`"
minimum: 1
shards:
type: array
- description: optional, list of shards related to current replica, will ignore if `chi.spec.configuration.clusters.layout.shards` presents
+ description: "optional, list of shards related to current replica, will ignore if `chi.spec.configuration.clusters.layout.shards` presents"
+ # nullable: true
items:
+ # Host
type: object
properties:
name:
type: string
- description: optional, by default shard name is generated, but you can override it and setup custom name
+ description: "optional, by default shard name is generated, but you can override it and setup custom name"
minLength: 1
+ # See namePartReplicaMaxLen const
maxLength: 15
- pattern: ^[a-zA-Z0-9-]{0,15}$
+ pattern: "^[a-zA-Z0-9-]{0,15}$"
tcpPort:
type: integer
description: |
@@ -799,81 +962,94 @@ spec:
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/
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
description: |
optional, allows define content of any setting file inside each `Pod` only in one shard related to current replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files` and cluster-level `chi.spec.configuration.clusters.files`, will ignore if `chi.spec.configuration.clusters.layout.shards` presents
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
templates:
type: object
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected replica
override top-level `chi.spec.configuration.templates`, cluster-level `chi.spec.configuration.clusters.templates`, replica-level `chi.spec.configuration.clusters.layout.replicas.templates`
+ # nullable: true
properties:
hostTemplate:
type: string
- description: optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one shard
+ description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one shard"
podTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
dataVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
logVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
serviceTemplate:
type: string
- description: optional, fully ignores for shard-level
+ description: "optional, fully ignores for shard-level"
clusterServiceTemplate:
type: string
- description: optional, fully ignores for shard-level
+ description: "optional, fully ignores for shard-level"
shardServiceTemplate:
type: string
- description: optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover shard inside clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard
+ description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover shard inside clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard"
replicaServiceTemplate:
type: string
- description: 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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard
+ description: "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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard"
volumeClaimTemplate:
type: string
- description: DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate
+ description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
templates:
type: object
- description: allows define templates which will use for render Kubernetes resources like StatefulSet, ConfigMap, Service, PVC, by default, clickhouse-operator have own templates, but you can override it
+ description: "allows define templates which will use for render Kubernetes resources like StatefulSet, ConfigMap, Service, PVC, by default, clickhouse-operator have own templates, but you can override it"
+ # nullable: true
properties:
hostTemplates:
type: array
- description: hostTemplate will use during apply to generate `clickhose-server` config files
+ description: "hostTemplate will use during apply to generate `clickhose-server` config files"
+ # nullable: true
items:
type: object
+ #required:
+ # - name
properties:
name:
- description: 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`
+ description: "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`"
type: string
portDistribution:
type: array
- description: define how will distribute numeric values of named ports in `Pod.spec.containers.ports` and clickhouse-server configs
+ description: "define how will distribute numeric values of named ports in `Pod.spec.containers.ports` and clickhouse-server configs"
+ # nullable: true
items:
type: object
+ #required:
+ # - type
properties:
type:
type: string
- description: 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
+ description: "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"
enum:
+ # List PortDistributionXXX constants
- ""
- - Unspecified
- - ClusterScopeIndex
+ - "Unspecified"
+ - "ClusterScopeIndex"
spec:
+ # Host
type: object
properties:
name:
type: string
- description: by default, hostname will generate, but this allows define custom name for each `clickhuse-server`
+ description: "by default, hostname will generate, but this allows define custom name for each `clickhuse-server`"
minLength: 1
+ # See namePartReplicaMaxLen const
maxLength: 15
- pattern: ^[a-zA-Z0-9-]{0,15}$
+ pattern: "^[a-zA-Z0-9-]{0,15}$"
tcpPort:
type: integer
description: |
@@ -903,15 +1079,18 @@ spec:
description: |
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/
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
description: |
optional, allows define content of any setting file inside each `Pod` where this template will apply during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
templates:
type: object
- description: be carefull, this part of CRD allows override template inside template, don't use it if you don't understand what you do
+ description: "be carefull, this part of CRD allows override template inside template, don't use it if you don't understand what you do"
+ # nullable: true
properties:
hostTemplate:
type: string
@@ -934,94 +1113,112 @@ spec:
description: |
podTemplate will use during render `Pod` inside `StatefulSet.spec` and allows define rendered `Pod.spec`, pod scheduling distribution and pod zone
More information: https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#spectemplatespodtemplates
+ # nullable: true
items:
type: object
+ #required:
+ # - name
properties:
name:
type: string
- description: 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`
+ description: "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`"
generateName:
type: string
- description: 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
+ description: "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"
zone:
type: object
- description: allows define custom zone name and will separate ClickHouse `Pods` between nodes, shortcut for `chi.spec.templates.podTemplates.spec.affinity.podAntiAffinity`
+ description: "allows define custom zone name and will separate ClickHouse `Pods` between nodes, shortcut for `chi.spec.templates.podTemplates.spec.affinity.podAntiAffinity`"
+ #required:
+ # - values
properties:
key:
type: string
- description: optional, if defined, allows select kubernetes nodes by label with `name` equal `key`
+ description: "optional, if defined, allows select kubernetes nodes by label with `name` equal `key`"
values:
type: array
- description: optional, if defined, allows select kubernetes nodes by label with `value` in `values`
+ description: "optional, if defined, allows select kubernetes nodes by label with `value` in `values`"
+ # nullable: true
items:
type: string
distribution:
type: string
- description: DEPRECATED, shortcut for `chi.spec.templates.podTemplates.spec.affinity.podAntiAffinity`
+ description: "DEPRECATED, shortcut for `chi.spec.templates.podTemplates.spec.affinity.podAntiAffinity`"
enum:
- ""
- - Unspecified
- - OnePerHost
+ - "Unspecified"
+ - "OnePerHost"
podDistribution:
type: array
- description: define ClickHouse Pod distibution policy between Kubernetes Nodes inside Shard, Replica, Namespace, CHI, another ClickHouse cluster
+ description: "define ClickHouse Pod distibution policy between Kubernetes Nodes inside Shard, Replica, Namespace, CHI, another ClickHouse cluster"
+ # nullable: true
items:
type: object
+ #required:
+ # - type
properties:
type:
type: string
- description: you can define multiple affinity policy types
+ description: "you can define multiple affinity policy types"
enum:
+ # List PodDistributionXXX constants
- ""
- - Unspecified
- - ClickHouseAntiAffinity
- - ShardAntiAffinity
- - ReplicaAntiAffinity
- - AnotherNamespaceAntiAffinity
- - AnotherClickHouseInstallationAntiAffinity
- - AnotherClusterAntiAffinity
- - MaxNumberPerNode
- - NamespaceAffinity
- - ClickHouseInstallationAffinity
- - ClusterAffinity
- - ShardAffinity
- - ReplicaAffinity
- - PreviousTailAffinity
- - CircularReplication
+ - "Unspecified"
+ - "ClickHouseAntiAffinity"
+ - "ShardAntiAffinity"
+ - "ReplicaAntiAffinity"
+ - "AnotherNamespaceAntiAffinity"
+ - "AnotherClickHouseInstallationAntiAffinity"
+ - "AnotherClusterAntiAffinity"
+ - "MaxNumberPerNode"
+ - "NamespaceAffinity"
+ - "ClickHouseInstallationAffinity"
+ - "ClusterAffinity"
+ - "ShardAffinity"
+ - "ReplicaAffinity"
+ - "PreviousTailAffinity"
+ - "CircularReplication"
scope:
type: string
- description: scope for apply each podDistribution
+ description: "scope for apply each podDistribution"
enum:
+ # list PodDistributionScopeXXX constants
- ""
- - Unspecified
- - Shard
- - Replica
- - Cluster
- - ClickHouseInstallation
- - Namespace
+ - "Unspecified"
+ - "Shard"
+ - "Replica"
+ - "Cluster"
+ - "ClickHouseInstallation"
+ - "Namespace"
number:
type: integer
- description: define, how much ClickHouse Pods could be inside selected scope with selected distribution type
+ description: "define, how much ClickHouse Pods could be inside selected scope with selected distribution type"
minimum: 0
maximum: 65535
topologyKey:
type: string
- description: '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'
+ description: "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:
+ # TODO specify PodSpec
type: object
- description: allows define whole Pod.spec inside StaefulSet.spec, look to https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates for details
+ description: "allows define whole Pod.spec inside StaefulSet.spec, look to https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates for details"
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
metadata:
type: object
description: |
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
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
volumeClaimTemplates:
type: array
- description: allows define template for rendering `PVC` kubernetes resource, which would use inside `Pod` for mount clickhouse `data`, clickhouse `logs` or something else
+ description: "allows define template for rendering `PVC` kubernetes resource, which would use inside `Pod` for mount clickhouse `data`, clickhouse `logs` or something else"
+ # nullable: true
items:
type: object
+ #required:
+ # - name
+ # - spec
properties:
name:
description: |
@@ -1033,29 +1230,35 @@ spec:
type: string
reclaimPolicy:
type: string
- description: define behavior of `PVC` deletion policy during delete `Pod`, `Delete` by default, when `Retain` then `PVC` still alive even `Pod` will deleted
+ description: "define behavior of `PVC` deletion policy during delete `Pod`, `Delete` by default, when `Retain` then `PVC` still alive even `Pod` will deleted"
enum:
- ""
- - Retain
- - Delete
+ - "Retain"
+ - "Delete"
metadata:
type: object
description: |
allows pass standard object's metadata from template to PVC
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
spec:
type: object
description: |
allows define all aspects of `PVC` resource
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
serviceTemplates:
type: array
description: |
allows define template for rendering `Service` which would get endpoint from Pods which scoped chi-wide, cluster-wide, shard-wide, replica-wide level
+ # nullable: true
items:
type: object
+ #required:
+ # - name
+ # - spec
properties:
name:
type: string
@@ -1067,35 +1270,43 @@ spec:
replica-level `chi.spec.configuration.clusters.layout.replicas.templates.replicaServiceTemplate` or `chi.spec.configuration.clusters.layout.shards.replicas.replicaServiceTemplate`
generateName:
type: string
- description: 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
+ description: "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"
metadata:
+ # TODO specify ObjectMeta
type: object
description: |
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/
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
spec:
+ # TODO specify ServiceSpec
type: object
description: |
describe behavior of generated Service
More info: https://kubernetes.io/docs/concepts/services-networking/service/
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
useTemplates:
type: array
- description: list of `ClickHouseInstallationTemplate` (chit) resource names which will merge with current `Chi` manifest during render Kubernetes resources to create related ClickHouse clusters
+ description: "list of `ClickHouseInstallationTemplate` (chit) resource names which will merge with current `Chi` manifest during render Kubernetes resources to create related ClickHouse clusters"
+ # nullable: true
items:
type: object
+ #required:
+ # - name
properties:
name:
type: string
- description: name of `ClickHouseInstallationTemplate` (chit) resource
+ description: "name of `ClickHouseInstallationTemplate` (chit) resource"
namespace:
type: string
- description: Kubernetes namespace where need search `chit` resource, depending on `watchNamespaces` settings in `clichouse-operator`
+ description: "Kubernetes namespace where need search `chit` resource, depending on `watchNamespaces` settings in `clichouse-operator`"
useType:
type: string
- description: optional, current strategy is only merge, and current `chi` settings have more priority than merged template `chit`
+ description: "optional, current strategy is only merge, and current `chi` settings have more priority than merged template `chit`"
enum:
+ # List useTypeXXX constants from model
- ""
- - merge
+ - "merge"
diff --git a/charts/altinity-clickhouse-operator/crds/CustomResourceDefinition-clickhouseinstallationtemplates.clickhouse.altinity.com.yaml b/charts/altinity-clickhouse-operator/crds/CustomResourceDefinition-clickhouseinstallationtemplates.clickhouse.altinity.com.yaml
index 6d9db33..3b5d725 100644
--- a/charts/altinity-clickhouse-operator/crds/CustomResourceDefinition-clickhouseinstallationtemplates.clickhouse.altinity.com.yaml
+++ b/charts/altinity-clickhouse-operator/crds/CustomResourceDefinition-clickhouseinstallationtemplates.clickhouse.altinity.com.yaml
@@ -1,3 +1,10 @@
+# Template Parameters:
+#
+# KIND=ClickHouseInstallationTemplate
+# SINGULAR=clickhouseinstallationtemplate
+# PLURAL=clickhouseinstallationtemplates
+# SHORT=chit
+#
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
@@ -19,61 +26,63 @@ spec:
- name: version
type: string
description: Operator version
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.version
- name: clusters
type: integer
description: Clusters count
- priority: 0
+ priority: 0 # show in standard view
jsonPath: .status.clusters
- name: shards
type: integer
description: Shards count
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.shards
- name: hosts
type: integer
description: Hosts count
- priority: 0
+ priority: 0 # show in standard view
jsonPath: .status.hosts
- name: taskID
type: string
description: TaskID
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.taskID
- name: status
type: string
description: CHI status
- priority: 0
+ priority: 0 # show in standard view
jsonPath: .status.status
- name: updated
type: integer
description: Updated hosts count
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.updated
- name: added
type: integer
description: Added hosts count
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.added
- name: deleted
type: integer
description: Hosts deleted count
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.deleted
- name: delete
type: integer
description: Hosts to be deleted count
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.delete
- name: endpoint
type: string
description: Client access endpoint
- priority: 1
+ priority: 1 # show in wide view
jsonPath: .status.endpoint
+ subresources:
+ status: {}
schema:
openAPIV3Schema:
- description: define a template which describe Kubernetes resources (StatefulSet, PVC, Service, ConfigMap) which describe behavior one or more ClickHouse clusters, would be used in `chi.spec.useTemplates`
+ description: "define a set of Kubernetes resources (StatefulSet, PVC, Service, ConfigMap) which describe behavior one or more ClickHouse clusters"
type: object
required:
- spec
@@ -88,17 +97,107 @@ spec:
type: object
status:
type: object
- description: Current ClickHouseInstallation manifest status, contains many fields like a normalized configuration, clickhouse-operator version, current action and all applied action list, current taskID and all applied taskIDs and other
- x-kubernetes-preserve-unknown-fields: true
+ description: "Current ClickHouseInstallation manifest status, contains many fields like a normalized configuration, clickhouse-operator version, current action and all applied action list, current taskID and all applied taskIDs and other"
+ properties:
+ version:
+ type: string
+ description: "Version"
+ clusters:
+ type: integer
+ minimum: 0
+ description: "Clusters count"
+ shards:
+ type: integer
+ minimum: 0
+ description: "Shards count"
+ replicas:
+ type: integer
+ minimum: 0
+ description: "Replicas count"
+ hosts:
+ type: integer
+ minimum: 0
+ description: "Hosts count"
+ status:
+ type: string
+ description: "Status"
+ taskID:
+ type: string
+ description: "Current task id"
+ taskIDsStarted:
+ type: array
+ description: "Started task ids"
+ items:
+ type: string
+ taskIDsCompleted:
+ type: array
+ description: "Completed task ids"
+ items:
+ type: string
+ action:
+ type: string
+ description: "Action"
+ actions:
+ type: array
+ description: "Actions"
+ items:
+ type: string
+ error:
+ type: string
+ description: "Last error"
+ errors:
+ type: array
+ description: "Errors"
+ items:
+ type: string
+ updated:
+ type: integer
+ minimum: 0
+ description: "Updated Hosts count"
+ added:
+ type: integer
+ minimum: 0
+ description: "Added Hosts count"
+ deleted:
+ type: integer
+ minimum: 0
+ description: "Deleted Hosts count"
+ delete:
+ type: integer
+ minimum: 0
+ description: "About to delete Hosts count"
+ pods:
+ type: array
+ description: "Pods"
+ items:
+ type: string
+ fqdns:
+ type: array
+ description: "Pods FQDNs"
+ items:
+ type: string
+ endpoint:
+ type: string
+ description: "Endpoint"
+ generation:
+ type: integer
+ minimum: 0
+ description: "Generation"
+ normalized:
+ type: object
+ description: "Normalized CHI"
+ x-kubernetes-preserve-unknown-fields: true
spec:
type: object
+ # x-kubernetes-preserve-unknown-fields: true
description: |
Specification of the desired behavior of one or more ClickHouse clusters
More info: https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md"
properties:
taskID:
type: string
- description: Allow define custom taskID for named update and watch status of this update execution in .status.taskIDs field, by default every update of chi manifest will generate random taskID
+ description: "Allow define custom taskID for named update and watch status of this update execution in .status.taskIDs field, by default every update of chi manifest will generate random taskID"
+ # Need to be StringBool
stop:
type: string
description: |
@@ -107,6 +206,7 @@ spec:
- 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
enum:
+ # List StringBoolXXX constants from model
- ""
- "0"
- "1"
@@ -122,24 +222,26 @@ spec:
- "off"
- "On"
- "on"
- - Disable
- - disable
- - Enable
- - enable
- - Disabled
- - disabled
- - Enabled
- - enabled
+ - "Disable"
+ - "disable"
+ - "Enable"
+ - "enable"
+ - "Disabled"
+ - "disabled"
+ - "Enabled"
+ - "enabled"
restart:
type: string
- description: restart policy for StatefulSets. When value `RollingUpdate` it allow graceful restart one by one instead of restart all StatefulSet simultaneously
+ description: "restart policy for StatefulSets. When value `RollingUpdate` it allow graceful restart one by one instead of restart all StatefulSet simultaneously"
enum:
- ""
- - RollingUpdate
+ - "RollingUpdate"
+ # Need to be StringBool
troubleshoot:
type: string
- description: allows troubleshoot Pods during CrashLoopBack state, when you apply wrong configuration, `clickhouse-server` wouldn't startup
+ description: "allows troubleshoot Pods during CrashLoopBack state, when you apply wrong configuration, `clickhouse-server` wouldn't startup"
enum:
+ # List StringBoolXXX constants from model
- ""
- "0"
- "1"
@@ -155,30 +257,32 @@ spec:
- "off"
- "On"
- "on"
- - Disable
- - disable
- - Enable
- - enable
- - Disabled
- - disabled
- - Enabled
- - enabled
+ - "Disable"
+ - "disable"
+ - "Enable"
+ - "enable"
+ - "Disabled"
+ - "disabled"
+ - "Enabled"
+ - "enabled"
namespaceDomainPattern:
type: string
- description: 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
+ description: "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"
templating:
type: object
- description: optional, define policy for auto applying ClickHouseInstallationTemplate inside ClickHouseInstallation
+ # nullable: true
+ description: "optional, define policy for auto applying ClickHouseInstallationTemplate inside ClickHouseInstallation"
properties:
policy:
type: string
- description: when defined as `auto` inside ClickhouseInstallationTemplate, it will auto add into all ClickHouseInstallation, manual value is default
+ description: "when defined as `auto` inside ClickhouseInstallationTemplate, it will auto add into all ClickHouseInstallation, manual value is default"
enum:
- - auto
- - manual
+ - "auto"
+ - "manual"
reconciling:
type: object
- description: optional, allows tuning reconciling cycle for ClickhouseInstallation from clickhouse-operator side
+ description: "optional, allows tuning reconciling cycle for ClickhouseInstallation from clickhouse-operator side"
+ # nullable: true
properties:
policy:
type: string
@@ -191,76 +295,90 @@ spec:
maximum: 3600
cleanup:
type: object
- description: optional, define behavior for cleanup Kubernetes resources during reconcile cycle
+ description: "optional, define behavior for cleanup Kubernetes resources during reconcile cycle"
+ # nullable: true
properties:
unknownObjects:
type: object
- description: what clickhouse-operator shall do when found Kubernetes resources which should be managed with clickhouse-operator, but not have `ownerReference` to any currently managed `ClickHouseInstallation` resource, default behavior is `Delete`
+ description: "what clickhouse-operator shall do when found Kubernetes resources which should be managed with clickhouse-operator, but not have `ownerReference` to any currently managed `ClickHouseInstallation` resource, default behavior is `Delete`"
+ # nullable: true
properties:
statefulSet:
type: string
- description: behavior policy for unknown StatefulSet, Delete by default
+ description: "behavior policy for unknown StatefulSet, Delete by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
pvc:
type: string
- description: behavior policy for unknown PVC, Delete by default
+ description: "behavior policy for unknown PVC, Delete by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
configMap:
type: string
- description: behavior policy for unknown ConfigMap, Delete by default
+ description: "behavior policy for unknown ConfigMap, Delete by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
service:
type: string
- description: behavior policy for unknown Service, Delete by default
+ description: "behavior policy for unknown Service, Delete by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
reconcileFailedObjects:
type: object
- description: what clickhouse-operator shall do when reconciling Kubernetes resources are failed, default behavior is `Retain`
+ description: "what clickhouse-operator shall do when reconciling Kubernetes resources are failed, default behavior is `Retain`"
+ # nullable: true
properties:
statefulSet:
type: string
- description: behavior policy for failed StatefulSet reconciling, Retain by default
+ description: "behavior policy for failed StatefulSet reconciling, Retain by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
pvc:
type: string
- description: behavior policy for failed PVC reconciling, Retain by default
+ description: "behavior policy for failed PVC reconciling, Retain by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
configMap:
type: string
- description: behavior policy for failed ConfigMap reconciling, Retain by default
+ description: "behavior policy for failed ConfigMap reconciling, Retain by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
service:
type: string
- description: behavior policy for failed Service reconciling, Retain by default
+ description: "behavior policy for failed Service reconciling, Retain by default"
enum:
- - Retain
- - Delete
+ # List ObjectsCleanupXXX constants from model
+ - "Retain"
+ - "Delete"
defaults:
type: object
description: |
define default behavior for whole ClickHouseInstallation, some behavior can be re-define on cluster, shard and replica level
More info: https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#specdefaults
+ # nullable: true
properties:
+ # Need to be StringBool
replicasUseFQDN:
type: string
description: |
define should replicas be specified by FQDN in ``, then "no" then will use short hostname and clickhouse-server will use kubernetes default suffixes for properly DNS lookup
"yes" by default
enum:
+ # List StringBoolXXX constants from model
- ""
- "0"
- "1"
@@ -276,57 +394,60 @@ spec:
- "off"
- "On"
- "on"
- - Disable
- - disable
- - Enable
- - enable
- - Disabled
- - disabled
- - Enabled
- - enabled
+ - "Disable"
+ - "disable"
+ - "Enable"
+ - "enable"
+ - "Disabled"
+ - "disabled"
+ - "Enabled"
+ - "enabled"
distributedDDL:
type: object
description: |
allows change `` settings
More info: https://clickhouse.tech/docs/en/operations/server-configuration-parameters/settings/#server-settings-distributed_ddl
+ # nullable: true
properties:
profile:
type: string
- description: Settings from this profile will be used to execute DDL queries
+ description: "Settings from this profile will be used to execute DDL queries"
templates:
type: object
- description: optional, configuration of the templates names which will use for generate Kubernetes resources according to one or more ClickHouse clusters described in current ClickHouseInstallation (chi) resource
+ description: "optional, configuration of the templates names which will use for generate Kubernetes resources according to one or more ClickHouse clusters described in current ClickHouseInstallation (chi) resource"
+ # nullable: true
properties:
hostTemplate:
type: string
- description: 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`
+ description: "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`"
podTemplate:
type: string
- description: 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`
+ description: "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`"
dataVolumeClaimTemplate:
type: string
- description: 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`
+ description: "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`"
logVolumeClaimTemplate:
type: string
- description: 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`
+ description: "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`"
serviceTemplate:
type: string
- description: 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
+ description: "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"
clusterServiceTemplate:
type: string
- description: 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`
+ description: "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`"
shardServiceTemplate:
type: string
- description: 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`
+ description: "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`"
replicaServiceTemplate:
type: string
- description: 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`
+ description: "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`"
volumeClaimTemplate:
type: string
- description: DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate
+ description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
configuration:
type: object
- description: allows configure multiple aspects and behavior for `clickhouse-server` instance and also allows describe multiple `clickhouse-server` clusters inside one `chi` resource
+ description: "allows configure multiple aspects and behavior for `clickhouse-server` instance and also allows describe multiple `clickhouse-server` clusters inside one `chi` resource"
+ # nullable: true
properties:
zookeeper:
type: object
@@ -335,33 +456,37 @@ spec:
`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
+ # nullable: true
properties:
nodes:
type: array
- description: describe every available zookeeper cluster node for interaction
+ description: "describe every available zookeeper cluster node for interaction"
+ # nullable: true
items:
type: object
+ #required:
+ # - host
properties:
host:
type: string
- description: dns name or ip address for Zookeeper node
+ description: "dns name or ip address for Zookeeper node"
port:
type: integer
- description: TCP port which used to connect to Zookeeper node
+ description: "TCP port which used to connect to Zookeeper node"
minimum: 0
maximum: 65535
session_timeout_ms:
type: integer
- description: session timeout during connect to Zookeeper
+ description: "session timeout during connect to Zookeeper"
operation_timeout_ms:
type: integer
- description: one operation timeout during Zookeeper transactions
+ description: "one operation timeout during Zookeeper transactions"
root:
type: string
- description: optional root znode path inside zookeeper to store ClickHouse related data (replication queue or distributed DDL)
+ description: "optional root znode path inside zookeeper to store ClickHouse related data (replication queue or distributed DDL)"
identity:
type: string
- description: optional access credentials string with `user:password` format used when use digest authorization in Zookeeper
+ description: "optional access credentials string with `user:password` format used when use digest authorization in Zookeeper"
users:
type: object
description: |
@@ -369,6 +494,7 @@ spec:
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
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
profiles:
type: object
@@ -377,6 +503,7 @@ spec:
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
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
quotas:
type: object
@@ -385,6 +512,7 @@ spec:
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
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
settings:
type: object
@@ -392,6 +520,7 @@ spec:
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
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
@@ -402,6 +531,7 @@ spec:
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
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
clusters:
type: array
@@ -411,129 +541,144 @@ spec:
all Pods will rendered in 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
+ # nullable: true
items:
type: object
+ #required:
+ # - name
properties:
name:
type: string
- description: cluster name, used to identify set of ClickHouse servers and wide used during generate names of related Kubernetes resources
+ description: "cluster name, used to identify set of ClickHouse servers and wide used during generate names of related Kubernetes resources"
minLength: 1
+ # See namePartClusterMaxLen const
maxLength: 15
- pattern: ^[a-zA-Z0-9-]{0,15}$
+ pattern: "^[a-zA-Z0-9-]{0,15}$"
zookeeper:
type: object
description: |
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
+ # nullable: true
properties:
nodes:
type: array
- description: describe every available zookeeper cluster node for interaction
+ description: "describe every available zookeeper cluster node for interaction"
+ # nullable: true
items:
type: object
+ #required:
+ # - host
properties:
host:
type: string
- description: dns name or ip address for Zookeeper node
+ description: "dns name or ip address for Zookeeper node"
port:
type: integer
- description: TCP port which used to connect to Zookeeper node
+ description: "TCP port which used to connect to Zookeeper node"
minimum: 0
maximum: 65535
session_timeout_ms:
type: integer
- description: session timeout during connect to Zookeeper
+ description: "session timeout during connect to Zookeeper"
operation_timeout_ms:
type: integer
- description: one operation timeout during Zookeeper transactions
+ description: "one operation timeout during Zookeeper transactions"
root:
type: string
- description: optional root znode path inside zookeeper to store ClickHouse related data (replication queue or distributed DDL)
+ description: "optional root znode path inside zookeeper to store ClickHouse related data (replication queue or distributed DDL)"
identity:
type: string
- description: optional access credentials string with `user:password` format used when use digest authorization in Zookeeper
+ description: "optional access credentials string with `user:password` format used when use digest authorization in Zookeeper"
settings:
type: object
description: |
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/
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
description: |
optional, allows define content of any setting file inside each `Pod` on current cluster during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files`
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
templates:
type: object
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected cluster
override top-level `chi.spec.configuration.templates`
+ # nullable: true
properties:
hostTemplate:
type: string
- description: optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one cluster
+ description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one cluster"
podTemplate:
type: string
- description: 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` only for one cluster
+ description: "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` only for one cluster"
dataVolumeClaimTemplate:
type: string
- description: 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` only for one cluster
+ description: "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` only for one cluster"
logVolumeClaimTemplate:
type: string
- description: 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` only for one cluster
+ description: "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` only for one cluster"
serviceTemplate:
type: string
- description: optional, fully ignores for cluster-level
+ description: "optional, fully ignores for cluster-level"
clusterServiceTemplate:
type: string
- description: 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` only for one cluster
+ description: "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` only for one cluster"
shardServiceTemplate:
type: string
- description: 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` only for one cluster
+ description: "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` only for one cluster"
replicaServiceTemplate:
type: string
- description: 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` only for one cluster
+ description: "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` only for one cluster"
volumeClaimTemplate:
type: string
- description: DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate
+ description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
layout:
type: object
description: |
describe current cluster layout, how much shards in cluster, how much replica in shard
allows override settings on each shard and replica separatelly
+ # nullable: true
properties:
type:
type: string
- description: DEPRECATED - to be removed soon
+ description: "DEPRECATED - to be removed soon"
shardsCount:
type: integer
- description: 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
+ description: "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"
replicasCount:
type: integer
- description: 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
+ description: "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"
shards:
type: array
- description: optional, allows override top-level `chi.spec.configuration`, cluster-level `chi.spec.configuration.clusters` settings for each shard separately, use it only if you fully understand what you do
+ description: "optional, allows override top-level `chi.spec.configuration`, cluster-level `chi.spec.configuration.clusters` settings for each shard separately, use it only if you fully understand what you do"
+ # nullable: true
items:
type: object
properties:
name:
type: string
- description: optional, by default shard name is generated, but you can override it and setup custom name
+ description: "optional, by default shard name is generated, but you can override it and setup custom name"
minLength: 1
+ # See namePartShardMaxLen const
maxLength: 15
- pattern: ^[a-zA-Z0-9-]{0,15}$
+ pattern: "^[a-zA-Z0-9-]{0,15}$"
definitionType:
type: string
- description: DEPRECATED - to be removed soon
+ description: "DEPRECATED - to be removed soon"
weight:
type: integer
description: |
optional, 1 by default, allows setup shard setting which will use during insert into tables with `Distributed` engine,
will apply in 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/
+ # Need to be StringBool
internalReplication:
type: string
description: |
@@ -542,6 +687,7 @@ spec:
will apply in 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/
enum:
+ # List StringBoolXXX constants from model
- ""
- "0"
- "1"
@@ -557,16 +703,17 @@ spec:
- "off"
- "On"
- "on"
- - Disable
- - disable
- - Enable
- - enable
- - Disabled
- - disabled
- - Enabled
- - enabled
+ - "Disable"
+ - "disable"
+ - "Enable"
+ - "enable"
+ - "Disabled"
+ - "disabled"
+ - "Enabled"
+ - "enabled"
settings:
type: object
+ # nullable: true
description: |
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`
@@ -574,6 +721,7 @@ spec:
x-kubernetes-preserve-unknown-fields: true
files:
type: object
+ # nullable: true
description: |
optional, allows define content of any setting file inside each `Pod` only in one shard during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files` and cluster-level `chi.spec.configuration.clusters.files`
@@ -583,34 +731,35 @@ spec:
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected shard
override top-level `chi.spec.configuration.templates` and cluster-level `chi.spec.configuration.clusters.templates`
+ # nullable: true
properties:
hostTemplate:
type: string
- description: optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one shard
+ description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one shard"
podTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
dataVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
logVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
serviceTemplate:
type: string
- description: optional, fully ignores for shard-level
+ description: "optional, fully ignores for shard-level"
clusterServiceTemplate:
type: string
- description: optional, fully ignores for shard-level
+ description: "optional, fully ignores for shard-level"
shardServiceTemplate:
type: string
- description: optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover shard inside clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard
+ description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover shard inside clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard"
replicaServiceTemplate:
type: string
- description: 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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard
+ description: "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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard"
volumeClaimTemplate:
type: string
- description: DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate
+ description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
replicasCount:
type: integer
description: |
@@ -622,15 +771,18 @@ spec:
type: array
description: |
optional, allows override behavior for selected replicas from cluster-level `chi.spec.configuration.clusters` and shard-level `chi.spec.configuration.clusters.layout.shards`
+ # nullable: true
items:
+ # Host
type: object
properties:
name:
type: string
- description: optional, by default replica name is generated, but you can override it and setup custom name
+ description: "optional, by default replica name is generated, but you can override it and setup custom name"
minLength: 1
+ # See namePartReplicaMaxLen const
maxLength: 15
- pattern: ^[a-zA-Z0-9-]{0,15}$
+ pattern: "^[a-zA-Z0-9-]{0,15}$"
tcpPort:
type: integer
description: |
@@ -654,6 +806,7 @@ spec:
maximum: 65535
settings:
type: object
+ # nullable: true
description: |
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`
@@ -661,6 +814,7 @@ spec:
x-kubernetes-preserve-unknown-fields: true
files:
type: object
+ # nullable: true
description: |
optional, allows define content of any setting file inside `Pod` only in one replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files`, cluster-level `chi.spec.configuration.clusters.files` and shard-level `chi.spec.configuration.clusters.layout.shards.files`
@@ -670,55 +824,60 @@ spec:
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected replica
override top-level `chi.spec.configuration.templates`, cluster-level `chi.spec.configuration.clusters.templates` and shard-level `chi.spec.configuration.clusters.layout.shards.templates`
+ # nullable: true
properties:
hostTemplate:
type: string
- description: optional, template name from chi.spec.templates.hostTemplates, which will apply to configure `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one replica
+ description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one replica"
podTemplate:
type: string
- description: 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` only for one replica
+ description: "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` only for one replica"
dataVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
logVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
serviceTemplate:
type: string
- description: optional, fully ignores for replica-level
+ description: "optional, fully ignores for replica-level"
clusterServiceTemplate:
type: string
- description: optional, fully ignores for replica-level
+ description: "optional, fully ignores for replica-level"
shardServiceTemplate:
type: string
- description: optional, fully ignores for replica-level
+ description: "optional, fully ignores for replica-level"
replicaServiceTemplate:
type: string
- description: 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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one replica
+ description: "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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one replica"
volumeClaimTemplate:
type: string
- description: DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate
+ description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
replicas:
type: array
- description: optional, allows override top-level `chi.spec.configuration` and cluster-level `chi.spec.configuration.clusters` configuration for each replica and each shard relates to selected replica, use it only if you fully understand what you do
+ description: "optional, allows override top-level `chi.spec.configuration` and cluster-level `chi.spec.configuration.clusters` configuration for each replica and each shard relates to selected replica, use it only if you fully understand what you do"
+ # nullable: true
items:
type: object
properties:
name:
type: string
- description: optional, by default replica name is generated, but you can override it and setup custom name
+ description: "optional, by default replica name is generated, but you can override it and setup custom name"
minLength: 1
+ # See namePartShardMaxLen const
maxLength: 15
- pattern: ^[a-zA-Z0-9-]{0,15}$
+ pattern: "^[a-zA-Z0-9-]{0,15}$"
settings:
type: object
description: |
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/
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
+ # nullable: true
description: |
optional, allows define content of any setting file inside each `Pod` only in one replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files` and cluster-level `chi.spec.configuration.clusters.files`, will ignore if `chi.spec.configuration.clusters.layout.shards` presents
@@ -728,50 +887,54 @@ spec:
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected replica
override top-level `chi.spec.configuration.templates`, cluster-level `chi.spec.configuration.clusters.templates`
+ # nullable: true
properties:
hostTemplate:
type: string
- description: optional, template name from chi.spec.templates.hostTemplates, which will apply to configure `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one replica
+ description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one replica"
podTemplate:
type: string
- description: 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` only for one replica
+ description: "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` only for one replica"
dataVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
logVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
serviceTemplate:
type: string
- description: optional, fully ignores for replica-level
+ description: "optional, fully ignores for replica-level"
clusterServiceTemplate:
type: string
- description: optional, fully ignores for replica-level
+ description: "optional, fully ignores for replica-level"
shardServiceTemplate:
type: string
- description: optional, fully ignores for replica-level
+ description: "optional, fully ignores for replica-level"
replicaServiceTemplate:
type: string
- description: 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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one replica
+ description: "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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one replica"
volumeClaimTemplate:
type: string
- description: DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate
+ description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
shardsCount:
type: integer
- description: optional, count of shards related to current replica, you can override each shard behavior on low-level `chi.spec.configuration.clusters.layout.replicas.shards`
+ description: "optional, count of shards related to current replica, you can override each shard behavior on low-level `chi.spec.configuration.clusters.layout.replicas.shards`"
minimum: 1
shards:
type: array
- description: optional, list of shards related to current replica, will ignore if `chi.spec.configuration.clusters.layout.shards` presents
+ description: "optional, list of shards related to current replica, will ignore if `chi.spec.configuration.clusters.layout.shards` presents"
+ # nullable: true
items:
+ # Host
type: object
properties:
name:
type: string
- description: optional, by default shard name is generated, but you can override it and setup custom name
+ description: "optional, by default shard name is generated, but you can override it and setup custom name"
minLength: 1
+ # See namePartReplicaMaxLen const
maxLength: 15
- pattern: ^[a-zA-Z0-9-]{0,15}$
+ pattern: "^[a-zA-Z0-9-]{0,15}$"
tcpPort:
type: integer
description: |
@@ -799,81 +962,94 @@ spec:
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/
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
description: |
optional, allows define content of any setting file inside each `Pod` only in one shard related to current replica during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
override top-level `chi.spec.configuration.files` and cluster-level `chi.spec.configuration.clusters.files`, will ignore if `chi.spec.configuration.clusters.layout.shards` presents
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
templates:
type: object
description: |
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected replica
override top-level `chi.spec.configuration.templates`, cluster-level `chi.spec.configuration.clusters.templates`, replica-level `chi.spec.configuration.clusters.layout.replicas.templates`
+ # nullable: true
properties:
hostTemplate:
type: string
- description: optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one shard
+ description: "optional, template name from chi.spec.templates.hostTemplates, which will apply to configure each `clickhouse-server` instance during render ConfigMap resources which will mount into `Pod` only for one shard"
podTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
dataVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
logVolumeClaimTemplate:
type: string
- description: 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` only for one shard
+ description: "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` only for one shard"
serviceTemplate:
type: string
- description: optional, fully ignores for shard-level
+ description: "optional, fully ignores for shard-level"
clusterServiceTemplate:
type: string
- description: optional, fully ignores for shard-level
+ description: "optional, fully ignores for shard-level"
shardServiceTemplate:
type: string
- description: optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover shard inside clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard
+ description: "optional, template name from chi.spec.templates.serviceTemplates, allows customization for each `Service` resource which will created by `clickhouse-operator` which cover shard inside clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard"
replicaServiceTemplate:
type: string
- description: 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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard
+ description: "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 clickhouse cluster described in `chi.spec.configuration.clusters` only for one shard"
volumeClaimTemplate:
type: string
- description: DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate
+ description: "DEPRECATED! VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate"
templates:
type: object
- description: allows define templates which will use for render Kubernetes resources like StatefulSet, ConfigMap, Service, PVC, by default, clickhouse-operator have own templates, but you can override it
+ description: "allows define templates which will use for render Kubernetes resources like StatefulSet, ConfigMap, Service, PVC, by default, clickhouse-operator have own templates, but you can override it"
+ # nullable: true
properties:
hostTemplates:
type: array
- description: hostTemplate will use during apply to generate `clickhose-server` config files
+ description: "hostTemplate will use during apply to generate `clickhose-server` config files"
+ # nullable: true
items:
type: object
+ #required:
+ # - name
properties:
name:
- description: 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`
+ description: "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`"
type: string
portDistribution:
type: array
- description: define how will distribute numeric values of named ports in `Pod.spec.containers.ports` and clickhouse-server configs
+ description: "define how will distribute numeric values of named ports in `Pod.spec.containers.ports` and clickhouse-server configs"
+ # nullable: true
items:
type: object
+ #required:
+ # - type
properties:
type:
type: string
- description: 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
+ description: "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"
enum:
+ # List PortDistributionXXX constants
- ""
- - Unspecified
- - ClusterScopeIndex
+ - "Unspecified"
+ - "ClusterScopeIndex"
spec:
+ # Host
type: object
properties:
name:
type: string
- description: by default, hostname will generate, but this allows define custom name for each `clickhuse-server`
+ description: "by default, hostname will generate, but this allows define custom name for each `clickhuse-server`"
minLength: 1
+ # See namePartReplicaMaxLen const
maxLength: 15
- pattern: ^[a-zA-Z0-9-]{0,15}$
+ pattern: "^[a-zA-Z0-9-]{0,15}$"
tcpPort:
type: integer
description: |
@@ -903,15 +1079,18 @@ spec:
description: |
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/
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
files:
type: object
description: |
optional, allows define content of any setting file inside each `Pod` where this template will apply during generate `ConfigMap` which will mount in `/etc/clickhouse-server/config.d/` or `/etc/clickhouse-server/conf.d/` or `/etc/clickhouse-server/users.d/`
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
templates:
type: object
- description: be carefull, this part of CRD allows override template inside template, don't use it if you don't understand what you do
+ description: "be carefull, this part of CRD allows override template inside template, don't use it if you don't understand what you do"
+ # nullable: true
properties:
hostTemplate:
type: string
@@ -934,94 +1113,112 @@ spec:
description: |
podTemplate will use during render `Pod` inside `StatefulSet.spec` and allows define rendered `Pod.spec`, pod scheduling distribution and pod zone
More information: https://github.com/Altinity/clickhouse-operator/blob/master/docs/custom_resource_explained.md#spectemplatespodtemplates
+ # nullable: true
items:
type: object
+ #required:
+ # - name
properties:
name:
type: string
- description: 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`
+ description: "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`"
generateName:
type: string
- description: 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
+ description: "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"
zone:
type: object
- description: allows define custom zone name and will separate ClickHouse `Pods` between nodes, shortcut for `chi.spec.templates.podTemplates.spec.affinity.podAntiAffinity`
+ description: "allows define custom zone name and will separate ClickHouse `Pods` between nodes, shortcut for `chi.spec.templates.podTemplates.spec.affinity.podAntiAffinity`"
+ #required:
+ # - values
properties:
key:
type: string
- description: optional, if defined, allows select kubernetes nodes by label with `name` equal `key`
+ description: "optional, if defined, allows select kubernetes nodes by label with `name` equal `key`"
values:
type: array
- description: optional, if defined, allows select kubernetes nodes by label with `value` in `values`
+ description: "optional, if defined, allows select kubernetes nodes by label with `value` in `values`"
+ # nullable: true
items:
type: string
distribution:
type: string
- description: DEPRECATED, shortcut for `chi.spec.templates.podTemplates.spec.affinity.podAntiAffinity`
+ description: "DEPRECATED, shortcut for `chi.spec.templates.podTemplates.spec.affinity.podAntiAffinity`"
enum:
- ""
- - Unspecified
- - OnePerHost
+ - "Unspecified"
+ - "OnePerHost"
podDistribution:
type: array
- description: define ClickHouse Pod distibution policy between Kubernetes Nodes inside Shard, Replica, Namespace, CHI, another ClickHouse cluster
+ description: "define ClickHouse Pod distibution policy between Kubernetes Nodes inside Shard, Replica, Namespace, CHI, another ClickHouse cluster"
+ # nullable: true
items:
type: object
+ #required:
+ # - type
properties:
type:
type: string
- description: you can define multiple affinity policy types
+ description: "you can define multiple affinity policy types"
enum:
+ # List PodDistributionXXX constants
- ""
- - Unspecified
- - ClickHouseAntiAffinity
- - ShardAntiAffinity
- - ReplicaAntiAffinity
- - AnotherNamespaceAntiAffinity
- - AnotherClickHouseInstallationAntiAffinity
- - AnotherClusterAntiAffinity
- - MaxNumberPerNode
- - NamespaceAffinity
- - ClickHouseInstallationAffinity
- - ClusterAffinity
- - ShardAffinity
- - ReplicaAffinity
- - PreviousTailAffinity
- - CircularReplication
+ - "Unspecified"
+ - "ClickHouseAntiAffinity"
+ - "ShardAntiAffinity"
+ - "ReplicaAntiAffinity"
+ - "AnotherNamespaceAntiAffinity"
+ - "AnotherClickHouseInstallationAntiAffinity"
+ - "AnotherClusterAntiAffinity"
+ - "MaxNumberPerNode"
+ - "NamespaceAffinity"
+ - "ClickHouseInstallationAffinity"
+ - "ClusterAffinity"
+ - "ShardAffinity"
+ - "ReplicaAffinity"
+ - "PreviousTailAffinity"
+ - "CircularReplication"
scope:
type: string
- description: scope for apply each podDistribution
+ description: "scope for apply each podDistribution"
enum:
+ # list PodDistributionScopeXXX constants
- ""
- - Unspecified
- - Shard
- - Replica
- - Cluster
- - ClickHouseInstallation
- - Namespace
+ - "Unspecified"
+ - "Shard"
+ - "Replica"
+ - "Cluster"
+ - "ClickHouseInstallation"
+ - "Namespace"
number:
type: integer
- description: define, how much ClickHouse Pods could be inside selected scope with selected distribution type
+ description: "define, how much ClickHouse Pods could be inside selected scope with selected distribution type"
minimum: 0
maximum: 65535
topologyKey:
type: string
- description: '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'
+ description: "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:
+ # TODO specify PodSpec
type: object
- description: allows define whole Pod.spec inside StaefulSet.spec, look to https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates for details
+ description: "allows define whole Pod.spec inside StaefulSet.spec, look to https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates for details"
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
metadata:
type: object
description: |
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
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
volumeClaimTemplates:
type: array
- description: allows define template for rendering `PVC` kubernetes resource, which would use inside `Pod` for mount clickhouse `data`, clickhouse `logs` or something else
+ description: "allows define template for rendering `PVC` kubernetes resource, which would use inside `Pod` for mount clickhouse `data`, clickhouse `logs` or something else"
+ # nullable: true
items:
type: object
+ #required:
+ # - name
+ # - spec
properties:
name:
description: |
@@ -1033,29 +1230,35 @@ spec:
type: string
reclaimPolicy:
type: string
- description: define behavior of `PVC` deletion policy during delete `Pod`, `Delete` by default, when `Retain` then `PVC` still alive even `Pod` will deleted
+ description: "define behavior of `PVC` deletion policy during delete `Pod`, `Delete` by default, when `Retain` then `PVC` still alive even `Pod` will deleted"
enum:
- ""
- - Retain
- - Delete
+ - "Retain"
+ - "Delete"
metadata:
type: object
description: |
allows pass standard object's metadata from template to PVC
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
spec:
type: object
description: |
allows define all aspects of `PVC` resource
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
serviceTemplates:
type: array
description: |
allows define template for rendering `Service` which would get endpoint from Pods which scoped chi-wide, cluster-wide, shard-wide, replica-wide level
+ # nullable: true
items:
type: object
+ #required:
+ # - name
+ # - spec
properties:
name:
type: string
@@ -1067,35 +1270,43 @@ spec:
replica-level `chi.spec.configuration.clusters.layout.replicas.templates.replicaServiceTemplate` or `chi.spec.configuration.clusters.layout.shards.replicas.replicaServiceTemplate`
generateName:
type: string
- description: 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
+ description: "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"
metadata:
+ # TODO specify ObjectMeta
type: object
description: |
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/
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
spec:
+ # TODO specify ServiceSpec
type: object
description: |
describe behavior of generated Service
More info: https://kubernetes.io/docs/concepts/services-networking/service/
+ # nullable: true
x-kubernetes-preserve-unknown-fields: true
useTemplates:
type: array
- description: list of `ClickHouseInstallationTemplate` (chit) resource names which will merge with current `Chi` manifest during render Kubernetes resources to create related ClickHouse clusters
+ description: "list of `ClickHouseInstallationTemplate` (chit) resource names which will merge with current `Chi` manifest during render Kubernetes resources to create related ClickHouse clusters"
+ # nullable: true
items:
type: object
+ #required:
+ # - name
properties:
name:
type: string
- description: name of `ClickHouseInstallationTemplate` (chit) resource
+ description: "name of `ClickHouseInstallationTemplate` (chit) resource"
namespace:
type: string
- description: Kubernetes namespace where need search `chit` resource, depending on `watchNamespaces` settings in `clichouse-operator`
+ description: "Kubernetes namespace where need search `chit` resource, depending on `watchNamespaces` settings in `clichouse-operator`"
useType:
type: string
- description: optional, current strategy is only merge, and current `chi` settings have more priority than merged template `chit`
+ description: "optional, current strategy is only merge, and current `chi` settings have more priority than merged template `chit`"
enum:
+ # List useTypeXXX constants from model
- ""
- - merge
+ - "merge"
diff --git a/charts/altinity-clickhouse-operator/crds/CustomResourceDefinition-clickhouseoperatorconfigurations.clickhouse.altinity.com.yaml b/charts/altinity-clickhouse-operator/crds/CustomResourceDefinition-clickhouseoperatorconfigurations.clickhouse.altinity.com.yaml
index 95e8815..b1dc2a9 100644
--- a/charts/altinity-clickhouse-operator/crds/CustomResourceDefinition-clickhouseoperatorconfigurations.clickhouse.altinity.com.yaml
+++ b/charts/altinity-clickhouse-operator/crds/CustomResourceDefinition-clickhouseoperatorconfigurations.clickhouse.altinity.com.yaml
@@ -1,3 +1,7 @@
+# Template Parameters:
+#
+# NONE
+#
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
@@ -19,12 +23,12 @@ spec:
- name: namespaces
type: string
description: Watch namespaces
- priority: 0
+ priority: 0 # show in standard view
jsonPath: .status
schema:
openAPIV3Schema:
type: object
- description: allows customize `clickhouse-operator` settings, need restart clickhouse-operator pod after adding, more details https://github.com/Altinity/clickhouse-operator/blob/master/docs/operator_configuration.md
+ description: "allows customize `clickhouse-operator` settings, need restart clickhouse-operator pod after adding, more details https://github.com/Altinity/clickhouse-operator/blob/master/docs/operator_configuration.md"
x-kubernetes-preserve-unknown-fields: true
properties:
status:
@@ -40,27 +44,27 @@ spec:
properties:
watchNamespaces:
type: array
- description: List of namespaces where clickhouse-operator watches for events.
+ description: "List of namespaces where clickhouse-operator watches for events."
items:
type: string
chCommonConfigsPath:
type: string
- description: Path to folder where ClickHouse configuration files common for all instances within CHI are located. Default - config.d
+ description: "Path to folder where ClickHouse configuration files common for all instances within CHI are located. Default - config.d"
chHostConfigsPath:
type: string
- description: Path to folder where ClickHouse configuration files unique for each instance (host) within CHI are located. Default - conf.d
+ description: "Path to folder where ClickHouse configuration files unique for each instance (host) within CHI are located. Default - conf.d"
chUsersConfigsPath:
type: string
- description: Path to folder where ClickHouse configuration files with users settings are located. Files are common for all instances within CHI
+ description: "Path to folder where ClickHouse configuration files with users settings are located. Files are common for all instances within CHI"
chiTemplatesPath:
type: string
- description: Path to folder where ClickHouseInstallation .yaml manifests are located.
+ description: "Path to folder where ClickHouseInstallation .yaml manifests are located."
statefulSetUpdateTimeout:
type: integer
- description: How many seconds to wait for created/updated StatefulSet to be Ready
+ description: "How many seconds to wait for created/updated StatefulSet to be Ready"
statefulSetUpdatePollPeriod:
type: integer
- description: How many seconds to wait between checks for created/updated StatefulSet status
+ description: "How many seconds to wait between checks for created/updated StatefulSet status"
onStatefulSetCreateFailureAction:
type: string
description: |
@@ -79,47 +83,47 @@ spec:
3. ignore - ignore error, pretend nothing happened and move on to the next StatefulSet.
chConfigUserDefaultProfile:
type: string
- description: ClickHouse server configuration `...` for any
+ description: "ClickHouse server configuration `...` for any "
chConfigUserDefaultQuota:
type: string
- description: ClickHouse server configuration `...` for any
+ description: "ClickHouse server configuration `...` for any "
chConfigUserDefaultNetworksIP:
type: array
- description: ClickHouse server configuration `...` for any
+ description: "ClickHouse server configuration `...` for any "
items:
type: string
chConfigUserDefaultPassword:
- description: ClickHouse server configuration `...` for any
+ description: "ClickHouse server configuration `...` for any "
type: string
chConfigNetworksHostRegexpTemplate:
- description: ClickHouse server configuration `...` for any
+ description: "ClickHouse server configuration `...` for any "
type: string
chUsername:
type: string
- description: ClickHouse username to be used by operator to connect to ClickHouse instances, deprecated, use chCredentialsSecretName
+ description: "ClickHouse username to be used by operator to connect to ClickHouse instances, deprecated, use chCredentialsSecretName"
chPassword:
type: string
- description: ClickHouse password to be used by operator to connect to ClickHouse instances, deprecated, use chCredentialsSecretName
+ description: "ClickHouse password to be used by operator to connect to ClickHouse instances, deprecated, use chCredentialsSecretName"
chCredentialsSecretNamespace:
type: string
- description: Location of k8s Secret with username and password to be used by operator to connect to ClickHouse instances
+ description: "Location of k8s Secret with username and password to be used by operator to connect to ClickHouse instances"
chCredentialsSecretName:
type: string
- description: Name of k8s Secret with username and password to be used by operator to connect to ClickHouse instances
+ description: "Name of k8s Secret with username and password to be used by operator to connect to ClickHouse instances"
chPort:
type: integer
minimum: 1
maximum: 65535
- description: Name of k8s Secret with username and password to be used by operator to connect to ClickHouse instances
+ description: "Name of k8s Secret with username and password to be used by operator to connect to ClickHouse instances"
logtostderr:
type: string
- description: boolean, allows logs to stderr
+ description: "boolean, allows logs to stderr"
alsologtostderr:
type: string
- description: booleanm allows logs to stderr and files both
+ description: "boolean allows logs to stderr and files both"
v:
type: string
- description: verbosity level of clickhouse-operator log, default - 1 max - 9
+ description: "verbosity level of clickhouse-operator log, default - 1 max - 9"
stderrthreshold:
type: string
vmodule:
@@ -128,7 +132,7 @@ spec:
type: string
reconcileThreadsNumber:
type: integer
- description: how much goroutines will use to reconcile in parallel, 10 by default
+ description: "how much goroutines will use to reconcile in parallel, 10 by default"
minimum: 1
maximum: 65535
reconcileWaitExclude:
@@ -144,8 +148,9 @@ spec:
type: string
appendScopeLabels:
type: string
- description: Whether to append *Scope* labels to StatefulSet and Pod
+ description: "Whether to append *Scope* labels to StatefulSet and Pod"
enum:
+ # List StringBoolXXX constants from model
- ""
- "0"
- "1"
@@ -161,21 +166,21 @@ spec:
- "off"
- "On"
- "on"
- - Disable
- - disable
- - Enable
- - enable
- - Disabled
- - disabled
- - Enabled
- - enabled
- - LabelShardScopeIndex
- - LabelReplicaScopeIndex
- - LabelCHIScopeIndex
- - LabelCHIScopeCycleSize
- - LabelCHIScopeCycleIndex
- - LabelCHIScopeCycleOffset
- - LabelClusterScopeIndex
- - LabelClusterScopeCycleSize
- - LabelClusterScopeCycleIndex
- - LabelClusterScopeCycleOffset
+ - "Disable"
+ - "disable"
+ - "Enable"
+ - "enable"
+ - "Disabled"
+ - "disabled"
+ - "Enabled"
+ - "enabled"
+ - "LabelShardScopeIndex"
+ - "LabelReplicaScopeIndex"
+ - "LabelCHIScopeIndex"
+ - "LabelCHIScopeCycleSize"
+ - "LabelCHIScopeCycleIndex"
+ - "LabelCHIScopeCycleOffset"
+ - "LabelClusterScopeIndex"
+ - "LabelClusterScopeCycleSize"
+ - "LabelClusterScopeCycleIndex"
+ - "LabelClusterScopeCycleOffset"
diff --git a/charts/altinity-clickhouse-operator/hacks/sync-yamls.sh b/charts/altinity-clickhouse-operator/hacks/sync-yamls.sh
index 243759b..12b38d3 100755
--- a/charts/altinity-clickhouse-operator/hacks/sync-yamls.sh
+++ b/charts/altinity-clickhouse-operator/hacks/sync-yamls.sh
@@ -1,64 +1,58 @@
-#!/bin/bash
+#!/usr/bin/env bash
+
+#
+# Script downloads manifest from altinity repo, splits it to separate files
+# and puts to the corresponding folders
+# NOTE: yq ( https://mikefarah.gitbook.io/yq/ ) > v4.14.x is required
+#
+# Usage: ./sync.sh
+#
set -o errexit
set -o nounset
+set -o pipefail
-CHART_PATH=../
-BUILD_PATH="${CHART_PATH}/../../build"
-
-APP_VERSION=$(cat "${CHART_PATH}/Chart.yaml" | grep appVersion | cut -d : -f 2 | xargs)
-
-if [ "${APP_VERSION}" = "latest" ]; then
- APP_VERSION="master"
-fi
-
-REPO_URL="https://raw.githubusercontent.com/Altinity/clickhouse-operator/${APP_VERSION}/deploy/operator"
-
-function extract_resources() {
- local url=$1
- local dest=$2
+readonly repo_url="https://raw.githubusercontent.com/Altinity/clickhouse-operator"
+readonly crds_dir="../crds"
+readonly templates_dir="../templates/generated"
+readonly manifest_path="deploy/operator/clickhouse-operator-install-bundle.yaml"
+readonly chart_def="../Chart.yaml"
- local resources
- resources=$(curl -s "${url}" | yq e -j -N | jq . -c)
+function main() {
+ readonly manifest_url="${repo_url}/$(detect_version)/${manifest_path}"
+ local tmpdir
+ tmpdir=$(mktemp -d)
- OLDIFS=$IFS
- IFS=$'\n'
- for r in ${resources}; do
- local kind
- kind=$(echo "${r}" | jq .kind -r)
+ # shellcheck disable=SC2016
+ (cd "${tmpdir}" && curl -s "${manifest_url}" 2>&1 | yq e --no-doc -s '$index')
- local name
- name=$(echo "${r}" | jq .metadata.name -r)
-
- echo "${r}" | yq e -P - >"${dest}/${kind}-${name}.yaml"
+ for f in "${tmpdir}"/*.yml; do
+ process "${f}"
done
- IFS=$OLDIFS
}
-rm -rf "${CHART_PATH}/crds" "${CHART_PATH}/templates/generated"
-mkdir "${CHART_PATH}/crds" "${CHART_PATH}/templates/generated"
+function process() {
+ local file="${1}"
-extract_resources "${REPO_URL}/clickhouse-operator-install-crd.yaml" "${CHART_PATH}/crds"
-extract_resources "${REPO_URL}/clickhouse-operator-install-deployment.yaml" "${CHART_PATH}/templates/generated"
-extract_resources "${REPO_URL}/clickhouse-operator-install-service.yaml" "${CHART_PATH}/templates/generated"
+ local kind
+ kind=$(yq e '.kind' "${file}")
-exit 1
+ local name
+ name=$(yq e '.metadata.name' "${file}")
-wget -O ${BUILD_PATH}/repo.zip ${REPO_URL}
-unzip -n "${BUILD_PATH}/repo.zip" -d ${BUILD_PATH}
-rm "${BUILD_PATH}/repo.zip"
+ local processed_file="${kind}-${name}.yaml"
-REPO_PATH="${BUILD_PATH}/external-secrets-operator-${APP_VERSION}"
+ if [[ "${kind}" == "CustomResourceDefinition" ]]; then
+ processed_file="${crds_dir}/${processed_file}"
+ else
+ processed_file="${templates_dir}/${processed_file}"
+ fi
-cp -R "${REPO_PATH}/config/samples/" "${CHART_PATH}/examples/"
+ mv "${file}" "${processed_file}"
+}
-rm -rf xx* && csplit -s -k ${REPO_PATH}/k8s/k8s.yaml '/^---/' '{99}' || true
+function detect_version() {
+ yq e '.appVersion' ${chart_def}
+}
-for f in xx*; do
- name="$(yq r "${f}" 'kind' | tr '[:upper:]' '[:lower:]')-$(yq r "${f}" 'metadata.name' | tr '[:upper:]' '[:lower:]')"
- if [[ "${name}" == "namespace"* ]]; then
- rm "${f}"
- continue
- fi
- mv "${f}" "${CHART_PATH}/templates/${name}.yaml"
-done
+main
diff --git a/charts/altinity-clickhouse-operator/templates/generated/ClusterRole-clickhouse-operator-kube-system.yaml b/charts/altinity-clickhouse-operator/templates/generated/ClusterRole-clickhouse-operator-kube-system.yaml
new file mode 100644
index 0000000..8fae5bd
--- /dev/null
+++ b/charts/altinity-clickhouse-operator/templates/generated/ClusterRole-clickhouse-operator-kube-system.yaml
@@ -0,0 +1,154 @@
+# Template Parameters:
+#
+# NAMESPACE=kube-system
+# COMMENT=#
+# ROLE_KIND=ClusterRole
+# ROLE_NAME=clickhouse-operator-kube-system
+# ROLE_BINDING_KIND=ClusterRoleBinding
+# ROLE_BINDING_NAME=clickhouse-operator-kube-system
+#
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: {{ include "altinity-clickhouse-operator.fullname" . }}
+ namespace: {{ .Release.Namespace }}
+rules:
+ - apiGroups:
+ - ""
+ resources:
+ - configmaps
+ - services
+ verbs:
+ - create
+ - delete
+ - get
+ - patch
+ - update
+ - list
+ - watch
+ - apiGroups:
+ - ""
+ resources:
+ - endpoints
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - ""
+ resources:
+ - events
+ verbs:
+ - create
+ - apiGroups:
+ - ""
+ resources:
+ - persistentvolumeclaims
+ verbs:
+ - delete
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - apiGroups:
+ - ""
+ resources:
+ - persistentvolumes
+ - pods
+ verbs:
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - apiGroups:
+ - apps
+ resources:
+ - statefulsets
+ verbs:
+ - create
+ - delete
+ - get
+ - patch
+ - update
+ - list
+ - watch
+ - apiGroups:
+ - apps
+ resources:
+ - replicasets
+ verbs:
+ - delete
+ - get
+ - patch
+ - update
+ - apiGroups:
+ - apps
+ resourceNames:
+ - clickhouse-operator
+ resources:
+ - deployments
+ verbs:
+ - get
+ - patch
+ - update
+ - delete
+ - apiGroups:
+ - policy
+ resources:
+ - poddisruptionbudgets
+ verbs:
+ - create
+ - delete
+ - get
+ - patch
+ - update
+ - list
+ - watch
+ - apiGroups:
+ - clickhouse.altinity.com
+ resources:
+ - clickhouseinstallations
+ verbs:
+ - delete
+ - get
+ - patch
+ - update
+ - apiGroups:
+ - clickhouse.altinity.com
+ resources:
+ - clickhouseinstallations
+ - clickhouseinstallationtemplates
+ - clickhouseoperatorconfigurations
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - clickhouse.altinity.com
+ resources:
+ - clickhouseinstallations/finalizers
+ - clickhouseinstallationtemplates/finalizers
+ - clickhouseoperatorconfigurations/finalizers
+ verbs:
+ - update
+ - apiGroups:
+ - clickhouse.altinity.com
+ resources:
+ - clickhouseinstallations/status
+ - clickhouseinstallationtemplates/status
+ - clickhouseoperatorconfigurations/status
+ verbs:
+ - create
+ - delete
+ - get
+ - update
+ - patch
+ - apiGroups:
+ - ""
+ resources:
+ - secrets
+ verbs:
+ - get
+ - list
diff --git a/charts/altinity-clickhouse-operator/templates/generated/ClusterRoleBinding-clickhouse-operator-kube-system.yaml b/charts/altinity-clickhouse-operator/templates/generated/ClusterRoleBinding-clickhouse-operator-kube-system.yaml
new file mode 100644
index 0000000..a509873
--- /dev/null
+++ b/charts/altinity-clickhouse-operator/templates/generated/ClusterRoleBinding-clickhouse-operator-kube-system.yaml
@@ -0,0 +1,15 @@
+# Setup ClusterRoleBinding between ClusterRole and ServiceAccount.
+# ClusterRoleBinding is namespace-less and must have unique name
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: {{ include "altinity-clickhouse-operator.fullname" . }}
+ namespace: {{ .Release.Namespace }}
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: {{ include "altinity-clickhouse-operator.fullname" . }}
+subjects:
+ - kind: ServiceAccount
+ name: {{ include "altinity-clickhouse-operator.serviceAccountName" . }}
+ namespace: {{ .Release.Namespace }}
diff --git a/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-confd-files.yaml b/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-confd-files.yaml
index 5644704..5c1ef4e 100644
--- a/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-confd-files.yaml
+++ b/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-confd-files.yaml
@@ -1,3 +1,9 @@
+# Template Parameters:
+#
+# NAME=etc-clickhouse-operator-confd-files
+# NAMESPACE=kube-system
+# COMMENT=
+#
apiVersion: v1
kind: ConfigMap
metadata:
diff --git a/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-configd-files.yaml b/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-configd-files.yaml
index 4a3f469..099bef9 100644
--- a/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-configd-files.yaml
+++ b/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-configd-files.yaml
@@ -1,3 +1,9 @@
+# Template Parameters:
+#
+# NAME=etc-clickhouse-operator-configd-files
+# NAMESPACE=kube-system
+# COMMENT=
+#
apiVersion: v1
kind: ConfigMap
metadata:
@@ -9,14 +15,14 @@ data:
{{- if .Values.configs.configdFiles }}
{{- toYaml .Values.configs.configdFiles | nindent 2 }}
{{ else }}
- 01-clickhouse-listen.xml: |
+ 01-clickhouse-01-listen.xml: |
::
0.0.0.0
1
- 02-clickhouse-logger.xml: |
+ 01-clickhouse-02-logger.xml: |
@@ -29,24 +35,24 @@ data:
1
- 03-clickhouse-querylog.xml: |
+ 01-clickhouse-03-query_log.xml: |
-
- system
-
- Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 30 day
- 7500
-
-
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 30 day
+ 7500
+
+
- 04-clickhouse-partlog.xml: |
+ 01-clickhouse-04-part_log.xml: |
-
- system
-
- Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 30 day
- 7500
-
+
+ system
+
+ Engine = MergeTree PARTITION BY event_date ORDER BY event_time TTL event_date + interval 30 day
+ 7500
+
{{ end }}
diff --git a/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-files.yaml b/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-files.yaml
index 4595cee..766e5e4 100644
--- a/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-files.yaml
+++ b/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-files.yaml
@@ -1,3 +1,9 @@
+# Template Parameters:
+#
+# NAME=etc-clickhouse-operator-files
+# NAMESPACE=kube-system
+# COMMENT=
+#
apiVersion: v1
kind: ConfigMap
metadata:
@@ -18,11 +24,8 @@ data:
# List of namespaces where clickhouse-operator watches for events.
# Concurrently running operators should watch on different namespaces
- #watchNamespaces:
- # - dev
- # - test
- # - info
- # - onemore
+ #watchNamespaces: ["dev", "test"]
+ watchNamespaces: []
################################################
##
@@ -105,8 +108,8 @@ data:
# 3. DROP DNS CACHE
# User with such credentials can be specified in additional ClickHouse .xml config files,
# located in `chUsersConfigsPath` folder
- chUsername: clickhouse_operator
- chPassword: clickhouse_operator_password
+ chUsername: "clickhouse_operator"
+ chPassword: "clickhouse_operator_password"
# Location of k8s Secret with username and password to be used by operator to connect to ClickHouse instances
# Can be used instead of explicitly specified username and password
@@ -165,4 +168,16 @@ data:
# LabelClusterScopeCycleIndex
# LabelClusterScopeCycleOffset
appendScopeLabels: "no"
+
+ ################################################
+ ##
+ ## Pod management parameters
+ ##
+ ################################################
+ # Grace period for Pod termination.
+ # How many seconds to wait between sending
+ # SIGTERM and SIGKILL during Pod termination process.
+ # Increase this number is case of slow shutdown.
+ terminationGracePeriod: 30
+
{{ end }}
\ No newline at end of file
diff --git a/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-templatesd-files.yaml b/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-templatesd-files.yaml
index 318f7c3..e2758e3 100644
--- a/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-templatesd-files.yaml
+++ b/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-templatesd-files.yaml
@@ -1,3 +1,9 @@
+# Template Parameters:
+#
+# NAME=etc-clickhouse-operator-templatesd-files
+# NAMESPACE=kube-system
+# COMMENT=
+#
apiVersion: v1
kind: ConfigMap
metadata:
diff --git a/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-usersd-files.yaml b/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-usersd-files.yaml
index c814c39..0e836ae 100644
--- a/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-usersd-files.yaml
+++ b/charts/altinity-clickhouse-operator/templates/generated/ConfigMap-etc-clickhouse-operator-usersd-files.yaml
@@ -1,3 +1,9 @@
+# Template Parameters:
+#
+# NAME=etc-clickhouse-operator-usersd-files
+# NAMESPACE=kube-system
+# COMMENT=
+#
apiVersion: v1
kind: ConfigMap
metadata:
diff --git a/charts/altinity-clickhouse-operator/templates/generated/Deployment-clickhouse-operator.yaml b/charts/altinity-clickhouse-operator/templates/generated/Deployment-clickhouse-operator.yaml
index 69635b1..b9779c2 100644
--- a/charts/altinity-clickhouse-operator/templates/generated/Deployment-clickhouse-operator.yaml
+++ b/charts/altinity-clickhouse-operator/templates/generated/Deployment-clickhouse-operator.yaml
@@ -1,3 +1,12 @@
+# Template Parameters:
+#
+# NAMESPACE=kube-system
+# COMMENT=
+# OPERATOR_IMAGE=altinity/clickhouse-operator:0.16.1
+# METRICS_EXPORTER_IMAGE=altinity/metrics-exporter:0.16.1
+#
+# Setup Deployment for clickhouse-operator
+# Deployment would be created in kubectl-specified namespace
kind: Deployment
apiVersion: apps/v1
metadata:
@@ -58,26 +67,34 @@ spec:
- name: etc-clickhouse-operator-usersd-folder
mountPath: /etc/clickhouse-operator/users.d
env:
+ # Pod-specific
+ # spec.nodeName: ip-172-20-52-62.ec2.internal
- name: OPERATOR_POD_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
+ # metadata.name: clickhouse-operator-6f87589dbb-ftcsf
- name: OPERATOR_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
+ # metadata.namespace: kube-system
- name: OPERATOR_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
+ # status.podIP: 100.96.3.2
- name: OPERATOR_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
+ # spec.serviceAccount: clickhouse-operator
+ # spec.serviceAccountName: clickhouse-operator
- name: OPERATOR_POD_SERVICE_ACCOUNT
valueFrom:
fieldRef:
fieldPath: spec.serviceAccountName
+ # Container-specific
- name: OPERATOR_CONTAINER_CPU_REQUEST
valueFrom:
resourceFieldRef:
diff --git a/charts/altinity-clickhouse-operator/templates/generated/Service-clickhouse-operator-metrics.yaml b/charts/altinity-clickhouse-operator/templates/generated/Service-clickhouse-operator-metrics.yaml
index 023b552..63211c6 100644
--- a/charts/altinity-clickhouse-operator/templates/generated/Service-clickhouse-operator-metrics.yaml
+++ b/charts/altinity-clickhouse-operator/templates/generated/Service-clickhouse-operator-metrics.yaml
@@ -1,3 +1,13 @@
+# Template Parameters:
+#
+# NAMESPACE=kube-system
+# COMMENT=
+#
+# Setup ClusterIP Service to provide monitoring metrics for Prometheus
+# Service would be created in kubectl-specified namespace
+# In order to get access outside of k8s it should be exposed as:
+# kubectl --namespace prometheus port-forward service/prometheus 9090
+# and point browser to localhost:9090
kind: Service
apiVersion: v1
metadata:
diff --git a/charts/altinity-clickhouse-operator/templates/serviceaccount.yaml b/charts/altinity-clickhouse-operator/templates/generated/ServiceAccount-clickhouse-operator.yaml
similarity index 78%
rename from charts/altinity-clickhouse-operator/templates/serviceaccount.yaml
rename to charts/altinity-clickhouse-operator/templates/generated/ServiceAccount-clickhouse-operator.yaml
index 9d6e0d7..8ad6941 100644
--- a/charts/altinity-clickhouse-operator/templates/serviceaccount.yaml
+++ b/charts/altinity-clickhouse-operator/templates/generated/ServiceAccount-clickhouse-operator.yaml
@@ -1,4 +1,11 @@
{{- if .Values.serviceAccount.create -}}
+# Template Parameters:
+#
+# COMMENT=
+# NAMESPACE=kube-system
+# NAME=clickhouse-operator
+#
+# Setup ServiceAccount
apiVersion: v1
kind: ServiceAccount
metadata:
diff --git a/charts/altinity-clickhouse-operator/templates/rbac.yaml b/charts/altinity-clickhouse-operator/templates/rbac.yaml
deleted file mode 100644
index 1033b87..0000000
--- a/charts/altinity-clickhouse-operator/templates/rbac.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRole
-metadata:
- name: {{ include "altinity-clickhouse-operator.serviceAccountName" . }}
- namespace: {{ .Release.Namespace }}
-rules:
- - apiGroups:
- - '*'
- resources:
- - '*'
- verbs:
- - '*'
- - nonResourceURLs:
- - '*'
- verbs:
- - '*'
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRoleBinding
-metadata:
- name: {{ include "altinity-clickhouse-operator.serviceAccountName" . }}
- namespace: {{ .Release.Namespace }}
-roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: {{ include "altinity-clickhouse-operator.serviceAccountName" . }}
-subjects:
- - kind: ServiceAccount
- name: {{ include "altinity-clickhouse-operator.serviceAccountName" . }}
- namespace: {{ .Release.Namespace }}