Commit Graph
4 Commits
Author SHA1 Message Date
chaosinthecrd 9a44f4f69c cmd/k8s-operator,k8s-operator/reconciler: requeue on optimistic lock errors
Reconcilers logged "optimistic lock error, retrying" with the full
conflict error at Info, and Connector, Recorder and ProxyGroup also put
it in their status. That reads like a failure, but a conflict between a
cached read and an update is expected and is retried. The reconcilers
also returned an empty result, so the retry only happened if a watch
event arrived. This fixes this by logging the conflict at Debug as an
update conflict, using a neutral status message and requeueing after a
short delay.

Updates #22074
Updates #18922

Signed-off-by: chaosinthecrd <[email protected]>
2026-11-05 15:27:01 +00:00
David Bond 2993b5e6de cmd/k8s-operator: move Recorder reconciler into its own package (#20891)
Move the Recorder reconciler and its object specs into
k8s-operator/reconciler/recorder, following the earlier ProxyClass,
DNSConfig and nameserver moves, and switch it to the shared finalizer,
resource tracker and CreateOrUpdate helpers.

Hoist two duplicated helpers into tailscaled.PrefsFromStateSecret and
reconciler.IsOptimisticLockError, and add
k8s-operator/reconciler/reconcilertest for the test helpers each package
had copied, including one fake Tailscale API client in place of four.

No behaviour change; the Recorder's watches and labels are untouched.

Fixes tailscale/corp#37086

Signed-off-by: David Bond <[email protected]>
2026-11-05 08:35:13 +00:00
Simon Law 37fc7a7a72 format using go fmt version 1.27.2 (#21838)
Updates #cleanup

Change-Id: I3b0987b431fa4c601b90a2763ce73eb24a7713ce

Signed-off-by: Simon Law <[email protected]>
2026-10-21 23:17:21 -07:00
David Bond 5e7f189e04 cmd/k8s-operator: move dnsrecords and nameserver into their own packages (#19696)
This commit moves the reconcilers for both the DNS nameserver and
DNSConfig custom resource into their own packages within
`k8s-operator/reconciler`

Closes: https://github.com/tailscale/corp/issues/37088

Signed-off-by: David Bond <[email protected]>
2026-08-12 19:55:16 +01:00