Skip to content

fix(langfuse): push OTEL keys via Sync hook so hub/langfuse-otel is created#27

Open
elamaran11 wants to merge 1 commit into
feature/oam-for-agentsfrom
fix/langfuse-otel-secret-push
Open

fix(langfuse): push OTEL keys via Sync hook so hub/langfuse-otel is created#27
elamaran11 wants to merge 1 commit into
feature/oam-for-agentsfrom
fix/langfuse-otel-secret-push

Conversation

@elamaran11

Copy link
Copy Markdown
Contributor

Problem

otel-collector-{hub,spoke-dev,spoke-prod} are stuck Degraded: their langfuse-otel-auth ExternalSecret fails with SecretSyncedError: Secret does not exist for key hub/langfuse-otel.

Root cause: the langfuse-push-otel-keys Job (writes the Langfuse project API keys to Secrets Manager at hub/langfuse-otel) is an ArgoCD PostSync hook. PostSync only fires once the entire Application reaches a completed, healthy sync — but langfuse-hub routinely sits OutOfSync/Progressing (the clickhouse/minio/postgres StatefulSets and the keycloak ExternalSecret churn). So the hook never runs, hub/langfuse-otel is never created, and every otel-collector ExternalSecret fails.

The keys already exist in-cluster (langfuse/langfuse-otel-keys) and the IAM role (hub-langfuse-seed-role, secretsmanager write on hub/langfuse-*) + pod identity for the langfuse-seed SA are all in place — only the push never happens.

Fix

Switch the push Job from a PostSync hook to a Sync hook with sync-wave: "5". A Sync hook runs during the sync operation itself (in wave order, after the seed SA + pod-identity in earlier waves), so the keys land in Secrets Manager regardless of whether the StatefulSets have converged.

Testing

Rendered via helm template — Job now carries hook: Sync + sync-wave: "5". On the live hub the seed SA, pod identity, and IAM role are confirmed present; the k8s langfuse-otel-keys secret already holds valid pk-lf-.../sk-lf-... values.

…lways created

The langfuse-push-otel-keys Job (writes Langfuse project API keys to Secrets
Manager at hub/langfuse-otel) was an argocd PostSync hook. PostSync only fires
after the whole Application reaches a completed, healthy sync — but langfuse-hub
routinely sits OutOfSync/Progressing (StatefulSets clickhouse/minio/postgres and
the keycloak ExternalSecret churn), so the hook never ran. Result: hub/langfuse-otel
never exists and every otel-collector ExternalSecret fails with SecretSyncedError,
leaving otel-collector-{hub,spoke-dev,spoke-prod} Degraded.

Switch the Job to a Sync hook with sync-wave 5 so it runs during the sync
operation (after the langfuse-seed SA + pod-identity in earlier waves) regardless
of whether other resources have converged. The IAM role (hub-langfuse-seed-role,
secretsmanager write on hub/langfuse-*) and pod identity already exist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant