mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
Move the adapter binary to a separate subdir
This commit is contained in:
parent
365c8fb112
commit
a4aac78cca
4 changed files with 4 additions and 4 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,4 +1,4 @@
|
|||
*.swp
|
||||
*~
|
||||
vendor
|
||||
adapter
|
||||
./adapter
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
Loading…
Add table
Add a link
Reference in a new issue