Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PORT-5940 fix k 8 s exporter binaries for amd #33

Merged
merged 17 commits into from
Jan 3, 2024
3 changes: 2 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ dockers:
- image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-amd64"
use: buildx
dockerfile: Dockerfile
dockerfile: Dockerfile.x86_64
goarch: amd64
build_flag_templates:
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM gcr.io/distroless/static-debian11
FROM alpine

COPY assets/ /assets

USER nonroot:nonroot

ENTRYPOINT ["/usr/bin/port-k8s-exporter"]

COPY port-k8s-exporter /usr/bin/port-k8s-exporter
9 changes: 9 additions & 0 deletions Dockerfile.x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM alpine

COPY assets/ /assets

RUN apk add gcompat

ENTRYPOINT ["/usr/bin/port-k8s-exporter"]

COPY port-k8s-exporter /usr/bin/port-k8s-exporter
2 changes: 1 addition & 1 deletion pkg/event_handler/consumer/consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func TestConsumer_HandleJson(t *testing.T) {
f.Consume(mockHandler.HandleJson)

f.Produce(t, []byte("test-value"))
time.Sleep(time.Second)
time.Sleep(time.Second * 2)

if len(mockHandler.CapturedValue) == 0 {
t.Error("Handler was not called")
Expand Down