fix(observability): make a cold install-observability succeed from zero - #34
Merged
Conversation
scotwells
force-pushed
the
fix/observability-cold-install
branch
from
July 19, 2026 15:42
d392c0b to
db7b38c
Compare
Installing the observability stack on a fresh cluster fails partway through and needs manual recovery. Independent causes, all fixed here: - OpenTelemetryCollector CR install was racy. It sat in the kustomize bundle, so the first `kustomize build | kubectl apply` created it before its CRD and webhook existed. The task already applies it in a dedicated step, but that step only waited for the operator HelmRelease Ready + CRD Established — neither of which guarantees the operator's admission webhook is serving with an injected caBundle (both are async after Helm install), so it still failed with x509 / "no endpoints" on a cold cluster. Fix: drop the CR from the bundle, and in the dedicated step wait for the operator Deployment and retry the apply until the webhook is ready. - cert-manager cainjector OOMKilled (exit 137) on its 64Mi limit once the stack's CRDs/webhooks landed, so it never injected the OTel operator's webhook caBundle. Raise the limit to 256Mi (its footprint scales with cluster object count). - Loki's default memcached chunk/results caches request ~8-9Gi each and stay Pending on a single-node cluster, leaving the Loki HelmRelease permanently not-Ready. Disable them — unneeded for a SingleBinary + filesystem setup. After this, `task install-observability` completes clean from a fresh cluster with no manual intervention.
scotwells
force-pushed
the
fix/observability-cold-install
branch
from
July 19, 2026 15:44
db7b38c to
e927ca4
Compare
scotwells
enabled auto-merge
July 19, 2026 15:47
ecv
approved these changes
Jul 19, 2026
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.
Problem
task install-observabilityon a fresh cluster fails partway through and needs manual recovery to finish. Independent causes, each of which aborts the install on its own.Fixes
1. OTel Collector CR install was racy — now ordered and retried. The
OpenTelemetryCollectorCR was listed incomponents/observability/kustomization.yaml, so the task's firstkustomize build | kubectl applytried to create it before its CRD/webhook existed (no matches for kind). The task does also apply it in a dedicated step — but that step only waited for the operator HelmRelease Ready + CRD Established, and neither guarantees the operator's admission webhook is serving with an injected caBundle (both are async after the Helm install), so it still failed with anx509/no endpointswebhook error on a cold cluster. Fix: drop the CR from the bundle (so it is installed exactly once, in order), and in the dedicated step wait for the operator Deployment to be Available and retry the apply until the webhook is ready.2. cert-manager cainjector OOMKilled. cainjector caches every CRD/APIService/webhook to inject CA bundles, so its memory scales with cluster object count. At 64Mi it OOMKills (exit 137) once the stack's CRDs/webhooks land — and until it's healthy it never injects the OTel operator's webhook caBundle (cause #1's
x509). Raised to 256Mi.3. Loki HelmRelease never went Ready. The Loki chart enables memcached chunk/results caches by default, each requesting ~8-9Gi, which stay
Pending(Insufficient memory) on a single-node cluster and hold the Loki HelmRelease not-Ready — sowait helmrelease/lokifails even though everything else is up. Disabled both caches (unneeded for the SingleBinary + filesystem dev setup).How the collector is installed now
Still installed as part of
install-observability— just once, in order. It was being applied twice: prematurely in the bulkkustomize build | kubectl applyat the top of the task (before its CRD/webhook existed → the cold-start failure), and again in a dedicated step. This drops the premature bundle copy and keeps the dedicated step, which now (a) waits for the CRD Established, (b) waits for the operator Deployment Available, and (c) retrieskubectl applyof the CR until the admission webhook accepts it — then waits on the collector DaemonSet rollout.components/observabilityhas no other (e.g. Flux/GitOps) consumer, so this is the single install path.Result
task install-observabilitycompletes clean from a fresh cluster with no manual intervention.Verification
Applied all of this on a live cold install: cainjector stable at 256Mi, OTel Collector DaemonSet Ready, and end-to-end telemetry confirmed — assistant metrics scraped into Victoria Metrics (
up{job="assistant"}=1) and traces landing in Tempo.