-
Notifications
You must be signed in to change notification settings - Fork 339
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
Introduce protocol between RuntimeManager and RuntimeHookServer #76
Conversation
// Pod namespace of the sandbox. Same as the pod namespace in the Pod ObjectMeta. | ||
string namespace = 3; | ||
// Attempt number of creating the sandbox. Default: 0. | ||
uint32 attempt = 4; |
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.
remove this filed
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.
remove this filed
reverve for subsequence features, such as ingoring core adjustment when attempt > 1
*/ | ||
|
||
// To regenerate api.pb.go run scripts/generate_runtime.sh | ||
syntax = "proto3"; |
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.
for the docker proxy, we need to transfer the http request to grpc request? I think it's a little complicated.
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.
the request body has no difference between grpc and http when talking to RuntimeHookServer, so it should NOT be more complicated under docker scenario?
the request body has no difference between grpc and http when talking to RuntimeHookServer, so it should NOT be more complicated under docker scenario?
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.
ok
map<string, string> annotations = 2; | ||
// RuntimeHookSever may modify cgroup_parent to construct customized cgroup topology. | ||
string cgroup_parent = 3; | ||
// RuntimeHookServer may modify the linux resource config. |
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.
overhead&resources wont be modified, so remove those fields from response ?
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.
overhead&resources wont be modified, so remove those fields from response ?
resources info would be assigned to pod-level cgroup.
so it makes sense to allow HookServert to change pod-level cgroup config here.
overhead can be removed.
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.
when do you need to change this resource, to make response.resources different than request.resources?
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.
when do you need to change this resource, to make response.resources different than request.resources?
for batch pod, lower cpu preemption priority by setting pod's pod-level cgroup cpu.shares to 2
// Metadata of the sandbox. This information will uniquely identify the sandbox. | ||
PodSandboxMetadata pod_meta = 1; | ||
// Named runtime to use for podSandbox. | ||
string runtime_handler = 2; |
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.
What scenarios need to reveal the internal runtime type? If this is the case, maybe we should leave an extension field, such as a map, to avoid frequent modification of the protocol
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.
What scenarios need to reveal the internal runtime type? If this is the case, maybe we should leave an extension field, such as a map, to avoid frequent modification of the protocol
for container info sampling example, under which kata-containers cgroups are inside guest kernel while runc-containers cgroups exist on host.
runtime type exists in PodSandboxHookRequest only and is readonly, so it seems nowhere comes frequent modification?
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.
is this a conventional concept in container community, as it is called runtimeclass in kubernetes?
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.
kubernetes
yup. the 'runtime_handler' comes from CRI,
See https://github.com/kubernetes/cri-api/blob/master/pkg/apis/runtime/v1/api.proto#L413
Codecov Report
@@ Coverage Diff @@
## main #76 +/- ##
=======================================
Coverage ? 40.66%
=======================================
Files ? 66
Lines ? 5144
Branches ? 0
=======================================
Hits ? 2092
Misses ? 2804
Partials ? 248
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Signed-off-by: pengyang.hpy <honpey@gmail.com>
LGTM |
/lgtm |
[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 |
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
Ⅰ. Describe what this PR does
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews