feat(clickhouse): k8s ClickHouse modules (operator, keeper, cluster)#375
Open
anshulsao wants to merge 1 commit into
Open
feat(clickhouse): k8s ClickHouse modules (operator, keeper, cluster)#375anshulsao wants to merge 1 commit into
anshulsao wants to merge 1 commit into
Conversation
Add three Altinity-operator-based modules to deploy ClickHouse on Kubernetes, plus their @facets output types: - clickhouse_operator/k8s/1.0 -> @facets/clickhouse-operator - clickhouse_keeper/k8s/1.0 -> @facets/clickhouse-keeper - clickhouse/k8s/1.0 -> @facets/clickhouse Design notes: - CHI/CHK CRDs rendered via LOCAL helm charts to dodge the kubernetes_manifest plan-time CRD schema check. - Optional node_pool input pins every component to a dedicated pool: nodeSelector via cloud.google.com/gke-nodepool + tolerations. GKE reports the taint effect as NO_SCHEDULE; normalised to k8s NoSchedule. - Altinity podTemplate contract honoured: defaults.templates.podTemplate reference + podDistribution as a podTemplate child (else the operator ignores placement / never creates the StatefulSet). - Configurable cluster_domain (default cluster.local) renders the CHI/CHK namespaceDomainPattern and the keeper service_host FQDN. Required on clusters whose k8s DNS domain is not cluster.local (Facets GKE clusters use the environment name, e.g. eu-prod) or the operator can't resolve replica hosts and the CHI deadlocks InProgress. Verified end-to-end: apiv2 pilot reached CHI + CHK Completed with all 3 replicas Running on the dedicated ClickHouse node pool. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RsiV1JkMqt96ZQb1brv4zq
anshulsao
marked this pull request as ready for review
July 15, 2026 07:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds three Altinity-operator-based modules to deploy ClickHouse on Kubernetes, plus their
@facetsoutput types:clickhouse_operator/k8s/1.0@facets/clickhouse-operatorclickhouse_keeper/k8s/1.0@facets/clickhouse-keeperclickhouse/k8s/1.0@facets/clickhouseClickHouseInstallation)All three take
kubernetes_details: @facets/kubernetes-details(k8s + helm providers). Keeper/CHI depend on the operator input for CRD ordering; CHI wires its ZooKeeper host from the keeper output.Design notes (learned the hard way during the eu-prod pilot)
chart = "${path.module}/chart") to dodge thekubernetes_manifestplan-time CRD schema check.node_pool: @facets/kubernetes_nodepoolinput on all three. RendersnodeSelectorvia the always-presentcloud.google.com/gke-nodepool=<name>label + tolerations. GKE reports the taint effect asNO_SCHEDULE; normalised to k8sNoSchedule(k8s rejects the GKE form).spec.defaults.templates.podTemplatereference +dataVolumeClaimTemplate, andpodDistributionas a child of the podTemplate (not underconfiguration.clusters[].templates). Without this the operator ignores placement and never creates the StatefulSet.cluster_domain(defaultcluster.local) → renders the CHI/CHKnamespaceDomainPatternand the keeperservice_hostFQDN. Required on clusters whose k8s DNS domain isn'tcluster.local. Facets-provisioned GKE clusters use the environment name as the DNS domain (e.g.eu-prod), so without this override the operator queries...svc.cluster.local→ NXDOMAIN → marks every replica "NOT alive" → CHI stuckInProgressforever.Verification
Deployed end-to-end in a live Facets GKE env (SaaS Labs
eu-prod),cluster_domain=eu-prod:apiv2, 1 shard × 3 replicas) →Completed, all 3 podsRunningch-keeper, 3-node ensemble) →Completed2/2 Running; every pod scheduled on the dedicated ClickHouse node pool; replicas anti-affinity-spread across nodes/zones.Follow-ups (not in this PR)
icons/clickhouse*.svg— left out to avoid committing a trademarked logo; happy to add cloud-neutral icons if preferred.🤖 Generated with Claude Code