Skip to content

Commit

Permalink
chore: bump some dependencies and build docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
palmerabollo committed Jan 4, 2022
1 parent 92182ca commit 4c98a54
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.17.3-alpine as build
FROM golang:1.17.5-alpine3.15 as build
WORKDIR /src/prometheus-kafka-adapter

COPY go.mod go.sum vendor *.go ./
Expand All @@ -8,7 +8,7 @@ ADD . /src/prometheus-kafka-adapter
RUN apk add --no-cache gcc musl-dev
RUN go build -ldflags='-w -s -extldflags "-static"' -tags musl,static,netgo -mod=vendor -o /prometheus-kafka-adapter

FROM alpine:3.14
FROM alpine:3.15

COPY schemas/metric.avsc /schemas/metric.avsc
COPY --from=build /prometheus-kafka-adapter /
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ test:
docker run --rm -v $(CURDIR):/app:z -w /app golang:$(MUSL_GO_VER) sh tools/testscript.sh vet
docker run --rm -v $(CURDIR):/app:z -w /app golang:$(MUSL_GO_VER) sh tools/testscript.sh test

build: build-libc build-musl
build: build-libc build-musl build-docker-image

build-libc:
docker run --rm -v $(CURDIR):/app:z -w /app golang:$(LIBC_GO_VER) sh tools/buildscript.sh $(NAME)

build-musl:
docker run --rm -v $(CURDIR):/app:z -w /app golang:$(MUSL_GO_VER) sh tools/buildscript.sh $(NAME)

build-docker-image:
docker build -t telefonica/prometheus-kafka-adapter:latest .

vendor-update:
rm -rf go.mod go.sum vendor/
docker run --rm -v $(CURDIR):/app:z -w /app golang:$(MUSL_GO_VER) go mod init $(PACKAGE_NAME)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The Avro-JSON serialization is the same. See the [Avro schema](./schemas/metric.

### prometheus-kafka-adapter

There is a docker image `telefonica/prometheus-kafka-adapter:1.7.0` [available on Docker Hub](https://hub.docker.com/r/telefonica/prometheus-kafka-adapter/).
There is a docker image `telefonica/prometheus-kafka-adapter:1.8.0` [available on Docker Hub](https://hub.docker.com/r/telefonica/prometheus-kafka-adapter/).

Prometheus-kafka-adapter listens for metrics coming from Prometheus and sends them to Kafka. This behaviour can be configured with the following environment variables:

Expand Down

0 comments on commit 4c98a54

Please sign in to comment.