Skip to content

Commit 1220b23

Browse files
authored
Add container id to ContainerResourceHookRequest (#243)
* Add container id to ContainerResourceHookRequest/Response Signed-off-by: Cheimu <xerhoneyfc@gmail.com> * move container id into container meta Signed-off-by: Cheimu <xerhoneyfc@gmail.com> * keep api backward compatible Signed-off-by: Cheimu <xerhoneyfc@gmail.com> * fix typo of runtime hook service interfaces Signed-off-by: Cheimu <xerhoneyfc@gmail.com>
1 parent 8910d29 commit 1220b23

File tree

3 files changed

+76
-63
lines changed

3 files changed

+76
-63
lines changed

apis/runtime/v1alpha1/api.pb.go

Lines changed: 58 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/runtime/v1alpha1/api.proto

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ message ContainerMetadata {
113113
string name = 1;
114114
// Attempt number of creating the container. Default: 0.
115115
uint32 attempt = 2;
116+
// Id of the container.
117+
string id = 3;
116118
}
117119

118120
// ContainerResourceHookRequest is sent to RuntimeHookServer before/after container related operations including
@@ -146,9 +148,9 @@ service RuntimeHookService {
146148
// and Original RunPodSandboxRequest generating a new RunPodSandboxRequest to transfer to backend runtime engine.
147149
// RuntimeHookServer should ensure the correct operations basing on RunPodSandboxHookRequest.
148150
rpc PreRunPodSandboxHook(PodSandboxHookRequest) returns (PodSandboxHookResponse) {}
149-
// PostStopPodSandbox calls RuntimeHookServer after pod deleted. RuntimeHookServer could do resource setting garbage collection
151+
// PostStopPodSandboxHook calls RuntimeHookServer after pod deleted. RuntimeHookServer could do resource setting garbage collection
150152
// sanity check after PodSandBox stopped.
151-
rpc PostStopPodSandbox(PodSandboxHookRequest) returns (PodSandboxHookResponse) {}
153+
rpc PostStopPodSandboxHook(PodSandboxHookRequest) returns (PodSandboxHookResponse) {}
152154
// PreCreateContainerHook calls RuntimeHookServer before container creating. RuntimeHookServer could do some
153155
// resource setting before container launching.
154156
rpc PreCreateContainerHook(ContainerResourceHookRequest) returns (ContainerResourceHookResponse) {}

0 commit comments

Comments
 (0)