I use containerd interface for logging plugins. Also I'm looking for a way to get the container config that kubelet passes to containerd to run containers. I am interested in the ability to find out the path to the container log file, as well as the ability to receive a signal that the file needs to be reopened after log rotation. I tried looking at https://github.com/containerd/containerd and https://github.com/kubernetes/kubernetes/blob/master/staging/README.md, but didn't find anything useful. Is there a way to get the functionality I need and then write code like this?
config, _ := runtime.GetCurrentContainerConfig()
logFilePath := config.logFilePath
if runtime.ReopenLogFileRequest {
file.Open(logFilePath)
}