Skip to content

Commit c46b6f1

Browse files
authored
fix(arc-tf): silence listener-resource drift via SSA + ignoreDifferences (#26)
## Summary \`arc-tf\` Application has been showing OutOfSync because the gha-runner-scale-set controller dynamically creates an \`AutoscalingListener\` plus a paired \`Role\` / \`RoleBinding\` (named \`<release>-<hash>-listener\`) at runtime — none of which are in the chart's rendered output — and rotates hash annotations on them on every reconcile. Two parts to the fix: 1. **\`ServerSideApply=true\`** — ArgoCD respects field-manager separation. The controller's mutations on annotations don't get reverted, and ArgoCD doesn't try to manage fields it doesn't own. 2. **\`ignoreDifferences\`** extended to cover \`/metadata/annotations\` on the dynamically-created \`Role\` and \`RoleBinding\` kinds (was previously only \`AutoscalingListener\` + \`AutoscalingRunnerSet\`). ## Test plan - [x] After merge: \`arc-tf\` Application reaches Synced + Healthy and stays there across listener reconciles - [x] Runner pod still spawns / picks up jobs / terminates as before 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 65666d9 commit c46b6f1

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

workloads/arc/arc-tf-application.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ spec:
3535
- name: runner
3636
image: ghcr.io/makeitworkcloud/tfroot-runner:latest
3737
command: ["/home/runner/run.sh"]
38-
# The gha-runner-scale-set controller mutates listener resources at runtime
39-
# (hash annotations, autoscaling spec). Ignore those drifts.
38+
# The gha-runner-scale-set controller creates the listener AutoscalingListener
39+
# and a paired Role/RoleBinding at runtime (named `<release>-<hash>-listener`),
40+
# then continually rotates hash annotations on them. None of these are in the
41+
# chart's rendered output. Ignore field-level drift, and rely on ServerSideApply
42+
# so ArgoCD doesn't try to manage fields the controller owns.
4043
ignoreDifferences:
4144
- group: actions.github.com
4245
kind: AutoscalingListener
@@ -48,9 +51,18 @@ spec:
4851
jsonPointers:
4952
- /metadata/annotations
5053
- /spec/template
54+
- group: rbac.authorization.k8s.io
55+
kind: Role
56+
jsonPointers:
57+
- /metadata/annotations
58+
- group: rbac.authorization.k8s.io
59+
kind: RoleBinding
60+
jsonPointers:
61+
- /metadata/annotations
5162
syncPolicy:
5263
automated:
5364
prune: true
5465
selfHeal: true
5566
syncOptions:
67+
- ServerSideApply=true
5668
- RespectIgnoreDifferences=true

0 commit comments

Comments
 (0)