Shredder/rewrite reflector ctrl runtime - #703
Closed
sorend wants to merge 7 commits into
Closed
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.