Skip to content

fix(argocd): resolve OutOfSync drift on langfuse, agent-gateway, kagent - #2

Merged
elamaran11 merged 1 commit into
mainfrom
fix/argocd-oos-langfuse-and-httproute
May 15, 2026
Merged

fix(argocd): resolve OutOfSync drift on langfuse, agent-gateway, kagent#2
elamaran11 merged 1 commit into
mainfrom
fix/argocd-oos-langfuse-and-httproute

Conversation

@elamaran11

Copy link
Copy Markdown
Contributor

Summary

Three Argo Applications on a consumer (appmod-blueprints) hub cluster stayed permanently OutOfSync against the charts in this repo. Each one had a distinct root cause; all three are addressed in this PR.

1. langfuse-postgres StatefulSet — Kubernetes value normalization

The langfuse chart renders cpu: 1000m for the Postgres container limits, but Kubernetes normalizes equivalent CPU quantities on apply (1000m"1"). Argo then sees the live "1" as drift from the rendered 1000m on every reconcile.

Fix: quote the value as "1" in gitops/addons/charts/langfuse/values.yaml so render and live state match.

2. mcp-servers-route HTTPRoute — controller-defaulted field

The agent-gateway chart's HTTPRoute template omits the optional weight field on backendRefs. The Gateway API controller defaults missing weights to 1 and writes that back to the object, which Argo then reports as drift.

Fix: set weight: 1 explicitly in gitops/addons/charts/agent-gateway/templates/httproute.yaml.

3. argo-rollouts-conversion-agent Agent CR — kagent v0.7.9 schema bug

kagent v0.7.9 emits an Agent resource with spec.declarative.deployment: null, which fails CRD validation:

Agent.kagent.dev "argo-rollouts-conversion-agent" is invalid:
  spec.declarative.deployment: Invalid value: "null":
  spec.declarative.deployment in body must be of type object

The kagent-hub Application stays OutOfSync because this one resource cannot be applied. Pending an upstream fix in kagent-dev/kagent, this PR disables the argo-rollouts-agent subchart so the rest of the kagent agents can sync cleanly.

Fix: add gitops/addons/default/addons/kagent/values.yaml with argo-rollouts-agent.enabled: false. The condition lives at top-level (per Chart.yaml: condition: argo-rollouts-agent.enabled), not under the documented agents.* block — kagent's own values.yaml only uses agents.* for resource sizing, not the dependency toggle.

Verification

Rendered the kagent chart with the override to confirm:

$ helm template kagent oci://ghcr.io/kagent-dev/kagent/helm/kagent --version 0.7.9 -f .../kagent/values.yaml | grep "argo-rollouts-conversion-agent"
(empty — disabled correctly)

$ helm template ... | grep -c "kind: Agent"
9   (was 10 before)

Test plan

  • After merge + Argo refresh:
    • langfuse-hub reaches Synced (no more StatefulSet drift)
    • agent-gateway-hub reaches Synced (HTTPRoute weight written explicitly)
    • kagent-hub reaches Synced (broken Agent no longer rendered)

Follow-up

File an issue against kagent-dev/kagent so the argo-rollouts-agent subchart populates spec.declarative.deployment. Once a release fixes that, this override can be removed (or the subchart re-enabled in cluster-specific overlays).

🤖 Generated with Claude Code

Three Argo Applications on the consumer (appmod-blueprints) hub stayed
OutOfSync against the charts in this repo. Each had a distinct cause:

1. langfuse-postgres StatefulSet — chart values render
   `cpu: 1000m` but Kubernetes normalizes to `cpu: "1"` on apply,
   producing perpetual drift on the Helm-managed pod resources.
   Quote the value as "1" so render and live state match.

2. agent-gateway HTTPRoute (mcp-servers-route) — backendRefs omits
   the optional `weight` field; the gateway controller defaults it
   to `1`, which Argo then sees as drift. Add the explicit `weight: 1`.

3. kagent argo-rollouts-conversion-agent Agent CR — kagent v0.7.9 emits
   an Agent with `spec.declarative.deployment: null`, which fails CRD
   validation:
     spec.declarative.deployment: Invalid value: "null": must be of
     type object
   The whole `kagent-hub` Application stays OutOfSync because of this
   one resource. Disable the `argo-rollouts-agent` subchart via a
   default override file. The toggle lives at top-level
   (Chart.yaml: `condition: argo-rollouts-agent.enabled`), not under
   the documented `agents.*` block.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@elamaran11
elamaran11 requested a review from hmuthusamy May 15, 2026 13:42
@elamaran11
elamaran11 merged commit be00724 into main May 15, 2026
2 checks passed

@hmuthusamy hmuthusamy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

2 participants