Commit Graph
126 Commits
Author SHA1 Message Date
github-actions[bot]andGitHub 2a0641b57d chore(deps): update dependencies
Automated dependency update. All tests passed.
v0.10.15
2026-10-04 04:26:07 +00:00
lukaszraczylo 121535663d ci(deps): update dependencies with Renovate [skip ci] 2026-10-03 18:44:44 +01:00
lukaszraczyloandGitHub 42a13fde37 Update go.mod and go.sum (#87) v0.10.11 2026-10-03 04:29:11 +01:00
lukaszraczylo c8c1ddbcf0 fix(ci): replace broken setup-kind action
engineerd/setup-kind v0.6.2 fails with a missing dist/main/index.js file.
Use helm/kind-action instead.
v0.10.9
2026-10-02 04:11:26 +01:00
lukaszraczyloandGitHub 007cb0a1b7 Update go.mod and go.sum (#86) 2026-10-02 03:01:09 +01:00
lukaszraczyloandGitHub 766e18a2e7 Update go.mod and go.sum (#85) 2026-09-04 04:22:30 +01:00
lukaszraczyloandGitHub cac9c373fb Update go.mod and go.sum (#84) 2026-09-01 04:25:16 +01:00
lukaszraczylo 08bb0f985a fix(docker): declare ARG TARGETARCH so buildx cross-builds work
TARGETARCH was referenced but never declared, so every platform in a
multi-arch buildx run received an amd64 binary. The arm64 image
crashed on Raspberry Pi nodes with an exec format error.
v0.10.1
2026-08-29 13:54:07 +01:00
lukaszraczylo 14b61fa962 fix(docker): bump builder image to go 1.26
go.mod requires go >= 1.26.0 since the dependency updates, and the
golang alpine images set GOTOOLCHAIN=local, so the 1.25 builder failed
at go mod download.
v0.10.0
2026-08-29 13:50:16 +01:00
lukaszraczylo 8988893160 perf(controller): repair mirror drift from watch events instead of resync
Mirror update events were filtered out, so an in-place edit of a
mirrored copy was invisible to the controller. The periodic resync did
not catch it either: NeedsSync only compares the source content hash
with the recorded annotation, and tampered mirror data leaves both
unchanged.

Changes:
- The mirror watch now passes real update events (resourceVersion
  changed, object is a managed mirror) and maps them to the source.
  Informer resync replays keep an unchanged resourceVersion and stay
  filtered.
- reconcileMirror detects in-place drift by rebuilding the expected
  mirror in memory and comparing content hashes. Metadata differences
  never count as drift, so the controller's own writes converge in one
  no-op pass.
- The resync-period default moves from 10m to 1h. Watches now cover
  source changes, mirror deletion, mirror drift, and namespace changes,
  so the resync is only a safety net for missed watch events. The chart
  default moves with it.
- Add predicate and tamper-repair regression tests; drift repair is
  verified to make no direct apiserver reads.
2026-08-29 13:44:57 +01:00
lukaszraczylo eaa1246fb7 perf(controller): stop per-target apiserver reads in mirror reconcile
The mirror reconcile path issued one direct apiserver GET per target
namespace on every pass. With N sources and M target namespaces each
resync produced N*M GET requests. On a 65-namespace cluster this
generated 63 GET/s and overloaded one control-plane node.

Changes:
- reconcileMirror now trusts the informer cache. Content drift is
  detected via the source hash annotation. A stale resourceVersion
  makes Update return a conflict, which requeues the source.
- The verify-source-freshness flag now defaults to false. The Helm
  chart passes the value explicitly, so the chart default of false
  matches the binary behaviour.
- Reconcile performs one namespace LIST per pass. Target resolution
  and orphan cleanup share the result.
- Add load regression tests that count direct API reads in the
  reconcile hot path.
2026-08-29 13:44:54 +01:00
lukaszraczyloandGitHub 8c0bb0c5b0 Update go.mod and go.sum (#83) 2026-08-29 04:20:19 +01:00
lukaszraczyloandGitHub 198c6c8492 Update go.mod and go.sum (#82) 2026-08-27 05:58:26 +01:00
lukaszraczyloandGitHub 3df05913ed Update go.mod and go.sum (#81) 2026-08-26 04:27:17 +01:00
lukaszraczyloandGitHub 53075d8914 Update go.mod and go.sum (#80) 2026-08-22 04:22:15 +01:00
lukaszraczyloandGitHub 23b164e731 Update go.mod and go.sum (#79) 2026-08-21 04:26:32 +01:00
lukaszraczyloandGitHub 8c09081914 Update go.mod and go.sum (#78) 2026-08-20 04:22:51 +01:00
lukaszraczyloandGitHub 5f4a5bf233 Update go.mod and go.sum (#77) 2026-08-18 04:21:51 +01:00
lukaszraczyloandGitHub 0285f9f62d Update go.mod and go.sum (#76) 2026-08-13 04:50:56 +01:00
lukaszraczyloandGitHub c23b3af4f9 Update go.mod and go.sum (#75) 2026-08-12 04:50:01 +01:00
lukaszraczyloandGitHub 58d7170742 Update go.mod and go.sum (#74) 2026-08-11 04:38:28 +01:00
lukaszraczyloandGitHub 6ad42ddf89 Update go.mod and go.sum (#73) 2026-07-28 06:54:43 +01:00
lukaszraczyloandGitHub 5b848b24ad Update go.mod and go.sum (#72) 2026-07-27 07:36:51 +01:00
lukaszraczyloandGitHub 6f880e7ade Update go.mod and go.sum (#71) 2026-07-25 06:48:17 +01:00
lukaszraczyloandGitHub ce4d3aff86 Update go.mod and go.sum (#70) 2026-07-23 07:08:06 +01:00
lukaszraczyloandGitHub 441b05def5 Update go.mod and go.sum (#69) 2026-07-22 06:57:07 +01:00
lukaszraczyloandGitHub 4c0af68f60 Update go.mod and go.sum (#68) 2026-07-21 06:58:04 +01:00
lukaszraczyloandGitHub a0e37ec5d8 Update go.mod and go.sum (#67) 2026-07-20 07:24:30 +01:00
lukaszraczyloandGitHub e0ff007e2a Update go.mod and go.sum (#66) 2026-07-19 07:05:12 +01:00
lukaszraczyloandGitHub 390e199ae0 Update go.mod and go.sum (#65) 2026-07-11 05:06:38 +01:00
lukaszraczyloandGitHub 5919e14c18 Update go.mod and go.sum (#64) 2026-07-09 05:25:57 +01:00
lukaszraczyloandGitHub fc97f34cea Update go.mod and go.sum (#63) 2026-07-08 05:08:51 +01:00
lukaszraczyloandGitHub fb1fa9e255 Update go.mod and go.sum (#62) 2026-07-07 05:26:55 +01:00
lukaszraczyloandGitHub ebb2365a88 Update go.mod and go.sum (#61) 2026-07-01 05:40:41 +01:00
lukaszraczyloandGitHub 3b9637bd37 Update go.mod and go.sum (#60) 2026-06-30 05:33:10 +01:00
lukaszraczyloandGitHub ae90f09aef Update go.mod and go.sum (#59) 2026-06-29 05:40:48 +01:00
lukaszraczyloandGitHub 8bcce1bff8 Update go.mod and go.sum (#58) 2026-06-28 05:38:46 +01:00
lukaszraczyloandGitHub 7ce5b71406 Update go.mod and go.sum (#57) 2026-06-27 05:28:30 +01:00
lukaszraczyloandGitHub 3a713a6388 Update go.mod and go.sum (#56) 2026-06-25 05:33:25 +01:00
lukaszraczyloandGitHub 8adec76ce8 Update go.mod and go.sum (#55) 2026-06-24 05:32:57 +01:00
lukaszraczylo 6a41222b34 docs: fix flag defaults, drop phantom annotations, add chart README
Correct two wrong CLI flag defaults (leader-elect, verify-source-freshness) and add missing flags/Helm values. Remove documented-but-nonexistent annotations (excluded-namespaces, namespace-pattern) that silently did nothing, document the real exclude/paused and glob targeting, fix the mirror ownership-check example, and add the missing charts/kubemirror/README.md that README linked to.
2026-06-21 13:27:00 +01:00
lukaszraczylo 28896ab1d6 fix(monitoring): match real controller label values in dashboards and alerts
kubemirror overrides controller names to <Kind>.<version>.<group> (e.g. Secret.v1.), but the dashboards, alerts, and recording rules filtered controller=~"secret|configmap" (the controller-runtime default name), so every panel and alert matched nothing. Switch all selectors to Secret.*|ConfigMap.* and document the naming convention.
2026-06-21 13:26:49 +01:00
lukaszraczylo 6d27d7dfe7 fix(cmd): log the actual build version on startup
The startup log hardcoded version="dev", so release builds always reported dev. Use the ldflags-set Version variable. Also modernise interface{} to any.
2026-06-21 13:26:41 +01:00
lukaszraczylo 330666336f feat(controller): add exclude and paused source annotations
exclude="true" opts a resource out of mirroring and tears down its existing mirrors; paused="true" freezes mirrors in place (no updates, no cleanup). Both respected by the source and namespace reconcilers. Also dedup target-namespace resolution via delegation, remove 8 unused annotation constants and their misleading godoc, and silence gosec G101 false positives on base64 test fixtures.
2026-06-21 13:26:33 +01:00
lukaszraczylo 3628929871 refactor(controller): extract shared mirror-deletion and naming helpers
Replace the triplicated ownership-verified delete guard with deleteOwnedMirror, and hand-built controller-name strings with gvkControllerName. Use constants.Domain/ControllerName over magic strings and maps.Copy/Clone for plain copy loops. Behaviour-preserving; tests green.
2026-06-21 13:26:23 +01:00
lukaszraczyloandGitHub c8ca8c41b6 Update go.mod and go.sum (#54) 2026-06-19 05:40:27 +01:00
lukaszraczyloandGitHub e5aa084c14 Update go.mod and go.sum (#53) 2026-06-18 05:38:47 +01:00
lukaszraczyloandGitHub 417258630a Update go.mod and go.sum (#52) 2026-06-13 05:37:25 +01:00
lukaszraczyloandGitHub 778be24c13 Update go.mod and go.sum (#51) v0.9.22 2026-06-11 05:37:49 +01:00
lukaszraczyloandGitHub d2b8ab4a2d Update go.mod and go.sum (#50) v0.9.20 2026-06-09 05:31:57 +01:00