mirror of https://github.com/k3s-io/k3s
Escape manifest IDs when hunting the network container.
This makes it possible to have manifests with _ in the ID. I'm not sure we want to allow this, but we do for now. I hope to follow this up with a deeper change to make this a bit more robust.pull/6/head
parent
e811e24b23
commit
8c2a8b65c3
|
@ -620,7 +620,7 @@ func (kl *Kubelet) networkContainerExists(manifest *api.ContainerManifest) (stri
|
||||||
return "", false, err
|
return "", false, err
|
||||||
}
|
}
|
||||||
for _, name := range pods {
|
for _, name := range pods {
|
||||||
if strings.Contains(name, containerNamePrefix+"--"+networkContainerName+"--"+manifest.Id+"--") {
|
if strings.Contains(name, containerNamePrefix+"--"+networkContainerName+"--"+escapeDash(manifest.Id)+"--") {
|
||||||
return name, true, nil
|
return name, true, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue