Skip to content

Commit cc59711

Browse files
committed
Fix image, readme
1 parent 9d24ac8 commit cc59711

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
FROM golang:1.11 AS builder
1+
FROM golang:1.16-alpine3.13 AS builder
22

33
WORKDIR /go/src/github.com/sapcc/kuberntes-oomkill-exporter
4-
ENV GO111MODULE=on \
5-
CGOENABLED=0
64
ADD go.mod go.sum ./
75
RUN go mod download
86
ADD cache/main.go .
97
RUN go build -v -o /dev/null
108
ADD . .
11-
RUN go build -v -o /kubernetes-oomkill-exporter
12-
RUN go test -v
13-
RUN go vet
9+
RUN CGOENABLED=0 go build -v -o /kubernetes-oomkill-exporter
1410

15-
FROM alpine:3.8
11+
FROM alpine:3.13
1612
LABEL maintainer="jan.knipper@sap.com"
13+
LABEL source_repository="https://github.com/sapcc/kubernetes-oomkill-exporter"
1714

1815
RUN apk --no-cache add ca-certificates
1916
COPY --from=builder /kubernetes-oomkill-exporter /kubernetes-oomkill-exporter

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
TARGET = kubernetes-oomkill-exporter
22
GOTARGET = github.com/sapcc/$(TARGET)
33
REGISTRY ?= sapcc
4-
VERSION ?= 0.3.0
4+
VERSION ?= 0.3.1
55
IMAGE = $(REGISTRY)/$(BIN)
66
DOCKER ?= docker
77

88
all: container
99

1010
container:
11-
$(DOCKER) build -t $(REGISTRY)/$(TARGET):latest -t $(REGISTRY)/$(TARGET):$(VERSION) .
11+
$(DOCKER) build --network=host -t $(REGISTRY)/$(TARGET):latest -t $(REGISTRY)/$(TARGET):$(VERSION) .
1212

1313
push:
1414
$(DOCKER) push $(REGISTRY)/$(TARGET):latest

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
----
88

9-
kubernetes-oomkill-exporter is parsing kernel log for killed pods, collects information like namespace from docker and exposes them in a metric.
9+
kubernetes-oomkill-exporter is parsing kernel log for killed pods, collects information like namespace from docker and exposes them in a metric. It can be deployed as a `DaemonSet` to run on every node in your cluster, see [here for an example](yaml/oomkill-exporter.yaml). Exported metric is called `klog_pod_oomkill` and counts the amount of oomkills of a certain pod.
10+
11+
1012

1113
## License
1214
This project is licensed under the Apache2 License - see the [LICENSE](LICENSE) file for details

yaml/oomkill-exporter.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ spec:
1818
spec:
1919
containers:
2020
- name: oomkill-exporter
21-
image: sapcc/kubernetes-oomkill-exporter:latest
22-
imagePullPolicy: Always
21+
image: sapcc/kubernetes-oomkill-exporter:0.3.1
22+
imagePullPolicy: IfNotPresent
2323
args:
2424
- -logtostderr
2525
- -v=5
@@ -44,10 +44,13 @@ spec:
4444
ports:
4545
- name: metrics
4646
containerPort: 9102
47+
tolerations:
48+
- operator: Exists
4749
volumes:
4850
- name: kmsg
4951
hostPath:
5052
path: /dev/kmsg
5153
- name: docker
5254
hostPath:
5355
path: /var/run/docker.sock
56+

0 commit comments

Comments
 (0)