This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Description
Hi guys,
I may find several bugs towards the management of Configmap in the latest 1.5.2 version and also try to find a workaround to fix them. My patch file is attached here.
hanyin-intel@e8d5903
Here are the details:
-
The node-report feature can't get the cmk-config- Configmap since error calling "get_config" function in class "Config". Since this function is not defined in the "Config" class, I use the constructor function and "lock/unlock" function as a workaround. But it seems that the "node-report" container continuously restarts since race on such "lock".
-
The describe feature can't get the cmk-config- Configmap since the "namespace" attribute is not passed when construct the "Config" class. As a result, I use the "/var/run/secrets/kubernetes.io/serviceaccount/namespace" file in container to get the namespace and pass it to the construction function of "Config" class.
-
The isolate feature also misses the "namespace" attribute when getting the cmk-config- Configmap.
-
When enabling the "hostNetwork" in the container, the environment variable "HOSTNAME" in container has been changed to the node name rather than the pod name. Thus, the isolate feature which always be used as the wrapper of the real workload can not get the correct pod name. Then, in the workaround, I use the environment variable "PODNAME" instead of the "HOSTNAME" in isolate.py. And also, the user needs to add the "PODNAME" into their containers.
Thanks