fix(langfuse): make hub-only via alwaysSelector (prune spoke langfuse)#24
Open
elamaran11 wants to merge 2 commits into
Open
fix(langfuse): make hub-only via alwaysSelector (prune spoke langfuse)#24elamaran11 wants to merge 2 commits into
elamaran11 wants to merge 2 commits into
Conversation
…d regardless of useSelectors) The global useSelectors=false makes per-chart `selector` blocks ignored, so addons fall back to the global enable_agent_platform selector and fan out to every cluster. alwaysSelector is applied unconditionally, enabling per-cluster gating for hub-only addons without flipping the global flag (which would break addons whose enable_<addon> labels aren't present on any cluster). Backward-compatible: no existing chart sets it.
…l-plane Langfuse is a hub singleton; it must not deploy to spokes. Add alwaysSelector matching environment=control-plane so the generated ApplicationSet targets only the hub, pruning langfuse-spoke-dev/prod. Replaces the non-functional environments/<env>/addons.yaml approach (those files are not loaded by the bootstrap Application valueFiles).
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
Langfuse is a hub singleton (one Keycloak
langfuseclient, hub-domain redirect, sharedplatformrealm), but it is currently deployed to every cluster —langfuse-spoke-dev/langfuse-spoke-prodare generated and sitOutOfSync/Degraded.PR #23 tried to disable it on spokes via new
gitops/addons/environments/dev|prod/addons.yaml(langfuse.enabled: false), but those files are never loaded — the bootstrap Application (gitops/fleet/bootstrap/agent-platform-app.yaml) only referencesbootstrap/default/addons.yaml+environments/control-plane/addons.yaml. And langfuse generation is a single hub-level decision: the langfuse ApplicationSet selects clusters by the globalenable_agent_platform=truelabel (all clusters), because the platform runs withuseSelectors=false, which makes per-chartselectorblocks (langfuse'senable_langfuse) ignored.Flipping
useSelectorsglobally is not viable: most agentic addons'enable_<addon>labels (jaeger, litellm, otel_collector, oam_components, agent_gateway, …) are not present on any cluster, so enabling per-chart selectors would prune the whole agent platform.Fix
Add an
alwaysSelectorhook to the shared ApplicationSet template that is honored regardless ofuseSelectors, then set it on langfuse to requireenvironment in [control-plane]:The hub cluster secret carries
environment=control-plane; spokes carrydev/prod. So the generated langfuse ApplicationSet matches only the hub, and ArgoCD pruneslangfuse-spoke-*. Spoke agents continue to send traces to the hub Langfuse via the OTel pipeline (PR #23).alwaysSelectoris backward-compatible — no existing chart defines it, so behavior for every other addon is unchanged.Verification
On the live hub + spoke-dev + spoke-prod, after sync:
langfuse-hub;langfuse-spoke-dev/langfuse-spoke-prodare pruned.