GitLab ClickHouse integration
Status: Implemented Issue: https://gitlab.com/gitlab-org/cloud-native/gitlab-operator/-/work_items/2264 Parent: GitLabCore reconciler
Goal
An administrator connects GitLab to ClickHouse through a typed field or the Bridge form, without
writing chart values. A Siphon streams into the tables the GitLab ClickHouse migrations create,
so it builds on that connection and waits for it. For the design, see
ADR 41. For what deleting a Siphon
leaves in place, see Siphon and Orbit deprovisioning.
Requirements
spec.clickhouseconfigures the ClickHouse connection of GitLab: the URL of the HTTP interface, the database, the user, and a reference to the Secret key holding the password. All four are required. No password is stored in the resource.- The API server rejects a
spec.clickhouse.urlthat does not start withhttp://orhttps://. - Setting
spec.clickhouseturns the ClickHouse integration of GitLab on, andspec.chart.valueswin over it. So aGitLabCorehas ClickHouse configured whenspec.chart.valuessetglobal.clickhouse.enabledtotrue, or set none andspec.clickhouseis set. - Nothing of a
Siphonrenders while itsGitLabCorehas no ClickHouse configured. TheSiphonreportsInitialized=Falsewith reasonGitLabClickHouseNotConfigured, and resolves in 30 seconds of the instance gaining it, without a change to theSiphon. - A
Siphonwhose instance loses ClickHouse reports the same reason, and leaves what it applied running. spec.sinkof aSiphonstays its own connection. The Operator derives none of it fromspec.clickhouse.- The Bridge API reads and writes
spec.clickhousewith the instance. The form edits it in a ClickHouse group of Dependencies, and refuses Siphon without it. For the form, see GitLab instance form.
Out of scope
- Provisioning ClickHouse, its databases, or its users.
- Running or checking the GitLab ClickHouse migrations.
- Refusing in the Bridge API, or at admission, a
Siphonfor an instance with no ClickHouse. - ClickHouse connections other than
main.
FAQ
- Why does Siphon need its own ClickHouse connection? GitLab talks to the HTTP interface, and
Siphon to the native protocol on another port. Siphon also writes as a user of its own, with
INSERTon the target tables only. - Why does a
Siphonwait for the GitLab connection? The GitLab ClickHouse migrations create the tables Siphon writes into. Without the connection, nothing creates them, and Siphon fails on every insert. The requester asked for the dependency in both the form and the reconciler. - Why does a
Siphonkeep running when its instance loses ClickHouse? The requester asked for it. Stopping a running pipeline over an edit of another resource is worse than a condition that names it. The tables stay where they are. - Do chart values count as configured? Yes.
spec.chart.valuesare the escape hatch, and an instance that setglobal.clickhousethere before this field existed keeps its Siphon.
Was this page helpful?