Move the adapter binary to a separate subdir

This commit is contained in:
Lucas Käldström 2017-06-26 22:09:22 +03:00
parent 365c8fb112
commit a4aac78cca
No known key found for this signature in database
GPG key ID: 600FEFBBD0D40D21
4 changed files with 4 additions and 4 deletions

2
.gitignore vendored
View file

@ -1,4 +1,4 @@
*.swp
*~
vendor
adapter
./adapter

View file

@ -25,14 +25,14 @@ endif
all: docker-build
build:
CGO_ENABLED=0 GOARCH=$(ARCH) go build -a -tags netgo -o /build/adapter github.com/directxman12/k8s-prometheus-adapter/cmd
CGO_ENABLED=0 GOARCH=$(ARCH) go build -a -tags netgo -o /build/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter
docker-build:
cp deploy/Dockerfile $(TEMP_DIR)
cd $(TEMP_DIR) && sed -i "s|BASEIMAGE|$(BASEIMAGE)|g" Dockerfile
docker run -it -v $(TEMP_DIR):/build -v $(shell pwd):/go/src/github.com/directxman12/k8s-prometheus-adapter -e GOARCH=$(ARCH) golang:1.8 /bin/bash -c "\
CGO_ENABLED=0 go build -a -tags netgo -o /build/adapter github.com/directxman12/k8s-prometheus-adapter/cmd"
CGO_ENABLED=0 go build -a -tags netgo -o /build/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter"
docker build -t $(REGISTRY)/$(IMAGE)-$(ARCH):$(VERSION) $(TEMP_DIR)
sudo rm -r $(TEMP_DIR)

View file

@ -24,7 +24,7 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apiserver/pkg/util/logs"
"github.com/directxman12/k8s-prometheus-adapter/cmd/app"
"github.com/directxman12/k8s-prometheus-adapter/cmd/adapter/app"
)
func main() {