I tried to use the c client inside a pod by using the _load_inclusterconfig()_ function but it failed because it could not read the environment variables. The reason is that the corresponding source file does not include the config.h file that is generated during the make process. So the code into #if defined(HAVE_SECURE_GETENV) and #elif defined(HAVE_GETENV) is left out.
Hello,
hope you are well.
I tried to use the c client inside a pod by using the _load_inclusterconfig()_ function but it failed because it could not read the environment variables. The reason is that the corresponding source file does not include the config.h file that is generated during the make process. So the code into
#if defined(HAVE_SECURE_GETENV)
and#elif defined(HAVE_GETENV)
is left out.After adding the include statement in https://github.com/kubernetes-client/c/blob/master/kubernetes/config/incluster_config.c and recompile the library I had not problem.