Skip to content

Shredder/rewrite reflector ctrl runtime - #703

Closed
sorend wants to merge 7 commits into
emberstack:mainfrom
sorend:shredder/rewrite-reflector-ctrl-runtime
Closed

Shredder/rewrite reflector ctrl runtime#703
sorend wants to merge 7 commits into
emberstack:mainfrom
sorend:shredder/rewrite-reflector-ctrl-runtime

Conversation

@sorend

@sorend sorend commented Aug 28, 2026

Copy link
Copy Markdown

No description provided.

bdusad and others added 7 commits August 28, 2026 08:04
Complete rewrite of the kubernetes-reflector from C# .NET 10 to Go 1.24.

All annotation semantics, reflection logic, env var names, and health
endpoints are preserved so the Helm chart works without changes.

New source: src/reflector/
- cmd/reflector/main.go       — entry point, watchers, health server
- internal/annotations/       — annotation constants
- internal/config/            — env-var config (same names as C# helm vars)
- internal/glob/              — excluded-namespace glob matching
- internal/selector/          — Kubernetes label selector parsing
- internal/mirror/            — ResourceMirror reconciliation engine

Build: go build ./...
Test:  go test ./...  (32 tests, 0 failures)

Legacy C# source preserved on this branch; delete when satisfied.
See SHREDDER_REPORT.md for full migration details.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Deleted src/ES.Kubernetes.Reflector/ (C# source)
- Deleted tests/ES.Kubernetes.Reflector.Tests/ (C# tests)
- Deleted .sln, .props, NuGet.config, Shared.DotSettings
- Updated .dockerignore for Go project

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace raw client-go watch loops with ctrl.Manager + generic ResourceReconciler[T]
- ResourceOps[T] interface for Secret/ConfigMap type-specific ops
- Field indexers (reflects-source, is-auto-source) for efficient lookups
- Namespace watch via EnqueueRequestsFromMapFunc + label-change predicate
- client.MergeFrom patches for zero-diff updates
- Health probes via ctrl.Manager built-in (/healthz, /readyz)
- Collapse internal/glob and internal/selector into internal/mirror package
- Ginkgo v2 + Gomega fake-client tests replacing table-driven tests
- Update Helm chart health probe paths: /health/live -> /healthz, /health/ready -> /readyz
- go build ./... and go test ./... pass

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace 280-line multi-stage pipeline with lean 2-job CI (test + build)
- Output image: ghcr.io/sorend/kubernetes-reflector
- Auth via GITHUB_TOKEN (no PAT required)
- Tags: sha-XXXXXXX on every branch push, plus 'latest' on main
- Drop: gitversion, QEMU/multi-arch, DockerHub, Helm packaging, release job
- Dockerfile: use fully-qualified base image names for Podman compatibility
- Helm values: update image repository to ghcr.io/sorend/kubernetes-reflector
- dependabot.auto.yaml: switch from ES_GITHUB_PAT to GITHUB_TOKEN

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sorend sorend closed this Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant