From efd1c080bf17ed662eeeeaf66647afd27ad27894 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 26 Oct 2021 16:11:46 +0200 Subject: 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 --- libpod/network/cni/run.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libpod') diff --git a/libpod/network/cni/run.go b/libpod/network/cni/run.go index bd873f89b..99b2adce5 100644 --- a/libpod/network/cni/run.go +++ b/libpod/network/cni/run.go @@ -196,10 +196,8 @@ func getRuntimeConfig(netns, conName, conID, networkName string, ports []cniPort IfName: opts.InterfaceName, Args: [][2]string{ {"IgnoreUnknown", "1"}, - // FIXME: Should we set the K8S args? - //{"K8S_POD_NAMESPACE", conName}, - //{"K8S_POD_INFRA_CONTAINER_ID", conID}, - // K8S_POD_NAME is used by dnsname to get the container name + // Do not set the K8S env vars, see https://github.com/containers/podman/issues/12083. + // Only K8S_POD_NAME is used by dnsname to get the container name. {"K8S_POD_NAME", conName}, }, CapabilityArgs: map[string]interface{}{}, -- cgit v1.2.3-54-g00ecf