-
Notifications
You must be signed in to change notification settings - Fork 312
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
feature: support pod skip runtime hook with specified label #682
feature: support pod skip runtime hook with specified label #682
Conversation
Codecov ReportBase: 68.43% // Head: 68.45% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #682 +/- ##
==========================================
+ Coverage 68.43% 68.45% +0.02%
==========================================
Files 208 208
Lines 24002 24011 +9
==========================================
+ Hits 16425 16437 +12
+ Misses 6432 6429 -3
Partials 1145 1145
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
also need to update charts of koordlet |
what about the containerd part? |
cfgBody.HostConfig = UpdateHostConfigByResource(cfgBody.HostConfig, resp.ContainerResources) | ||
containerInfo.ContainerResources = resp.ContainerResources | ||
if !types.SkipRuntimeHook(podInfo.Labels) { | ||
hookResp, err := d.dispatcher.Dispatch(ctx, runtimeHookPath, config.PreHook, hookReq) |
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.
why not setting config.NoneRuntimeHookPath to hint skipping, just like HandleUpdateContainer/HandleStopContainer part? which may lead to less changes.
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.
+1
@@ -26,10 +26,19 @@ const ( | |||
ContainerTypeLabelSandbox = "podsandbox" | |||
ContainerTypeLabelContainer = "container" | |||
SandboxIDLabelKey = "io.kubernetes.sandbox.id" | |||
|
|||
RuntimeProxySkipLabelKey = "node.koordinator.sh/skip-runtime-hook" |
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.
remember to unified the naming with cri
5945433
to
4b722ac
Compare
) | ||
|
||
const ( | ||
ContainerTypeLabelKey = "io.kubernetes.docker.type" | ||
ContainerTypeLabelSandbox = "podsandbox" | ||
ContainerTypeLabelContainer = "container" | ||
SandboxIDLabelKey = "io.kubernetes.sandbox.id" | ||
|
||
RuntimeProxySkipLabelKey = "runtimeproxy.koordinator.sh/is-hookserver" |
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.
I think this mechanism should not be strongly bound to the hook server. All pods that need skip can follow this special protocol.
so node.koordinator.sh/skip-hookserver may be better.
e2e0256
to
e2b24a5
Compare
Signed-off-by: Yue Zhang <huaihuan.zy@alibaba-inc.com>
e2b24a5
to
3be6f63
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Yue Zhang huaihuan.zy@alibaba-inc.com
Ⅰ. Describe what this PR does
fix #670
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews
V. Checklist
make test