Skip to content

Commit

Permalink
Add nri-memtierd plugin
Browse files Browse the repository at this point in the history
The nri-memtierd plugin toggles swapping, starts/stops memtierd
processes that track and manage memory of containers.

Signed-off-by: Antti Kervinen <[email protected]>
Signed-off-by: Luukas Makila <[email protected]>
  • Loading branch information
askervin committed Sep 29, 2023
1 parent 90dc2e5 commit b36f651
Show file tree
Hide file tree
Showing 11 changed files with 1,180 additions and 1 deletion.
26 changes: 26 additions & 0 deletions cmd/plugins/memtierd/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ARG GO_VERSION=1.20

FROM golang:${GO_VERSION}-bullseye as builder

WORKDIR /go/builder

RUN GOBIN=/bin go install -tags osusergo,netgo -ldflags "-extldflags=-static" github.com/intel/memtierd/cmd/memtierd@c67204d6af3e5f64cd396f1c29aafa729e4363ba

# Fetch go dependencies in a separate layer for caching
COPY go.mod go.sum ./
COPY pkg/topology/ pkg/topology/
RUN go mod download

# Build nri-memtierd
COPY . .

RUN make clean
RUN make PLUGINS=nri-memtierd build-plugins-static

FROM gcr.io/distroless/static
ENV PATH=/bin

COPY --from=builder /go/builder/build/bin/nri-memtierd /bin/nri-memtierd
COPY --from=builder /bin/memtierd /bin/memtierd

ENTRYPOINT ["/bin/nri-memtierd", "--idx", "45"]
Loading

0 comments on commit b36f651

Please sign in to comment.