mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-06 23:23:23 +09:00
A tenant whose monitoring resolves to an ancestor runs Fluent Bit and VMAgent that write logs to the owner's vlinsert and metrics to its vminsert. The generated Cilium egress dropped part of this traffic: it never opened vlinsert, so log shipping was always dropped at the source, and it reached vminsert only by walking the namespace prefix, which never reaches tenant-root from below the first level, so a guest two levels deep under a tenant-root-owned monitoring lost its metrics. Replace the prefix walk with a single egress rule that targets the monitoring owner namespace directly for both vminsert and vlinsert. The owner is already computed in namespace.yaml and inherited through _namespace.monitoring, so it resolves at any depth, and the rule is skipped when the tenant owns its monitoring or when no ancestor owns it. The owner already admits the traffic through allow-external-communication (fromEntities: cluster), so no ingress policy is added. The etcd and ingress ancestor egress now comes from tenant.ancestorNamespaces (merged separately onto main), so the monitoring tests assert that shape and the ancestor-egress suite no longer asserts the removed vminsert prefix-walk rule. Assisted-by: LLM Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
How to test packages local
cd packages/core/installer
make image-cozystack REGISTRY=YOUR_CUSTOM_REGISTRY
make apply
kubectl delete po -l app=source-controller -n cozy-fluxcd