mirror of https://github.com/containers/podman.git
Merge pull request #26264 from Luap99/kube-empty-alias
play kube: never add empty alias
This commit is contained in:
commit
87eeb3cf38
|
@ -890,7 +890,9 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
|
|||
// the podName appended to it, but this is a breaking change and will be done in podman 5.0
|
||||
ctrNameAliases := make([]string, 0, len(podYAML.Spec.Containers))
|
||||
for _, container := range podYAML.Spec.Containers {
|
||||
ctrNameAliases = append(ctrNameAliases, container.Name)
|
||||
if container.Name != "" {
|
||||
ctrNameAliases = append(ctrNameAliases, container.Name)
|
||||
}
|
||||
}
|
||||
for k, v := range podSpec.PodSpecGen.Networks {
|
||||
v.Aliases = append(v.Aliases, ctrNameAliases...)
|
||||
|
|
Loading…
Reference in New Issue