-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sapcc/container-id
use container ID instead of pod UID when getting info from docker
- Loading branch information
Showing
7 changed files
with
75 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
sudo: required | ||
language: go | ||
services: | ||
- docker | ||
install: true | ||
|
||
script: make container test vet | ||
script: make container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,22 @@ | ||
FROM golang:1.11 | ||
|
||
WORKDIR /go/src/github.com/sapcc/kuberntes-oomkill-exporter | ||
ENV GO111MODULE=on \ | ||
CGOENABLED=0 | ||
ADD go.mod go.sum ./ | ||
RUN go mod download | ||
ADD cache/main.go . | ||
RUN go build -v -o /dev/null | ||
ADD . . | ||
RUN go build -v -o /kubernetes-oomkill-exporter | ||
RUN go test -v | ||
RUN go vet | ||
|
||
FROM alpine:3.8 | ||
LABEL maintainer="[email protected]" | ||
|
||
RUN apk --no-cache add ca-certificates | ||
COPY kubernetes-oomkill-exporter /kubernetes-oomkill-exporter | ||
COPY --from=0 /kubernetes-oomkill-exporter /kubernetes-oomkill-exporter | ||
|
||
ENTRYPOINT ["/kubernetes-oomkill-exporter"] | ||
CMD ["-logtostderr"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//This file is only used to speedup the docker build | ||
//We use this to download and compile the go module dependencies before adding our own source code. | ||
//See Dockerfile for more details | ||
|
||
package main | ||
|
||
import ( | ||
_ "flag" | ||
_ "net/http" | ||
_ "regexp" | ||
_ "strings" | ||
|
||
_ "docker.io/go-docker" | ||
_ "docker.io/go-docker/api/types" | ||
_ "github.com/golang/glog" | ||
_ "github.com/prometheus/client_golang/prometheus" | ||
_ "github.com/prometheus/client_golang/prometheus/promhttp" | ||
_ "golang.org/x/net/context" | ||
_ "k8s.io/node-problem-detector/pkg/systemlogmonitor/logwatchers/kmsg" | ||
_ "k8s.io/node-problem-detector/pkg/systemlogmonitor/logwatchers/types" | ||
) | ||
|
||
func main() { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters