Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8a4118a
feat(etcdmirror): add EtcdMirror CRD Go types and CEL validation
xrl Jul 1, 2026
9144c19
feat(etcdmirror): rework API per adversarial cross-cloud review
xrl Jul 4, 2026
2b382ff
feat(etcdmirror): add mirroragent replication engine (Design 3)
xrl Jul 4, 2026
f837309
test(etcdmirror): deflake the resync-loop latch clear phase
xrl Jul 7, 2026
6e1ee69
feat(etcdmirror): wire the periodic reconciliation scheduler
xrl Jul 7, 2026
43e41de
fix(etcdmirror): address rung-3 review findings
xrl Jul 7, 2026
982c926
feat(etcdmirror): expose statusz/metrics observability surface on Sna…
xrl Jul 7, 2026
7009dda
feat(etcdmirror): add the mirror-agent binary
xrl Jul 7, 2026
a7a594b
fix(etcdmirror): address rung-4 review findings
xrl Jul 7, 2026
dbada1b
test(etcdmirror): kind e2e smoke test for the mirror-agent binary
xrl Jul 7, 2026
0fe9160
feat(etcdmirror): add scanRestartCount and controller event constants
xrl Jul 7, 2026
a37486d
feat(etcdmirror): expose typed error reason and learner flags on Snap…
xrl Jul 7, 2026
221db62
feat(etcdmirror): add the EtcdMirror controller workload
xrl Jul 7, 2026
4aeafb6
fix(etcdmirror): address rung-5 review findings
xrl Jul 8, 2026
dbeba05
fix(etcdmirror): readable TLS mounts for the non-root agent; events.k…
xrl Jul 8, 2026
63a5b99
feat(etcdmirror): rbac roles and kustomize wiring
xrl Jul 8, 2026
300b014
fix(etcdmirror): record the EtcdMirror resource in PROJECT
xrl Jul 8, 2026
30f1775
feat(etcdmirror): controller-side metrics, alerts and dashboard
xrl Jul 8, 2026
0b898e2
fix(etcdmirror): address rung-7 review findings
xrl Jul 8, 2026
60e3807
feat(etcdmirror): pass --mirror-agent-image in e2e deploy mode
xrl Jul 8, 2026
2b1aa5a
test(etcdmirror): full-lifecycle kind e2e suite
xrl Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ COPY go.sum go.sum
RUN go mod download

# Copy the go source
COPY cmd/main.go cmd/main.go
COPY cmd/ cmd/
COPY api/ api/
COPY internal/ internal/
COPY pkg/ pkg/
Expand All @@ -23,12 +23,14 @@ COPY pkg/ pkg/
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o mirror-agent ./cmd/mirror-agent

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot@sha256:963fa6c544fe5ce420f1f54fb88b6fb01479f054c8056d0f74cc2c6000df5240
WORKDIR /
COPY --from=builder /workspace/manager .
COPY --from=builder /workspace/mirror-agent .
USER 65532:65532

ENTRYPOINT ["/manager"]
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,14 @@ test: manifests generate fmt vet envtest ## Run tests.
# Prometheus and CertManager are installed by default; skip with:
# - PROMETHEUS_INSTALL_SKIP=true
# - CERT_MANAGER_INSTALL_SKIP=true
# Explicit -timeout: the features' worst-case wait ceilings sum past the go-test default of 10m,
# and the EtcdMirror lifecycle scenarios push the sum past 30m. A pathologically slow run can
# still exceed 75m while every wait is inside its ceiling; go-test then panics with no teardown
# or diagnostics. Reruns self-heal (each feature Setup purges its leftover namespace), but the
# kind cluster leaks — delete it manually.
.PHONY: test-e2e
test-e2e: generate fmt vet kind gofail-enable ## Run the e2e tests. Expected an isolated environment using Kind.
ETCD_VERSION="$(E2E_ETCD_VERSION)" PATH="$(LOCALBIN):$(PATH)" go test ./test/e2e/ -v
ETCD_VERSION="$(E2E_ETCD_VERSION)" PATH="$(LOCALBIN):$(PATH)" go test ./test/e2e/ -v -timeout 75m
$(MAKE) gofail-disable

.PHONY: gofail-enable
Expand Down Expand Up @@ -125,8 +130,9 @@ verify: verify-mod-tidy lint ## Run static checks against the code.
##@ Build

.PHONY: build
build: manifests generate fmt vet ## Build manager binary.
build: manifests generate fmt vet ## Build manager and mirror-agent binaries.
go build -o bin/manager cmd/main.go
go build -o bin/mirror-agent ./cmd/mirror-agent

.PHONY: run
run: manifests generate fmt vet ## Run a controller from your host.
Expand Down
9 changes: 9 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@ resources:
kind: EtcdCluster
path: go.etcd.io/etcd-operator/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: etcd.io
group: operator
kind: EtcdMirror
path: go.etcd.io/etcd-operator/api/v1alpha1
version: v1alpha1
version: "3"
953 changes: 953 additions & 0 deletions api/v1alpha1/etcdmirror_types.go

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions api/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func addKnownTypes(s *runtime.Scheme) error {
s.AddKnownTypes(GroupVersion,
&EtcdCluster{},
&EtcdClusterList{},
&EtcdMirror{},
&EtcdMirrorList{},
)
metav1.AddToGroupVersion(s, GroupVersion)
return nil
Expand Down
Loading