Skip to main content

ArgoCD GitOps Integration

When your application is managed by Argo CD, you need to prevent Argo CD from reporting OutOfSync when Argo Rollouts dynamically updates Rollout status fields at runtime. See Onboarding and workloadRef Migration for related workflows.


Prerequisites

ComponentStatus
Argo CDInstalled and managing your application
Argo RolloutsInstalled in cluster
Argo Rollout MCP ServerRunning (Docker recommended)
Onboarded RolloutOnboarded and optionally managed by Argo CD

Environment Setup

Verify Argo CD Application

argocd app get hello-world  # or your app name
argocd app list
docker run --rm -it \
-p 8768:8768 \
-v ~/.kube:/app/.kube:ro \
-e K8S_KUBECONFIG=/app/.kube/config \
talkopsai/argo-rollout-mcp-server:latest

What Gets Ignored

The tool generates ignoreDifferences for runtime fields that Argo Rollouts mutates:

ResourcePaths IgnoredPurpose
TraefikService/spec/weighted/servicesWeight changes during canary steps
Rollout/statusPhase, replica counts, conditions
Rollout/spec/strategy/canary/trafficRouting, /spec/strategy/blueGreen/trafficRoutingMCP-patched trafficRouting (optional)
AnalysisRun/statusAnalysis run status
Deployment/spec/replicasworkloadRef only: Rollout scale-down of referenced Deployment

Standard Rollout Workflow

Generate ignoreDifferences for a standard canary or blue-green rollout.

StepActionPrompt / Tool
1Generate"Generate ArgoCD ignoreDifferences for hello-world in default, including rollout status, analysis runs, and Traefik service."
2Or use toolgenerate_argocd_ignore_differences(include_traefik_service=True, include_rollout_status=True, include_analysis_run=True)
3Copy outputCopy ignore_differences_yaml from response
4Add to ApplicationPaste into Application.spec.ignoreDifferences
5Syncargocd app sync hello-world or sync via UI

workloadRef Workflow

When using workloadRef migration, Argo CD may revert the Rollout's scale-down of the referenced Deployment.

StepActionPrompt / Tool
1Generate"Generate ArgoCD ignoreDifferences for hello-world in default with include_deployment_replicas for workloadRef."
2Or use toolgenerate_argocd_ignore_differences(include_deployment_replicas=True, deployment_name="hello-world")
3Add to ApplicationPaste output into Application.spec.ignoreDifferences

trafficRouting Workflow (Argo CD / Helm–Managed Rollout)

When the Rollout is managed by Argo CD or Helm and you patch trafficRouting via MCP, sync may revert it.

StepActionPrompt / Tool
1GenerateUse tool with include_rollout_traffic_routing=True
2Or use toolgenerate_argocd_ignore_differences(include_rollout_traffic_routing=True)
3Add to ApplicationPaste output into Application.spec.ignoreDifferences

Verify Sync Status Workflow

StepActionPrompt / Tool
1Check syncargocd app get hello-world or Argo CD UI
2Trigger rollout"Deploy hello-world:v2 to the hello-world rollout in default."
3Verify no OutOfSyncArgo CD should not show OutOfSync from Rollout status or TraefikService weights

Natural Language Prompts

Copy-paste these prompts into your MCP client (Cursor, Claude, etc.).

Standard Rollout

"Generate the ArgoCD ignoreDifferences configuration for hello-world in default — include Rollout status and AnalysisRun fields."
"Generate ignoreDifferences for hello-world in default with include_traefik_service — so Argo CD doesn't revert when Argo Rollouts updates TraefikService weights."
"Create the ArgoCD ignoreDifferences snippet for hello-world in default — include Rollout status, AnalysisRun, and TraefikService if using external traffic routing."

workloadRef

"Generate ArgoCD ignoreDifferences for hello-world in default with include_deployment_replicas for workloadRef — so Argo CD doesn't revert the Rollout's scale-down of the referenced Deployment."

Full Options

"Generate ignoreDifferences YAML for my ArgoCD app hello-world in default to prevent OutOfSync when Argo Rollouts updates status at runtime. Include rollout status, AnalysisRun, TraefikService, and deployment replicas for workloadRef."

Quick Reference: Tool → Prompt Mapping

ToolExample Prompt
generate_argocd_ignore_differences"Generate ArgoCD ignoreDifferences for hello-world in default, including rollout status, analysis runs, and Traefik service."
generate_argocd_ignore_differences (workloadRef)"Generate ArgoCD ignoreDifferences for hello-world in default with include_deployment_replicas for workloadRef."
generate_argocd_ignore_differences (trafficRouting)Use include_rollout_traffic_routing=True when Rollout is Argo CD/Helm-managed and trafficRouting is MCP-patched

Tool Parameters

ParameterDefaultDescription
include_traefik_servicetrueInclude TraefikService weight paths
include_rollout_statustrueInclude Rollout status paths
include_rollout_traffic_routingfalseInclude trafficRouting so MCP patches persist
include_analysis_runfalseInclude AnalysisRun status paths
include_deployment_replicasfalseworkloadRef: Ignore Deployment spec.replicas
deployment_name(optional)Scopes Deployment ignore when include_deployment_replicas=True
traefik_api_group"traefik.io"Use traefik.containo.us for Traefik v2

Troubleshooting

IssueCheck
Argo CD still OutOfSyncEnsure ignoreDifferences is in Application.spec, not a separate resource. Verify paths match your resources.
TraefikService weights revertedAdd include_traefik_service=True. For Traefik v2, use traefik_api_group="traefik.containo.us".
trafficRouting patch reverted on syncAdd include_rollout_traffic_routing=True. Or add trafficRouting to your Helm chart/Argo CD source.
Deployment replicas reverted (workloadRef)Add include_deployment_replicas=True and deployment_name="hello-world".
Wrong API group for TraefikTraefik v3: traefik.io. Traefik v2: traefik.containo.us.

Next Steps