Skip to content

fix(observability): let argocd replace the jaeger deployment - #251

Merged
Tiago0507 merged 3 commits into
mainfrom
fix/jaeger-drop-rolling-update
Sep 28, 2026
Merged

Tiago0507 merged 3 commits into
mainfrom
fix/jaeger-drop-rolling-update

Conversation

@Tiago0507

Copy link
Copy Markdown
Contributor

What changes

  • The Jaeger Deployment in infrastructure/jaeger/jaeger-allinone.yaml carries argocd.argoproj.io/sync-options: Replace=true.
  • tests/contract/observability.sh requires that sync option.
  • spec 006 gains T058.

Why

#250 set strategy: Recreate so Jaeger can restart despite Badger's lock. ArgoCD synced it on eks-dev, and the API server rejected it:

Deployment.apps "jaeger" is invalid: spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy `type` is 'Recreate'. Retrying attempt #2
$ kubectl -n observability get deploy jaeger -o jsonpath='{.spec.strategy}'
{"rollingUpdate":{"maxSurge":"25%","maxUnavailable":"25%"},"type":"RollingUpdate"}

The Application syncs with ServerSideApply=true. A server-side apply merges the manifest into the live object, which keeps the rollingUpdate defaults the API server filled in when the Deployment was created, and those are invalid next to Recreate. Replacing the object drops them. Jaeger therefore still runs the old pod listening on 127.0.0.1:4317, beside a new pod that crash-loops on the Badger lock.

Tasks

gitops specs/006-observability-platform-foundation T058 (added and delivered here).

  • The task register is updated in this pull request
  • Every task ticked here was verified by locating its artifact

How it is verified

microservice-app-ai-agents/scripts/check-mcp.sh gitops . passes. No MCP server covers Argo CD, so the source is Argo CD's own documentation at the vendored version, docs/user-guide/sync-options.md at v3.5.0 (read with gh api). The section "Replace Resource Instead Of Applying Changes" says Replace=true "can also be configured at individual resource level" with this exact annotation, and line 358 says "Replace=true takes precedence over ServerSideApply=true."

$ tests/contract/observability.sh
FAIL: Jaeger's Deployment must carry argocd.argoproj.io/sync-options Replace=true, so a server-side sync can move it off RollingUpdate (found '' in infrastructure/jaeger)
$ tests/contract/observability.sh
PASS: observability platform static contract (prometheus, grafana, jaeger, loki); registration asserted
$ tests/platform/observability-full.bats
PASS: full-profile observability roots ...
  • Infrastructure changes: the documentation consulted through the required MCP servers is listed above

Risk and rollback

ArgoCD replaces the Deployment object once. Under Recreate, the old pod stops and releases the Badger lock, and the new pod starts with the 0.0.0.0 OTLP endpoints from #248. The spans on the PVC are kept. The documentation warns that Replace can recreate resources; for a single-replica Deployment on a persistent volume that means the same short gap Recreate already accepts. Rollback is a revert of the merge commit.

What this PR does not do

  • It does not change the Application-wide sync options; only this Deployment is replaced.

Merge method: merge commit. This PR carries a Spec-Driven Development test/fix pair (docs #40).

Approval required: one maintainer approval (EstebanGZam or Juanmadiaz45).

🤖 Generated with Claude Code

ArgoCD syncs server-side, and on eks-dev the Recreate strategy from #250
was rejected because the live Deployment kept its RollingUpdate defaults:
Deployment.apps "jaeger" is invalid: spec.strategy.rollingUpdate:
Forbidden: may not be specified when strategy type is 'Recreate'.
The contract requires the per-resource sync option Replace=true and fails:
FAIL: Jaeger's Deployment must carry argocd.argoproj.io/sync-options Replace=true
@Tiago0507
Tiago0507 merged commit 9927e1c into main Sep 28, 2026
4 checks passed
@Tiago0507
Tiago0507 deleted the fix/jaeger-drop-rolling-update branch September 28, 2026 23:50
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.

3 participants