While debugging an issue I had with our custom CNI plugin I just found out that libcni forwards every env variable of the program calling CNI.
While I could manage the programs env this leads me to the question whether this feature is really a good idea. Shouldn't libcni invoke plugins only with known CNI env variables?
In my case it was an env LOG_TARGET=stdout which made our custom CNI plugin to output debugging info to stdout and thus break the json output.
https://github.com/containernetworking/cni/blob/d5c71ad528129e306538f7ba5b796337c1898d81/pkg/invoke/args.go#L57
While debugging an issue I had with our custom CNI plugin I just found out that libcni forwards every env variable of the program calling CNI.
While I could manage the programs env this leads me to the question whether this feature is really a good idea. Shouldn't libcni invoke plugins only with known CNI env variables?
In my case it was an env
LOG_TARGET=stdout
which made our custom CNI plugin to output debugging info to stdout and thus break the json output.