Commit Graph
4 Commits
Author SHA1 Message Date
chaosinthecrd b76d891d98 cmd/k8s-operator,k8s-operator: test proxy liveness and readiness probes
Covers the ProxyClass probe defaults and overrides, the env cases that skip or
move the probes, probes on ProxyGroup proxies, and rejecting probes on the
init container or with an env that leaves the endpoints unreachable.

Updates tailscale/corp#38175

Signed-off-by: chaosinthecrd <[email protected]>
2026-11-19 13:17:44 +00:00
chaosinthecrd 31652c9978 cmd/k8s-operator,k8s-operator/reconciler: move metrics handling to tailscaled
The metrics Service and ServiceMonitor handling lived in cmd/k8s-operator,
and the ProxyClass reconciler kept its own copy of the ServiceMonitor CRD
check, so reconcilers in k8s-operator/reconciler could not share it. This
moves it into the tailscaled package as EnsureMetricsResources and
EnsureMetricsResourcesDeleted, which take the proxy type and parent, and
switches cmd/k8s-operator and the ProxyClass reconciler over to it. No
behaviour change.

Updates #22034

Signed-off-by: chaosinthecrd <[email protected]>
2026-11-05 17:22:05 +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
David Bond eaf1b56ffe cmd/k8s-operator: move proxyclass reconciler into its own package (#19695)
This commit moves the proxyclass reconciliation logic from its original
home in the rather large main package of the k8s-operator to a dedicated
package within `k8s-operator/reconciler/proxyclass`.

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

Signed-off-by: David Bond <[email protected]>
2026-07-30 11:37:54 +01:00