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

make plugins/ulimit-adjuster a separate module #54

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ PLUGINS := \
$(BIN_PATH)/device-injector \
$(BIN_PATH)/hook-injector \
$(BIN_PATH)/differ \
$(BIN_PATH)/ulimit-adjuster \
$(BIN_PATH)/v010-adapter \
$(BIN_PATH)/template

Expand Down Expand Up @@ -105,6 +106,10 @@ $(BIN_PATH)/differ: $(wildcard plugins/differ/*.go)
$(Q)echo "Building $@..."; \
cd $(dir $<) && $(GO_BUILD) -o $@ .

$(BIN_PATH)/ulimit-adjuster: $(wildcard plugins/ulimit-adjuster/*.go)
$(Q)echo "Building $@..."; \
cd $(dir $<) && $(GO_BUILD) -o $@ .

$(BIN_PATH)/v010-adapter: $(wildcard plugins/v010-adapter/*.go)
$(Q)echo "Building $@..."; \
cd $(dir $<) && $(GO_BUILD) -o $@ .
Expand Down Expand Up @@ -136,7 +141,7 @@ ginkgo-tests:
$(GO_CMD) tool cover -html=$(COVERAGE_PATH)/coverprofile -o $(COVERAGE_PATH)/coverage.html

test-ulimits:
$(Q)$(GO_TEST) -v ./plugins/ulimit-adjuster
$(Q)cd ./plugins/ulimit-adjuster && $(GO_TEST) -v

codecov: SHELL := $(shell which bash)
codecov:
Expand Down
2 changes: 1 addition & 1 deletion plugins/ulimit-adjuster/adjuster.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os"
"strings"

"github.com/containerd/containerd/log"
"github.com/containerd/log"
"github.com/sirupsen/logrus"
"sigs.k8s.io/yaml"

Expand Down
31 changes: 31 additions & 0 deletions plugins/ulimit-adjuster/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module github.com/containerd/nri/plugins/ulimit-adjuster

go 1.19

replace github.com/containerd/nri => ../..

require (
github.com/containerd/log v0.1.0
github.com/containerd/nri v0.0.0-00010101000000-000000000000
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.2
sigs.k8s.io/yaml v1.3.0
)

require (
github.com/containerd/ttrpc v1.1.1-0.20220420014843-944ef4a40df3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20220825212826-86290f6a00fb // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/net v0.1.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/text v0.4.0 // indirect
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
google.golang.org/grpc v1.47.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/cri-api v0.25.3 // indirect
)
Loading