Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/coreos/go-systemd/v22 v22.3.1
github.com/cpuguy83/go-md2man v1.0.10
github.com/creack/pty v1.1.11
github.com/cri-o/ocicni v0.2.1-0.20210301205850-541cf7c703cf
github.com/cri-o/ocicni v0.2.1-0.20210623033107-4ea5fb8752cf
github.com/cyphar/filepath-securejoin v0.2.2
github.com/docker/distribution v2.7.1+incompatible
github.com/docker/go-units v0.4.0
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/cri-o/ocicni v0.2.1-0.20210301205850-541cf7c703cf h1:k2wrxBiBseRfOD7h+9fABEuesABBQuUuW5fWwpARbeI=
github.com/cri-o/ocicni v0.2.1-0.20210301205850-541cf7c703cf/go.mod h1:vingr1ztOAzP2WyTgGbpMov9dFhbjNxdLtDv0+PhAvY=
github.com/cri-o/ocicni v0.2.1-0.20210623033107-4ea5fb8752cf h1:2Ju8czUjjHavv6wIizDsCOvp2+d71o6VuM1VSwWfcuU=
github.com/cri-o/ocicni v0.2.1-0.20210623033107-4ea5fb8752cf/go.mod h1:vingr1ztOAzP2WyTgGbpMov9dFhbjNxdLtDv0+PhAvY=
github.com/cyphar/filepath-securejoin v0.2.2 h1:jCwT2GTP+PY5nBz3c/YL5PAIbusElVrPujOBSCj8xRg=
github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ=
Expand Down
1 change: 1 addition & 0 deletions server/sandbox_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ func (s *Server) newPodNetwork(sb *sandbox.Sandbox) (ocicni.PodNetwork, error) {
return ocicni.PodNetwork{
Name: sb.KubeName(),
Namespace: sb.Namespace(),
UID: sb.Metadata().UID,
Networks: []ocicni.NetAttachment{},
ID: sb.ID(),
NetNS: sb.NetNsPath(),
Expand Down
5 changes: 5 additions & 0 deletions test/cni_plugin_helper.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ for arg in "${array[@]}"; do
K8S_POD_NAMESPACE="${item[1]}"
elif [[ "${item[0]}" == "K8S_POD_NAME" ]]; then
K8S_POD_NAME="${item[1]}"
elif [[ "${item[0]}" == "K8S_POD_UID" ]]; then
K8S_POD_UID="${item[1]}"
fi
done

Expand All @@ -29,6 +31,8 @@ elif [[ -z "${K8S_POD_NAMESPACE}" ]]; then
exit 1
elif [[ -z "${K8S_POD_NAME}" ]]; then
exit 1
elif [[ -z "${K8S_POD_UID}" ]]; then
exit 1
fi

TEST_DIR=%TEST_DIR%
Expand All @@ -37,6 +41,7 @@ cat <<EOT >"$TEST_DIR/plugin_test_args.out"
FOUND_CNI_CONTAINERID="${CNI_CONTAINERID}"
FOUND_K8S_POD_NAMESPACE="${K8S_POD_NAMESPACE}"
FOUND_K8S_POD_NAME="${K8S_POD_NAME}"
FOUND_K8S_POD_UID="${K8S_POD_UID}"
EOT

# shellcheck disable=1090
Expand Down
1 change: 1 addition & 0 deletions test/network.bats
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function teardown() {
[ "$FOUND_CNI_CONTAINERID" != "podsandbox1" ]
[ "$FOUND_K8S_POD_NAMESPACE" = "redhat.test.crio" ]
[ "$FOUND_K8S_POD_NAME" = "podsandbox1" ]
[ "$FOUND_K8S_POD_UID" = "redhat-test-crio" ]
}

@test "Connect to pod hostport from the host" {
Expand Down
72 changes: 40 additions & 32 deletions vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions vendor/github.com/cri-o/ocicni/pkg/ocicni/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ github.com/cpuguy83/go-md2man/v2/md2man
# github.com/creack/pty v1.1.11
## explicit
github.com/creack/pty
# github.com/cri-o/ocicni v0.2.1-0.20210301205850-541cf7c703cf
# github.com/cri-o/ocicni v0.2.1-0.20210623033107-4ea5fb8752cf
## explicit
github.com/cri-o/ocicni/pkg/ocicni
# github.com/cyphar/filepath-securejoin v0.2.2
Expand Down