GitLabCore reconciler
Status: Implemented Issue: none Parent: none
Goal
An administrator describes a GitLab instance in one GitLabCore resource, and the Operator keeps
the cluster in line with it. The Operator deploys the GitLab chart without Helm release storage and
without widening what a writer of the resource may do.
Child specs:
- Configuration: how the structured fields configure the instance.
- Unattended upgrades: how the instance follows GitLab releases.
- Batched background migrations: how an upgrade waits on them before it advances.
- Chart provenance verification: how a pulled chart is checked against the GitLab signature.
- GitLab ClickHouse integration: the ClickHouse connection of GitLab, which a
Siphonwaits for. - Trusted certificate authorities: the certificate authorities GitLab trusts,
including the one of a referenced
Orbit.
Cleanup is shared with Siphon and has a spec of its own: Object cleanup.
So does reading a version from a ConfigMap: Version reference.
Requirements
- The reconciler runs only in a build with the
bridgetag and withENABLE_BRIDGE=true. Without either, the manager starts with noGitLabCorewatch. - Each pass renders the chart version the instance converges to next, and applies every rendered object except definitions and RBAC.
- An object deleted or edited by hand is restored on the next successful pass, at most 30 seconds
after the previous one, with no change to the resource, unless the pass waits for the
GitLabSecretsof the release. - A field another manager set on an applied object is taken back, and a field the chart stops rendering is removed.
- The
pre-installhooks of the chart run once per release: again when the spec changes, when the chart version changes, or when a pass failed or waited for theGitLabSecretsbefore they completed, and not on any other pass. For the wait, see GitLab secrets. - A chart version missing from the charts directory is pulled from the chart repository, and
renders only once its signature verifies (see Chart provenance verification).
With
ENABLE_DYNAMIC_CHART_PULL=false, the version fails with an error that names the bundled ones. - No custom resource definition and no RBAC object is ever applied, hooks included.
- An object whose API the cluster does not serve fails the pass, and
Availablenames its kind. - The status reports
Initializedonce the hooks ran, andAvailableonce every rendered workload has its replicas ready. While either is notTrue, the Bridge list shows its reason next to the phase,Initializedfirst and as an error when the phase isFailed, and its message in the expanded row, below the upgrade detail when there is one. status.versionreports the chart version applied, andstatus.gitlabVersionthe GitLab version that chart deploys.status.upgradeVersionslists the chart versions the instance can upgrade to, newest first: the newest patch of each minor abovestatus.version, among the versions of the chart repository the Operator pulls from, or of its bundled charts withENABLE_DYNAMIC_CHART_PULL=false. A repository out of reach for now keeps the versions listed before, and one that fails for good lists none. An instance not installed yet lists none.- The
UpgradeVersionsListedcondition of an installed instance says whether the last pass listed the versions to upgrade to, and why not when it did not. - The Bridge list offers Upgrade to these versions for a
Staticinstance. It shows Latest version for an installed instance that lists none, and Newer versions unknown whileUpgradeVersionsListedis notTrue. Once the versions are known, an unattended instance shows the newest listed version its type does not move to, such as a new major, as available.
Out of scope
- The deprecated
v1beta1GitLabresource, which a separate controller serves. - Converting a
GitLabinto aGitLabCore. - Validating the chart values at admission.
- Running the
pre-upgrade,post-install, orpre-deletehooks.
FAQ
- Why does the reconciler not watch the objects it applies? A release is hundreds of objects of kinds the Operator does not know ahead of time. The pass polls instead. For more information, see ADR 30.
- Why are the hooks not run on every pass? Running them again deletes and recreates the shared
secrets
Job, and waits for its pod. - Why is RBAC never applied? It would turn the right to write a
GitLabCoreinto the right to grant any permission the Operator holds. For more information, see ADR 31. - Is a pulled chart verified? Yes, against the GitLab chart signing key by default. For more information, see Chart provenance verification.
- Why does the status list the versions to upgrade to, rather than Bridge reading the chart
repository? Only the Operator knows which charts it bundles, whether it pulls, and which
repository it reaches from inside the cluster. A client that reads the status lists what the
Operator installs, behind a mirror and in a disconnected cluster too, with no permission beyond
reading the
GitLabCore. For more information, see ADR 32. - Why keep a list the Operator could not refresh, rather than clear it? A network blip would empty the upgrade picker. The condition says the list is out of date instead, which a client shows. A failure that lasts, such as a misconfigured repository, clears the list, because the versions listed before may come from another repository.
- Why only the newest patch of each minor? An upgrade steps through the newest patch of each
minor anyway, and an older patch lacks the fixes of the newest one. The list stays a few
hundred bytes for an instance years behind. A
Staticversion can still name any patch. - Where does
status.gitlabVersioncome from? From the render, not from a catalog, because a pulled chart is in no catalog.Siphonreads it to pin its table definitions.
Was this page helpful?