-
Notifications
You must be signed in to change notification settings - Fork 343
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
Add pod annotations/labels for container level hook #165
Add pod annotations/labels for container level hook #165
Conversation
d739502
to
84ac1d6
Compare
Signed-off-by: pengyang.hpy <honpey@gmail.com>
84ac1d6
to
2efddb6
Compare
/lgtm |
Codecov Report
@@ Coverage Diff @@
## main #165 +/- ##
=======================================
Coverage 57.82% 57.82%
=======================================
Files 91 91
Lines 8159 8159
=======================================
Hits 4718 4718
Misses 3029 3029
Partials 412 412
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
@@ -124,6 +124,9 @@ message ContainerResourceHookRequest { | |||
map<string, string> container_annotations = 3; | |||
LinuxContainerResources container_resources = 4; | |||
LinuxContainerResources pod_resources = 5; | |||
// pod related annotations and labels | |||
map<string, string> pod_annotations = 6; | |||
map<string, string> pod_labels = 7; |
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 consider putting it at the interface level instead of letting the plugin get it by itself?
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 consider putting it at the interface level instead of letting the plugin get it by itself?
where to get pod info for plugin? talk with runtime-manager or containerd?
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.
et. koordlet can get it from it local cache.
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.
et. koordlet can get it from it local cache.
there may be only PreStartContainerHook registered, so koordlet could not catch pod level annotations/levels during RunSandbox stage without PreRunPodSandboxHook hook.
yet, koordlet can register PreRunPodSandboxHook explicitly to solve, but we had better do not import dependency between two hooks(e.g PreRunPodSandboxHook and PreStartContainerHook).
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.
et. koordlet can get it from it local cache.
there may be only PreStartContainerHook registered, so koordlet could not catch pod level annotations/levels during RunSandbox stage without PreRunPodSandboxHook hook.
yet, koordlet can register PreRunPodSandboxHook explicitly to solve, but we had better do not import dependency between two hooks(e.g PreRunPodSandboxHook and PreStartContainerHook).
then, koordlet would be stateless, since no need to store the pod info for subsequent hooks
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、pod syncing is for metric analysis and dynamic QoS policies, which is asynchronous with hook injections. So the injections will be ineffective if the hook wait
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.
Such as communication, keep these two fields, but let's do some deductions in the early stage(restricted to koordinator.sh)
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.
memo:
1、priority class for pod/container req
2、filter with DomainPrefix
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.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hormes 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 |
Ⅰ. Describe what this PR does
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews