Closed tongpu closed 1 year ago
Since we still need to build the Docker image ourselves, we managed to redirect logs to stdout by just linking log files to /dev/stdout. In your Dockerfile:
RUN mkdir -p /var/log/huawei \
&& ln -s /dev/stdout /var/log/huawei/huawei-csi-controller \
&& ln -s /dev/stdout /var/log/huawei/huawei-csi-node
And in your manifests do deploy, comment out every occurrance of /var/log mounts.
all you need to do is set param - "--loggingModule=console" in args of huawei-csi-driver ;]
The way the logging stack for
huawei-csi
is currently set up all logs are written to/var/log/huawei
and no information is visible when usingkubectl logs
.This additionally also leads to the issue that when running on OpenShift the controller needs to be run with a privileged security context, because it needs to run as root:root to be able to log to
/var/log/huawei
.