-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRI Logging Driver #252
base: master
Are you sure you want to change the base?
CRI Logging Driver #252
Conversation
243657b
to
894cd54
Compare
8115f43
to
c52c4b3
Compare
c52c4b3
to
1c670ae
Compare
I've tried dual logging before, using the fluentd driver, and for dual logging docker used the "local" driver as a "dual logging cache" instead of the json-file driver. This broke |
@zmedico The current logging code for |
Yes, I've found the createContainerLogSymlink function in cri-dockerd/core/logs.go, and from the cri-dockerd debug log it seems that the
My fear is that using your criLogDriver will give similar results, since docker will still use its The "fallback" method that you mention in #246 (comment) would avoid this problem, since docker would continue to use the I suppose if criLogDriver writes its log to the same realPath that the |
Fixes #246, #213
Replaces #224
Proposed Changes
This PR introduces a CRI logging driver as an alternative solution to #213. This driver outputs docker logs in CRI formats. Docker has dual logging capability that will take care of also outputting the logs in JSON format.
The driver creates a CRI logger to output CRI formatted logs to the location specified by kubelet. This logger will exist within
cri-dockerd
. i.e.cri-dockerd
will handle it's current GRPC messages as well as the logger messages fromdockerd
The driver will need to be installed with
cri-dockerd
and specified incri-dockerd
's code when it creates a container along with the kube file location. The kube file location is passed to the driver to eliminated the need to create a kube client within the driver when it already exists incri-dockerd
.Changes Still Needed
cri-dockerd
The driver will now run as a part of
cri-dockerd
. My thoughts are to havecri-dockerd
telldockerd
it is installedusing something like https://docs.docker.com/engine/api/v1.43/#tag/Plugin/operation/PluginPull.
cri-dockerd
to specify the driver and kube path when creating a container