Document to not set K8S envars for CNI

Setting these environment variables can cause issues with custom CNI
plugins, see #12083.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2021-10-26 16:11:46 +02:00
parent 4d75df8be3
commit efd1c080bf
No known key found for this signature in database
GPG Key ID: EB145DD938A3CAF2
1 changed files with 2 additions and 4 deletions

View File

@ -196,10 +196,8 @@ func getRuntimeConfig(netns, conName, conID, networkName string, ports []cniPort
IfName: opts.InterfaceName, IfName: opts.InterfaceName,
Args: [][2]string{ Args: [][2]string{
{"IgnoreUnknown", "1"}, {"IgnoreUnknown", "1"},
// FIXME: Should we set the K8S args? // Do not set the K8S env vars, see https://github.com/containers/podman/issues/12083.
//{"K8S_POD_NAMESPACE", conName}, // Only K8S_POD_NAME is used by dnsname to get the container name.
//{"K8S_POD_INFRA_CONTAINER_ID", conID},
// K8S_POD_NAME is used by dnsname to get the container name
{"K8S_POD_NAME", conName}, {"K8S_POD_NAME", conName},
}, },
CapabilityArgs: map[string]interface{}{}, CapabilityArgs: map[string]interface{}{},