mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-06 01:38:10 +00:00
Merge pull request #8 from luxas/move_cmd
Move the adapter binary to a separate subdir
This commit is contained in:
commit
6f4f0ea2f9
4 changed files with 4 additions and 4 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
*.swp
|
*.swp
|
||||||
*~
|
*~
|
||||||
vendor
|
vendor
|
||||||
adapter
|
./adapter
|
||||||
|
|
|
||||||
4
Makefile
4
Makefile
|
|
@ -25,14 +25,14 @@ endif
|
||||||
|
|
||||||
all: docker-build
|
all: docker-build
|
||||||
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:
|
docker-build:
|
||||||
cp deploy/Dockerfile $(TEMP_DIR)
|
cp deploy/Dockerfile $(TEMP_DIR)
|
||||||
cd $(TEMP_DIR) && sed -i "s|BASEIMAGE|$(BASEIMAGE)|g" Dockerfile
|
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 "\
|
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)
|
docker build -t $(REGISTRY)/$(IMAGE)-$(ARCH):$(VERSION) $(TEMP_DIR)
|
||||||
sudo rm -r $(TEMP_DIR)
|
sudo rm -r $(TEMP_DIR)
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import (
|
||||||
"k8s.io/apimachinery/pkg/util/wait"
|
"k8s.io/apimachinery/pkg/util/wait"
|
||||||
"k8s.io/apiserver/pkg/util/logs"
|
"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() {
|
func main() {
|
||||||
Loading…
Add table
Add a link
Reference in a new issue