From e91cd9341bb429678e10baa644cc2a48db551caf Mon Sep 17 00:00:00 2001 From: Jim Bugwadia Date: Wed, 22 May 2019 21:41:24 -0700 Subject: [PATCH] - add Makefile - add Dockerfile - update install.yaml --- .gitignore | 2 -- Dockerfile | 3 +++ Makefile | 24 ++++++++++++++++++++++++ definitions/install.yaml | 3 +-- 4 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 Dockerfile create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 34e24f4af7..e737726cce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ certs Gopkg.lock -Dockerfile .vscode gh-pages/public -/cmd/kyverno/kyverno diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..edb70fb2a7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +ADD kyverno /kyverno +ENTRYPOINT ["/kyverno"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..98128083a1 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +.DEFAULT_GOAL: build +PACKAGE ?=github.com/nirmata/kyverno +MAIN ?=$(PACKAGE) +LD_FLAGS ="-s -w" + +REPO=nirmata/kyverno +TAG=0.1 + +build: + GOOS=linux go build -ldflags=$(LD_FLAGS) $(MAIN) + +local: + go build -ldflags=$(LD_FLAGS) $(MAIN) + +image: + docker build -t $(REPO):$(TAG) . + docker tag $(REPO):$(TAG) $(REPO):latest + +push: + docker push $(REPO):$(TAG) + docker push $(REPO):latest + +clean: + go clean diff --git a/definitions/install.yaml b/definitions/install.yaml index a598c8f110..6010049ffb 100644 --- a/definitions/install.yaml +++ b/definitions/install.yaml @@ -187,5 +187,4 @@ spec: - containerPort: 443 securityContext: privileged: true - imagePullSecrets: - - name: docker-registry-key +