Add a container type to the runtime labels

This is part of the "Debug Containers" feature and is hidden behind
a feature gate. Debug containers have no stored spec, so this new
runtime label allows the kubelet to treat containers differently
without relying on spec.
This commit is contained in:
Lee Verberne
2017-04-27 21:08:43 +00:00
parent 23226c24d4
commit ba6f31a6c6
9 changed files with 119 additions and 22 deletions

View File

@@ -70,6 +70,7 @@ type sandboxTemplate struct {
type containerTemplate struct {
pod *v1.Pod
container *v1.Container
containerType kubecontainer.ContainerType
sandboxAttempt uint32
attempt int
createdAt int64
@@ -142,7 +143,7 @@ func makeFakeContainer(t *testing.T, m *kubeGenericRuntimeManager, template cont
sandboxConfig, err := m.generatePodSandboxConfig(template.pod, template.sandboxAttempt)
assert.NoError(t, err, "generatePodSandboxConfig for container template %+v", template)
containerConfig, err := m.generateContainerConfig(template.container, template.pod, template.attempt, "", template.container.Image)
containerConfig, err := m.generateContainerConfig(template.container, template.pod, template.attempt, "", template.container.Image, template.containerType)
assert.NoError(t, err, "generateContainerConfig for container template %+v", template)
podSandboxID := apitest.BuildSandboxName(sandboxConfig.Metadata)