Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f1b2f33
feat(etcdmirror): add EtcdMirror CRD Go types and CEL validation
xrl Jul 1, 2026
b012a2c
feat(etcdmirror): rework API per adversarial cross-cloud review
xrl Jul 4, 2026
ed0a0e0
feat(etcdmirror): add mirroragent replication engine (Design 3)
xrl Jul 4, 2026
dd1f83d
test(etcdmirror): deflake the resync-loop latch clear phase
xrl Jul 7, 2026
d597221
feat(etcdmirror): wire the periodic reconciliation scheduler
xrl Jul 7, 2026
adcdde4
fix(etcdmirror): address rung-3 review findings
xrl Jul 7, 2026
8cc8729
feat(etcdmirror): expose statusz/metrics observability surface on Sna…
xrl Jul 7, 2026
f04b823
feat(etcdmirror): add the mirror-agent binary
xrl Jul 7, 2026
2f4f094
fix(etcdmirror): address rung-4 review findings
xrl Jul 7, 2026
8799f2d
test(etcdmirror): kind e2e smoke test for the mirror-agent binary
xrl Jul 7, 2026
1884893
feat(etcdmirror): add scanRestartCount and controller event constants
xrl Jul 7, 2026
131e909
feat(etcdmirror): expose typed error reason and learner flags on Snap…
xrl Jul 7, 2026
096d7cc
feat(etcdmirror): add the EtcdMirror controller workload
xrl Jul 7, 2026
c9f687a
fix(etcdmirror): address rung-5 review findings
xrl Jul 8, 2026
7581a61
fix(etcdmirror): readable TLS mounts for the non-root agent; events.k…
xrl Jul 8, 2026
76a7421
feat(etcdmirror): rbac roles and kustomize wiring
xrl Jul 8, 2026
9a1909f
fix(etcdmirror): record the EtcdMirror resource in PROJECT
xrl Jul 8, 2026
a4f57b9
feat(etcdmirror): controller-side metrics, alerts and dashboard
xrl Jul 8, 2026
04ffb68
fix(etcdmirror): address rung-7 review findings
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"]
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ 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.
.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 30m
$(MAKE) gofail-disable

.PHONY: gofail-enable
Expand Down Expand Up @@ -125,8 +126,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