k8s CRI Support added to bucketbench #31
Conversation
Looks fine overall, ping @estesp |
@@ -0,0 +1,54 @@ | |||
{ | |||
"metadata": { | |||
"name": "powertest", |
AkihiroSuda
Oct 29, 2017
s/powertest/bucketbench/ ?
s/powertest/bucketbench/ ?
Thanks @kunalkushwaha ; will do a complete review over the next day or so. Looks good in general and will answer specific approach questions in review. |
All comments are fairly minor. Thanks, it looks good overall @kunalkushwaha! I'm thinking maybe |
"security.alpha.kubernetes.io/seccomp/pod": "unconfined" | ||
}, | ||
"linux": { | ||
"cgroup_parent": "/Burstable/pod_123-456", |
estesp
Oct 31, 2017
Owner
is this /Burstable/pod_123-456
useful/necessary, or just copied from somewhere else? Maybe it doesn't matter, but would be nice for this to be as "default"/vanilla as can be.
is this /Burstable/pod_123-456
useful/necessary, or just copied from somewhere else? Maybe it doesn't matter, but would be nice for this to be as "default"/vanilla as can be.
kunalkushwaha
Nov 6, 2017
Author
Contributor
I copied it from CRI-O 's contrib files. Will try to make it more generic.
I copied it from CRI-O 's contrib files. Will try to make it more generic.
@@ -101,6 +101,11 @@ func (c *ContainerdContainer) Detached() bool { | |||
return true | |||
} | |||
|
|||
//GetPodID return pod-id assosicated with container. |
estesp
Oct 31, 2017
Owner
typo: s/assosicated/associated/
Maybe for all the drivers which will not implement GetPodID
add a second sentence to the comment "only used by CRI-based drivers"
typo: s/assosicated/associated/
Maybe for all the drivers which will not implement GetPodID
add a second sentence to the comment "only used by CRI-based drivers"
@@ -90,6 +90,11 @@ func (c *CtrContainer) Detached() bool { | |||
return true | |||
} | |||
|
|||
//GetPodID return pod-id assosicated with container. |
estesp
Oct 31, 2017
Owner
same typo as the containerd driver :) Also, same comment about noting this is stubbed out only for use with CRI drivers
same typo as the containerd driver :) Also, same comment about noting this is stubbed out only for use with CRI drivers
) | ||
|
||
const ( | ||
defaultPodImage = "docker.io/ibmcom/pause:3.0" |
const ( | ||
defaultPodImage = "docker.io/ibmcom/pause:3.0" | ||
defaultPodNamePrefix = "pod" | ||
defaultSanboxConfig = "contrib/sandbox_config.json" |
estesp
Oct 31, 2017
Owner
typo: s/defaultSanboxConfig/defaultSandboxConfig
typo: s/defaultSanboxConfig/defaultSandboxConfig
runtimeClient := pb.NewRuntimeServiceClient(conn) | ||
imageClient := pb.NewImageServiceClient(conn) | ||
|
||
pconfig, err := loadPodSandboxConfig(defaultSanboxConfig) |
estesp
Oct 31, 2017
Owner
s/defaultSanboxConfig/defaultSandboxConfig
s/defaultSanboxConfig/defaultSandboxConfig
@@ -82,6 +82,11 @@ func (c *DockerContainer) Command() string { | |||
return c.cmdOverride | |||
} | |||
|
|||
//GetPodID return pod-id assosicated with container. |
estesp
Oct 31, 2017
Owner
same typo as other drivers; and same comment about unused outside of CRI implementation
same typo as other drivers; and same comment about unused outside of CRI implementation
@@ -19,6 +19,8 @@ const ( | |||
// Null driver represents an empty driver for use by benchmarks that | |||
// require no driver | |||
Null | |||
//CRI driver represents k8s Container Runtime Interface | |||
CRI |
estesp
Oct 31, 2017
Owner
can you add this above Null
so that Null
is the last driver in the list? Not a big deal, but.. :)
can you add this above Null
so that Null
is the last driver in the list? Not a big deal, but.. :)
@@ -95,6 +100,8 @@ func New(dtype Type, path string) (Driver, error) { | |||
return NewCtrDriver(path) | |||
case Null: | |||
return nil, nil | |||
case CRI: |
estesp
Oct 31, 2017
Owner
same comment as above re: Null being the last entry
same comment as above re: Null being the last entry
@@ -91,6 +91,11 @@ func (c *RuncContainer) State() string { | |||
return c.state | |||
} | |||
|
|||
//GetPodID return pod-id assosicated with container. |
estesp
Oct 31, 2017
Owner
same as other drivers: typo and comment about unused :)
same as other drivers: typo and comment about unused :)
- Support for CRI driver type added to helper functions of Driver Interface Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
- config file added for CRI - Examples yaml file added for CRI Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
Have incorporated all suggestion with this update. Please check once more. |
LGTM Merging as the tip |
This PR is for adding support of CRI interface of k8s to bucketbench.
//cc @estesp @runcom @Random-Liu
PS: Sorry for this creating this big PR, didn't found any other way to break into smaller one.