-
Notifications
You must be signed in to change notification settings - Fork 950
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
fix: kata: workaround passthru net mode when get pod ip #2437
fix: kata: workaround passthru net mode when get pod ip #2437
Conversation
Signed-off-by: Ace-Tang <aceapril@126.com>
Codecov Report
|
@@ -608,6 +614,10 @@ func (c *CriManager) PodSandboxStatus(ctx context.Context, r *runtime.PodSandbox | |||
} | |||
} | |||
|
|||
if v, exist := annotations[passthruKey]; exist && v == "true" { | |||
ip = annotations[passthruIP] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to check the existence of passthruIP
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
passthruIP
can be empty string?
Do we need to fix cri/v1alpha1/cri.go? This fixes v1alpha2. |
LGTM |
v1alpha1 is deprecated. We won't provide the maintenance. |
@@ -74,6 +74,12 @@ const ( | |||
|
|||
// networkNotReadyReason is the reason reported when network is not ready. | |||
networkNotReadyReason = "NetworkPluginNotReady" | |||
|
|||
// passthruKey to specify whether a interface is passthru to qemu | |||
passthruKey = "io.alibaba.pouch.runv.passthru" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
io.alibaba.pouch.runv.passthru
or io.alibaba.pouch.vm.passthru
? @Ace-Tang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, should be io.alibaba.pouch.vm.passthru
, could you like help to fix this ? @flyer103
Signed-off-by: Ace-Tang aceapril@126.com
Ⅰ. Describe what this PR did
kata: workaround passthru net mode when get pod ip
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews
cherry-pick