Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Makefile and friends: move webhook related files to hack/webhook and …
…Kubernetes files to kubernetes/

The Makefile now has targets to build both shipper and
shipper-state-metrics. Paths of supporting files have been adjusted as
well.
  • Loading branch information
Igor Sutton authored and parhamdoustdar committed Apr 29, 2019
1 parent 40428ae commit f4ca693
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions Makefile
@@ -1,20 +1,28 @@
SHIPPER_NAMESPACE = shipper-system
KUBECTL = kubectl -n $(SHIPPER_NAMESPACE)

build:
GOARCH=amd64 CGO_ENABLED=0 GOOS=linux go build -o shipper cmd/shipper/main.go
docker build -f Dockerfile.shipper -t localhost:32000/shipper:latest --build-arg BASE_IMAGE=alpine:3.8 --build-arg HTTP_PROXY=$(HTTP_PROXY) --build-arg HTTPS_PROXY=$(HTTPS_PROXY) .
.PHONY: shipper

shipper:
GOARCH=amd64 CGO_ENABLED=0 GOOS=linux go build -o build/shipper ./cmd/shipper/*.go
docker build -f Dockerfile.shipper -t localhost:32000/shipper:latest --build-arg HTTP_PROXY=$(HTTP_PROXY) --build-arg HTTPS_PROXY=$(HTTPS_PROXY) .
docker push localhost:32000/shipper:latest

shipper-state-metrics:
GOARCH=amd64 CGO_ENABLED=0 GOOS=linux go build -o build/shipper-state-metrics ./cmd/shipper-state-metrics/*.go
docker build -f Dockerfile.metrics -t localhost:32000/shipper-state-metrics:latest --build-arg HTTP_PROXY=$(HTTP_PROXY) --build-arg HTTPS_PROXY=$(HTTPS_PROXY) .
docker push localhost:32000/shipper-state-metrics:latest

restart:
$(KUBECTL) get po -o jsonpath='{.items[*].metadata.name}' | xargs $(KUBECTL) delete po

certs:
./webhook-create-signed-cert.sh --namespace $(SHIPPER_NAMESPACE)
./hack/webhook/webhook-create-signed-cert.sh --namespace $(SHIPPER_NAMESPACE)

install:
$(KUBECTL) apply -f shipper.service.yaml
$(KUBECTL) apply -f shipper.deployment.yaml
$(KUBECTL) apply -f kubernetes/shipper.service.yaml
$(KUBECTL) apply -f kubernetes/shipper.deployment.yaml
cat kubernetes/validating-webhook-configuration.yaml | hack/webhook/webhook-patch-ca-bundle.sh | $(KUBECTL) apply -f -

logs:
$(KUBECTL) get po -o jsonpath='{.items[*].metadata.name}' | xargs $(KUBECTL) logs --follow
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f4ca693

Please sign in to comment.