45 lines
1.8 KiB
Diff
45 lines
1.8 KiB
Diff
From f7f84f78b3ec4d19e712404c80757f208a86b18a Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?=E5=B0=8F=E8=8D=89=E5=84=BF=E8=A6=81=E7=9D=A1=E8=A7=89?=
|
|
<18503470247@163.com>
|
|
Date: Wed, 4 Sep 2024 07:47:35 +0000
|
|
Subject: [PATCH 1/2] =?UTF-8?q?update=20pkg/podmanager/podmanager.go.=20?=
|
|
=?UTF-8?q?=E4=BF=AE=E5=A4=8Dpodmanager.go=E4=B8=ADeventToNRIRawContainers?=
|
|
=?UTF-8?q?=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AF=20toRawContainerPointer?=
|
|
=?UTF-8?q?=E7=9A=84=E5=85=A5=E5=8F=82=E5=BA=94=E4=B8=BAcontainer=20,conta?=
|
|
=?UTF-8?q?iners=E9=81=8D=E5=8E=86=E7=9A=84=E5=AD=90=E9=A1=B9=E4=B9=9F?=
|
|
=?UTF-8?q?=E5=BA=94=E8=AF=A5=E6=98=AFcontainer?=
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: 小草儿要睡觉 <18503470247@163.com>
|
|
---
|
|
pkg/podmanager/podmanager.go | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/pkg/podmanager/podmanager.go b/pkg/podmanager/podmanager.go
|
|
index d415018..17f95d3 100644
|
|
--- a/pkg/podmanager/podmanager.go
|
|
+++ b/pkg/podmanager/podmanager.go
|
|
@@ -173,13 +173,13 @@ func eventToNRIRawContainers(e typedef.Event) ([]*typedef.NRIRawContainer, error
|
|
if !ok {
|
|
return nil, fmt.Errorf("fail to get *typedef.NRIRawContainer which type is %T", e)
|
|
}
|
|
- toRawContainerPointer := func(pod nriapi.Container) *typedef.NRIRawContainer {
|
|
- tmp := typedef.NRIRawContainer(pod)
|
|
+ toRawContainerPointer := func(container nriapi.Container) *typedef.NRIRawContainer {
|
|
+ tmp := typedef.NRIRawContainer(container)
|
|
return &tmp
|
|
}
|
|
var pointerContainers []*typedef.NRIRawContainer
|
|
- for _, pod := range containers {
|
|
- pointerContainers = append(pointerContainers, toRawContainerPointer(*pod))
|
|
+ for _, container := range containers {
|
|
+ pointerContainers = append(pointerContainers, toRawContainerPointer(*container))
|
|
}
|
|
return pointerContainers, nil
|
|
}
|
|
--
|
|
2.46.0
|
|
|