This repository was archived by the owner on Mar 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
cmd/prometheus-config-reloader Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1- FROM quay.io/prometheus/busybox:latest
1+ ARG ARCH="amd64"
2+ ARG OS="linux"
3+ FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest
24
35ADD operator /bin/operator
46
Original file line number Diff line number Diff line change 11SHELL =/bin/bash -o pipefail
22
3+ OS? =linux
4+ ARCH? =amd64
5+
36GO_PKG =github.com/coreos/prometheus-operator
47REPO? =quay.io/coreos/prometheus-operator
58REPO_PROMETHEUS_CONFIG_RELOADER? =quay.io/coreos/prometheus-config-reloader
@@ -39,7 +42,7 @@ K8S_GEN_DEPS:=.header
3942K8S_GEN_DEPS+ =$(TYPES_V1_TARGET )
4043K8S_GEN_DEPS+ =$(foreach bin,$(K8S_GEN_BINARIES ) ,$(FIRST_GOPATH ) /bin/$(bin ) )
4144
42- GO_BUILD_RECIPE=GOOS =linux CGO_ENABLED=0 go build -mod=vendor -ldflags="-s -X $(GO_PKG ) /pkg/version.Version=$(VERSION ) "
45+ GO_BUILD_RECIPE=GOOS =$( OS ) GOARCH= $( ARCH ) CGO_ENABLED=0 go build -mod=vendor -ldflags="-s -X $(GO_PKG ) /pkg/version.Version=$(VERSION ) "
4346pkgs = $(shell go list ./... | grep -v /vendor/ | grep -v /test/ | grep -v /contrib/)
4447
4548CONTAINER_CMD: =docker run --rm \
@@ -130,7 +133,7 @@ image: .hack-operator-image .hack-prometheus-config-reloader-image
130133# Create empty target file, for the sole purpose of recording when this target
131134# was last executed via the last-modification timestamp on the file. See
132135# https://www.gnu.org/software/make/manual/make.html#Empty-Targets
133- docker build -t $(REPO):$(TAG) .
136+ docker build --build-arg ARCH=$(ARCH) --build-arg OS=$(OS) - t $(REPO):$(TAG) .
134137 touch $@
135138
136139.hack-prometheus-config-reloader-image : cmd/prometheus-config-reloader/Dockerfile prometheus-config-reloader
Original file line number Diff line number Diff line change 1- FROM quay.io/prometheus/busybox:latest
1+ ARG ARCH="amd64"
2+ ARG OS="linux"
3+ FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest
24
35ADD prometheus-config-reloader /bin/prometheus-config-reloader
46
You can’t perform that action at this time.
0 commit comments