feat: add Go Kubernetes operator

This commit is contained in:
2026-08-13 02:19:14 +07:00
parent 31a2b8ef28
commit da6eafcae6
30 changed files with 3066 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
FROM golang:1.26 AS build
WORKDIR /workspace
COPY go.mod go.sum ./
RUN go mod download
COPY cmd/ cmd/
COPY api/ api/
COPY internal/ internal/
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o operator ./cmd
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=build /workspace/operator .
USER 65532:65532
ENTRYPOINT ["/operator"]