diff --git a/Dockerfile b/Dockerfile index d51e3f47..9f24b0f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.11 +FROM golang:1.11 AS builder WORKDIR /go/src/github.com/sapcc/kuberntes-oomkill-exporter ENV GO111MODULE=on \ @@ -16,7 +16,7 @@ FROM alpine:3.8 LABEL maintainer="jan.knipper@sap.com" RUN apk --no-cache add ca-certificates -COPY --from=0 /kubernetes-oomkill-exporter /kubernetes-oomkill-exporter +COPY --from=builder /kubernetes-oomkill-exporter /kubernetes-oomkill-exporter ENTRYPOINT ["/kubernetes-oomkill-exporter"] CMD ["-logtostderr"] diff --git a/main.go b/main.go index c9f2b2c5..27412732 100644 --- a/main.go +++ b/main.go @@ -17,7 +17,7 @@ import ( ) var ( - kmesgRE = regexp.MustCompile("/pod(\\w+\\-\\w+\\-\\w+\\-\\w+\\-\\w+)/([a-f0-9]+) killed as a result of limit of /kubepods") + kmesgRE = regexp.MustCompile(`/pod(\w+-\w+-\w+-\w+-\w+)/([a-f0-9]+) killed as a result of limit of /kubepods`) ) var (