Skip to content

fix(arc): disable prune on arc-tf to break controller-vs-argocd loop#35

Merged
xnoto merged 1 commit intomainfrom
fix/arc-tf-disable-prune
Apr 30, 2026
Merged

fix(arc): disable prune on arc-tf to break controller-vs-argocd loop#35
xnoto merged 1 commit intomainfrom
fix/arc-tf-disable-prune

Conversation

@xnoto
Copy link
Copy Markdown
Contributor

@xnoto xnoto commented Apr 30, 2026

Summary

The arc-tf Application is stuck in a Progressing/OutOfSync loop. Live state shows ArgoCD repeatedly trying to prune four resources:

  • `ServiceAccount/arc-tf-gha-rs-no-permission` (orphan from before `serviceAccountName: arc-tf-runner` — the chart conditionally renders this only when `serviceAccountName` is unset)
  • `AutoscalingListener/arc-tf-669cdf59-listener`
  • `Role/arc-tf-669cdf59-listener`
  • `RoleBinding/arc-tf-669cdf59-listener`

The listener triplet is created dynamically by the gha-runner-scale-set controller for each AutoscalingRunnerSet generation. The controller labels them with `app.kubernetes.io/instance: arc-tf`, so ArgoCD's default label-based tracking method claims them as managed. The chart does not render them, so with `prune: true` ArgoCD prunes them and the controller immediately recreates them.

Disable prune on this Application. selfHeal still reconciles chart-rendered resources; only the controller-owned dynamics stop being pruned.

Test plan

  • After ArgoCD reconciles, `arc-tf` health = Healthy and the Progressing loop stops
  • AutoscalingListener pod stays running across reconciles (logs show no churn)
  • Manual cleanup of the orphan `arc-tf-gha-rs-no-permission` SA after merge: `kubectl -n arc-runners delete sa arc-tf-gha-rs-no-permission`

🤖 Generated with Claude Code

The gha-runner-scale-set controller dynamically creates an
AutoscalingListener plus a Role/RoleBinding pair named
arc-tf-<hash>-listener, labeled with app.kubernetes.io/instance.
ArgoCD's label-based tracking claims them as managed, but the chart
does not render them, so each reconcile prunes them and the
controller recreates them — keeping the Application stuck in a
Progressing/OutOfSync loop.

Disable prune on this Application; selfHeal still keeps the
chart-rendered resources reconciled.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@xnoto xnoto self-assigned this Apr 30, 2026
@xnoto xnoto merged commit 0f50a54 into main Apr 30, 2026
2 checks passed
@xnoto xnoto deleted the fix/arc-tf-disable-prune branch April 30, 2026 15:57
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