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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user