Files
cozystack/packages/system/ouroboros/Makefile
Aleksei Sviridkin 6f83d9a794 feat(ouroboros): bump to v0.7.2 with debug logging on tenants
The v0.7.2 ouroboros release adds --log-level / OUROBOROS_CONTROLLER_LOG_LEVEL,
plants Debug logs at every informer event handler (AddFunc/UpdateFunc/
DeleteFunc with kind+namespace/name via describeObj) and at reconcile
entry/exit, wires SetWatchErrorHandler on Ingress / Gateway / HTTPRoute
informers, and surfaces cache-sync elapsed at Info. The diagnostic
surface targets the kamaji-tenant-via-konnectivity flake where bats
sees a fresh Ingress create succeed against the tenant apiserver but
the controller's coredns-custom rewrite lands roughly 7-10 minutes
later — without per-event visibility the failure mode is
indistinguishable between 'watch never fires', 'reconcile silently
errors', and 'API list returns empty until reflector reconnect'.

Bumps the chart-manifest digest, the controller-image digest, and the
cozystack-side image-pin assertion in lockstep. The bats deadline for
the coredns-custom rewrite check rises from 180s to 900s — even on
the broken-watch path the reflector eventually reconnects within
that budget, so the test stops failing on the symptom while we keep
the diagnostic on to learn what the symptom actually is.

cozystack tenants force controller.logLevel: debug via the
defaultOuroborosValues helper; operators that want quieter logs can
override through addons.ouroboros.valuesOverride. Two helm-unittest
fixtures pin both the default and the override path.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-05-11 02:20:34 +03:00

52 lines
2.5 KiB
Makefile

export NAME=ouroboros
export NAMESPACE=cozy-$(NAME)
include ../../../hack/common-envs.mk
include ../../../hack/package.mk
# Pin the upstream ouroboros chart by version AND OCI manifest digest.
#
# OUROBOROS_CHART_DIGEST below is the digest of the OCI **chart**
# manifest at ghcr.io/lexfrei/charts/ouroboros — it pins the contents
# of the helm chart artefact (templates, values.yaml, Chart.yaml).
# It is NOT the digest of the controller container image. The image
# digest lives in values.yaml under image.tag (`image.tag: "<version>@sha256:..."`)
# and pins ghcr.io/lexfrei/ouroboros (the runtime binary). Both
# digests have to land together at every chart bump — the chart
# version, the chart-manifest digest, and the controller-image
# digest all advance in lockstep with the upstream release.
#
# Bump together with the image tag+digest in values.yaml. The digest
# pin closes the supply-chain hole that a tag-only pull would leave —
# OCI registries can republish under the same tag, but the manifest
# digest is immutable. To bump: resolve the new chart-manifest digest
# with
# crane manifest ghcr.io/lexfrei/charts/ouroboros:<new-tag> | sha256sum
# (or `oras manifest fetch ghcr.io/lexfrei/charts/ouroboros:<new-tag> | sha256sum`)
# and update both lines below; resolve the new image digest with
# crane digest ghcr.io/lexfrei/ouroboros:<new-tag>
# and update values.yaml.
OUROBOROS_CHART_VERSION ?= 0.7.2
OUROBOROS_CHART_DIGEST ?= sha256:c67315551196a766aeb97cee6065083a5f4d78b67ab0377e25257e61d4615a43
test:
helm unittest .
update:
rm -rf charts
# Pull by digest, then verify Chart.yaml records the expected
# version. A digest mismatch (someone bumped DIGEST without
# bumping VERSION, or vice versa) trips the assert and aborts.
helm pull oci://ghcr.io/lexfrei/charts/ouroboros@$(OUROBOROS_CHART_DIGEST) --untar --untardir charts
@actual_version=$$(awk '/^version:/ {print $$2}' charts/ouroboros/Chart.yaml | tr -d '"'); \
if [ "$$actual_version" != "$(OUROBOROS_CHART_VERSION)" ]; then \
echo "ERROR: pulled chart Chart.yaml version=$$actual_version but Makefile OUROBOROS_CHART_VERSION=$(OUROBOROS_CHART_VERSION). Bump both in lockstep."; \
exit 1; \
fi
# Drop vendored upstream helm-unittest fixtures: the upstream
# fixtures hard-code upstream defaults that conflict with the
# cozystack values.yaml overrides (target Service FQDN, mode,
# Gateway-API gating). The cozystack-side fixtures in tests/
# are the only ones CI should run.
rm -rf charts/ouroboros/tests