Skip to content

Add working example usage #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -347,3 +347,6 @@ __pycache__/

# always include vendor directory
!/vendor/**

# ignore example cert-controller binary
cert-controller
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM golang:1.14-alpine AS builder
WORKDIR /go/src/github.com/open-policy-agent/cert-controller

RUN apk add git

ENV CGO_ENABLED 0
COPY go.mod go.sum ./
RUN go mod download

COPY pkg pkg
COPY main.go ./
RUN go build -o cert-controller main.go

FROM scratch
WORKDIR /app

COPY --from=builder /go/src/github.com/open-policy-agent/cert-controller/cert-controller .
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

USER 1000:1000

ENTRYPOINT ["/app/cert-controller", "-cert-restart-on-secret-refresh"]
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ module github.com/open-policy-agent/cert-controller
go 1.14

require (
github.com/go-logr/zapr v0.1.0
github.com/onsi/gomega v1.10.2
github.com/open-policy-agent/cert-controller v0.1.0
github.com/pkg/errors v0.9.1
go.uber.org/atomic v1.6.0
go.uber.org/zap v1.10.0
k8s.io/api v0.19.2
k8s.io/apimachinery v0.19.2
k8s.io/client-go v0.19.2
Expand Down
Loading