clickhouse.v1.clickHouseOperatorConfiguration
"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"
Index
fn new(name)
obj metadata
fn withAnnotations(annotations)
fn withAnnotationsMixin(annotations)
fn withClusterName(clusterName)
fn withCreationTimestamp(creationTimestamp)
fn withDeletionGracePeriodSeconds(deletionGracePeriodSeconds)
fn withDeletionTimestamp(deletionTimestamp)
fn withFinalizers(finalizers)
fn withFinalizersMixin(finalizers)
fn withGenerateName(generateName)
fn withGeneration(generation)
fn withLabels(labels)
fn withLabelsMixin(labels)
fn withName(name)
fn withNamespace(namespace)
fn withOwnerReferences(ownerReferences)
fn withOwnerReferencesMixin(ownerReferences)
fn withResourceVersion(resourceVersion)
fn withSelfLink(selfLink)
fn withUid(uid)
obj spec
obj spec.annotation
obj spec.clickhouse
obj spec.label
obj spec.logger
obj spec.pod
obj spec.reconcile
obj spec.statefulSet
obj spec.template
obj spec.watch
Fields
fn new
new(name)
new returns an instance of ClickHouseOperatorConfiguration
obj metadata
"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create."
fn metadata.withAnnotations
withAnnotations(annotations)
"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations"
fn metadata.withAnnotationsMixin
withAnnotationsMixin(annotations)
"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations"
Note: This function appends passed data to existing values
fn metadata.withClusterName
withClusterName(clusterName)
"The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request."
fn metadata.withCreationTimestamp
withCreationTimestamp(creationTimestamp)
"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."
fn metadata.withDeletionGracePeriodSeconds
withDeletionGracePeriodSeconds(deletionGracePeriodSeconds)
"Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only."
fn metadata.withDeletionTimestamp
withDeletionTimestamp(deletionTimestamp)
"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."
fn metadata.withFinalizers
withFinalizers(finalizers)
"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list."
fn metadata.withFinalizersMixin
withFinalizersMixin(finalizers)
"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list."
Note: This function appends passed data to existing values
fn metadata.withGenerateName
withGenerateName(generateName)
"GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency"
fn metadata.withGeneration
withGeneration(generation)
"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only."
fn metadata.withLabels
withLabels(labels)
"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels"
fn metadata.withLabelsMixin
withLabelsMixin(labels)
"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels"
Note: This function appends passed data to existing values
fn metadata.withName
withName(name)
"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
fn metadata.withNamespace
withNamespace(namespace)
"Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces"
fn metadata.withOwnerReferences
withOwnerReferences(ownerReferences)
"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."
fn metadata.withOwnerReferencesMixin
withOwnerReferencesMixin(ownerReferences)
"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."
Note: This function appends passed data to existing values
fn metadata.withResourceVersion
withResourceVersion(resourceVersion)
"An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency"
fn metadata.withSelfLink
withSelfLink(selfLink)
"SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release."
fn metadata.withUid
withUid(uid)
"UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids"
obj spec
"Allows to define settings of the clickhouse-operator.\nMore info: https://github.com/Altinity/clickhouse-operator/blob/master/config/config.yaml\nCheck into etc-clickhouse-operator* ConfigMaps if you need more control\n"
obj spec.annotation
"defines which metadata.annotations items will include or exclude during render StatefulSet, Pod, PVC resources"
fn spec.annotation.withExclude
withExclude(exclude)
"When propagating labels from the chi's metadata.annotations
section to child objects' metadata.annotations
,\nexclude annotations with names from the following list\n"
fn spec.annotation.withExcludeMixin
withExcludeMixin(exclude)
"When propagating labels from the chi's metadata.annotations
section to child objects' metadata.annotations
,\nexclude annotations with names from the following list\n"
Note: This function appends passed data to existing values
fn spec.annotation.withInclude
withInclude(include)
"When propagating labels from the chi's metadata.annotations
section to child objects' metadata.annotations
,\ninclude annotations with names from the following list\n"
fn spec.annotation.withIncludeMixin
withIncludeMixin(include)
"When propagating labels from the chi's metadata.annotations
section to child objects' metadata.annotations
,\ninclude annotations with names from the following list\n"
Note: This function appends passed data to existing values
obj spec.clickhouse
"Clickhouse related parameters used by clickhouse-operator"
obj spec.clickhouse.access
"parameters which use for connect to clickhouse from clickhouse-operator deployment"
fn spec.clickhouse.access.withPassword
withPassword(password)
"ClickHouse password to be used by operator to connect to ClickHouse instances, deprecated, use chCredentialsSecretName"
fn spec.clickhouse.access.withPort
withPort(port)
"Port to be used by operator to connect to ClickHouse instances"
fn spec.clickhouse.access.withRootCA
withRootCA(rootCA)
"Root certificate authority that clients use when verifying server certificates. Used for https connection to ClickHouse"
fn spec.clickhouse.access.withScheme
withScheme(scheme)
"The scheme to user for connecting to ClickHouse. Possible values: http, https, auto"
fn spec.clickhouse.access.withUsername
withUsername(username)
"ClickHouse username to be used by operator to connect to ClickHouse instances, deprecated, use chCredentialsSecretName"
obj spec.clickhouse.access.secret
fn spec.clickhouse.access.secret.withName
withName(name)
"Name of k8s Secret with username and password to be used by operator to connect to ClickHouse instances"
fn spec.clickhouse.access.secret.withNamespace
withNamespace(namespace)
"Location of k8s Secret with username and password to be used by operator to connect to ClickHouse instances"
obj spec.clickhouse.access.timeouts
"Timeouts used to limit connection and queries from the operator to ClickHouse instances, In seconds"
fn spec.clickhouse.access.timeouts.withConnect
withConnect(connect)
"Timout to setup connection from the operator to ClickHouse instances. In seconds."
fn spec.clickhouse.access.timeouts.withQuery
withQuery(query)
"Timout to perform SQL query from the operator to ClickHouse instances. In seconds."
obj spec.clickhouse.configuration
obj spec.clickhouse.configuration.file
obj spec.clickhouse.configuration.file.path
"Each 'path' can be either absolute or relative.\nIn case path is absolute - it is used as is.\nIn case path is relative - it is relative to the folder where configuration file you are reading right now is located.\n"
fn spec.clickhouse.configuration.file.path.withCommon
withCommon(common)
"Path to the folder where ClickHouse configuration files common for all instances within a CHI are located.\nDefault value - config.d\n"
fn spec.clickhouse.configuration.file.path.withHost
withHost(host)
"Path to the folder where ClickHouse configuration files unique for each instance (host) within a CHI are located.\nDefault value - conf.d\n"
fn spec.clickhouse.configuration.file.path.withUser
withUser(user)
"Path to the folder where ClickHouse configuration files with users settings are located.\nFiles are common for all instances within a CHI.\nDefault value - users.d\n"
obj spec.clickhouse.configuration.network
"Default network parameters for any user which will create"
fn spec.clickhouse.configuration.network.withHostRegexpTemplate
withHostRegexpTemplate(hostRegexpTemplate)
"ClickHouse server configuration <host_regexp>...</host_regexp>
for any
obj spec.clickhouse.configuration.user
"Default parameters for any user which will create"
obj spec.clickhouse.configuration.user.default
fn spec.clickhouse.configuration.user.default.withNetworksIP
withNetworksIP(networksIP)
"ClickHouse server configuration <networks><ip>...</ip></networks>
for any
fn spec.clickhouse.configuration.user.default.withNetworksIPMixin
withNetworksIPMixin(networksIP)
"ClickHouse server configuration <networks><ip>...</ip></networks>
for any
Note: This function appends passed data to existing values
fn spec.clickhouse.configuration.user.default.withPassword
withPassword(password)
"ClickHouse server configuration <password>...</password>
for any
fn spec.clickhouse.configuration.user.default.withProfile
withProfile(profile)
"ClickHouse server configuration <profile>...</profile>
for any
fn spec.clickhouse.configuration.user.default.withQuota
withQuota(quota)
"ClickHouse server configuration <quota>...</quota>
for any
obj spec.clickhouse.configurationRestartPolicy
"Configuration restart policy describes what configuration changes require ClickHouse restart"
fn spec.clickhouse.configurationRestartPolicy.withRules
withRules(rules)
"Array of set of rules per specified ClickHouse versions"
fn spec.clickhouse.configurationRestartPolicy.withRulesMixin
withRulesMixin(rules)
"Array of set of rules per specified ClickHouse versions"
Note: This function appends passed data to existing values
obj spec.clickhouse.configurationRestartPolicy.rules
"Array of set of rules per specified ClickHouse versions"
fn spec.clickhouse.configurationRestartPolicy.rules.withRules
withRules(rules)
"Set of configuration rules for specified ClickHouse version"
fn spec.clickhouse.configurationRestartPolicy.rules.withRulesMixin
withRulesMixin(rules)
"Set of configuration rules for specified ClickHouse version"
Note: This function appends passed data to existing values
fn spec.clickhouse.configurationRestartPolicy.rules.withVersion
withVersion(version)
"ClickHouse version expression"
obj spec.clickhouse.metrics
"parameters which use for connect to fetch metrics from clickhouse by clickhouse-operator"
obj spec.clickhouse.metrics.timeouts
"Timeouts used to limit connection and queries from the metrics exporter to ClickHouse instances\nSpecified in seconds.\n"
fn spec.clickhouse.metrics.timeouts.withCollect
withCollect(collect)
"Timeout used to limit metrics collection request. In seconds.\nUpon reaching this timeout metrics collection is aborted and no more metrics are collected in this cycle.\nAll collected metrics are returned.\n"
obj spec.label
"defines which metadata.labels will include or exclude during render StatefulSet, Pod, PVC resources"
fn spec.label.withAppendScope
withAppendScope(appendScope)
"Whether to append Scope labels to StatefulSet and Pod\n- \"LabelShardScopeIndex\"\n- \"LabelReplicaScopeIndex\"\n- \"LabelCHIScopeIndex\"\n- \"LabelCHIScopeCycleSize\"\n- \"LabelCHIScopeCycleIndex\"\n- \"LabelCHIScopeCycleOffset\"\n- \"LabelClusterScopeIndex\"\n- \"LabelClusterScopeCycleSize\"\n- \"LabelClusterScopeCycleIndex\"\n- \"LabelClusterScopeCycleOffset\"\n"
fn spec.label.withExclude
withExclude(exclude)
"When propagating labels from the chi's metadata.labels
section to child objects' metadata.labels
,\nexclude labels from the following list\n"
fn spec.label.withExcludeMixin
withExcludeMixin(exclude)
"When propagating labels from the chi's metadata.labels
section to child objects' metadata.labels
,\nexclude labels from the following list\n"
Note: This function appends passed data to existing values
fn spec.label.withInclude
withInclude(include)
"When propagating labels from the chi's metadata.labels
section to child objects' metadata.labels
,\ninclude labels from the following list\n"
fn spec.label.withIncludeMixin
withIncludeMixin(include)
"When propagating labels from the chi's metadata.labels
section to child objects' metadata.labels
,\ninclude labels from the following list\n"
Note: This function appends passed data to existing values
obj spec.logger
"allow setup clickhouse-operator logger behavior"
fn spec.logger.withAlsologtostderr
withAlsologtostderr(alsologtostderr)
"boolean allows logs to stderr and files both"
fn spec.logger.withLog_backtrace_at
withLog_backtrace_at(log_backtrace_at)
"It can be set to a file and line number with a logging line.\nEx.: file.go:123\nEach time when this line is being executed, a stack trace will be written to the Info log.\n"
fn spec.logger.withLogtostderr
withLogtostderr(logtostderr)
"boolean, allows logs to stderr"
fn spec.logger.withStderrthreshold
withStderrthreshold(stderrthreshold)
fn spec.logger.withV
withV(v)
"verbosity level of clickhouse-operator log, default - 1 max - 9"
fn spec.logger.withVmodule
withVmodule(vmodule)
"Comma-separated list of filename=N, where filename (can be a pattern) must have no .go ext, and N is a V level.\nEx.: file=2 sets the 'V' to 2 in all files with names like file.\n"
obj spec.pod
"define pod specific parameters"
fn spec.pod.withTerminationGracePeriod
withTerminationGracePeriod(terminationGracePeriod)
"Optional duration in seconds the pod needs to terminate gracefully. \nLook details in pod.spec.terminationGracePeriodSeconds
\n"
obj spec.reconcile
"allow tuning reconciling process"
obj spec.reconcile.host
"Whether the operator during reconcile procedure should wait for a ClickHouse host:\n - to be excluded from a ClickHouse cluster\n - to complete all running queries\n - to be included into a ClickHouse cluster\nrespectfully before moving forward\n"
obj spec.reconcile.host.wait
fn spec.reconcile.host.wait.withExclude
withExclude(exclude)
"Whether the operator during reconcile procedure should wait for a ClickHouse host to be excluded from a ClickHouse cluster"
fn spec.reconcile.host.wait.withInclude
withInclude(include)
"Whether the operator during reconcile procedure should wait for a ClickHouse host to be included into a ClickHouse cluster"
fn spec.reconcile.host.wait.withQueries
withQueries(queries)
"Whether the operator during reconcile procedure should wait for a ClickHouse host to complete all running queries"
obj spec.reconcile.runtime
"runtime parameters for clickhouse-operator process which are used during reconcile cycle"
fn spec.reconcile.runtime.withReconcileCHIsThreadsNumber
withReconcileCHIsThreadsNumber(reconcileCHIsThreadsNumber)
"How many goroutines will be used to reconcile CHIs in parallel, 10 by default"
fn spec.reconcile.runtime.withReconcileShardsMaxConcurrencyPercent
withReconcileShardsMaxConcurrencyPercent(reconcileShardsMaxConcurrencyPercent)
"The maximum percentage of cluster shards that may be reconciled in parallel, 50 percent by default."
fn spec.reconcile.runtime.withReconcileShardsThreadsNumber
withReconcileShardsThreadsNumber(reconcileShardsThreadsNumber)
"How many goroutines will be used to reconcile shards of a cluster in parallel, 1 by default"
obj spec.reconcile.statefulSet
"Allow change default behavior for reconciling StatefulSet which generated by clickhouse-operator"
obj spec.reconcile.statefulSet.create
"Behavior during create StatefulSet"
fn spec.reconcile.statefulSet.create.withOnFailure
withOnFailure(onFailure)
"What to do in case created StatefulSet is not in Ready after statefulSetUpdateTimeout
seconds\nPossible options:\n1. abort - do nothing, just break the process and wait for admin.\n2. delete - delete newly created problematic StatefulSet.\n3. ignore (default) - ignore error, pretend nothing happened and move on to the next StatefulSet.\n"
obj spec.reconcile.statefulSet.update
"Behavior during update StatefulSet"
fn spec.reconcile.statefulSet.update.withOnFailure
withOnFailure(onFailure)
"What to do in case updated StatefulSet is not in Ready after statefulSetUpdateTimeout
seconds\nPossible options:\n1. abort - do nothing, just break the process and wait for admin.\n2. rollback (default) - delete Pod and rollback StatefulSet to previous Generation. Pod would be recreated by StatefulSet based on rollback-ed configuration.\n3. ignore - ignore error, pretend nothing happened and move on to the next StatefulSet.\n"
fn spec.reconcile.statefulSet.update.withPollInterval
withPollInterval(pollInterval)
"How many seconds to wait between checks for created/updated StatefulSet status"
fn spec.reconcile.statefulSet.update.withTimeout
withTimeout(timeout)
"How many seconds to wait for created/updated StatefulSet to be Ready"
obj spec.statefulSet
"define StatefulSet-specific parameters"
fn spec.statefulSet.withRevisionHistoryLimit
withRevisionHistoryLimit(revisionHistoryLimit)
"revisionHistoryLimit is the maximum number of revisions that will be\nmaintained in the StatefulSet's revision history. \nLook details in statefulset.spec.revisionHistoryLimit
\n"
obj spec.template
"Parameters which are used if you want to generate ClickHouseInstallationTemplate custom resources from files which are stored inside clickhouse-operator deployment"
obj spec.template.chi
fn spec.template.chi.withPath
withPath(path)
"Path to folder where ClickHouseInstallationTemplate .yaml manifests are located."
fn spec.template.chi.withPolicy
withPolicy(policy)
"CHI template updates handling policy\nPossible policy values:\n - ReadOnStart. Accept CHIT updates on the operators start only.\n - ApplyOnNextReconcile. Accept CHIT updates at all time. Apply news CHITs on next regular reconcile of the CHI\n"
obj spec.watch
"Parameters for watch kubernetes resources which used by clickhouse-operator deployment"
fn spec.watch.withNamespaces
withNamespaces(namespaces)
"List of namespaces where clickhouse-operator watches for events."
fn spec.watch.withNamespacesMixin
withNamespacesMixin(namespaces)
"List of namespaces where clickhouse-operator watches for events."
Note: This function appends passed data to existing values