Skip to content

Commit

Permalink
Real initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mnitchev committed Dec 14, 2023
1 parent 76443a0 commit 4126b57
Show file tree
Hide file tree
Showing 60 changed files with 1,484 additions and 2,770 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore build and test binaries.
bin/
testbin/
28 changes: 25 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
bin
testbin/*
Dockerfile.cross

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Kubernetes Generated files - skip generated files, except for vendored files

!vendor/**/zz_generated.*

# editor and IDE paraphernalia
.idea
*.swp
TODO
/template-operator
!vendor/**
*.swo
*~
10 changes: 0 additions & 10 deletions CHANGELOG.md

This file was deleted.

4 changes: 0 additions & 4 deletions CODEOWNERS

This file was deleted.

36 changes: 0 additions & 36 deletions DCO

This file was deleted.

27 changes: 23 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
FROM alpine:3.14.1
# Build the manager binary
FROM golang:1.21 as builder

RUN apk add --no-cache ca-certificates
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download

ADD ./template-operator /template-operator
# Copy the go source
COPY main.go main.go
COPY controllers/ controllers/

ENTRYPOINT ["/template-operator"]
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go

# 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
WORKDIR /
COPY --from=builder /workspace/manager .
USER 65532:65532

ENTRYPOINT ["/manager"]
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

Loading

0 comments on commit 4126b57

Please sign in to comment.