-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
csi: add log rotation for csi rbd pod containers #14305
Conversation
a44aabc
to
5d60a52
Compare
pkg/operator/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml
Outdated
Show resolved
Hide resolved
pkg/operator/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml
Outdated
Show resolved
Hide resolved
144aee9
to
5ac055f
Compare
08f58ca
to
5d9fb68
Compare
pkg/operator/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml
Outdated
Show resolved
Hide resolved
pkg/operator/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml
Outdated
Show resolved
Hide resolved
pkg/operator/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to get @Madhu-1 's thought's on this as well, but it seems to me that adding these changes to all 4 major CSI deployment templates will be a lot of boilerplate to maintain over time. It seems like it might be in the interest of future devs to define this as a common Golang template that gets applied after template loading.
pkg/operator/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple nits, plus as discussed let's see if we can implement purely as a sidecar and no init container.
can we have a common shell script? @BlaineEXE or I think if one sidecar running the logrotate per node is fine, we can simply add the sidecar with the csi daemon set. As we run the logrotate for a csi config file, which points to a same csi/log directory. With CSI as we do not re-load the containers we can use this method |
pkg/operator/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml
Outdated
Show resolved
Hide resolved
pkg/operator/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml
Outdated
Show resolved
Hide resolved
Use the same logrotate flow of rbd, as merged in rook#14305 Closes: rook#12809 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809 Signed-off-by: parth-gr <partharora1010@gmail.com> Signed-off-by: parth-gr <paarora@redhat.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <paarora@redhat.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Use the same logrotate flow of rbd, as merged in rook#14305 1) Make the csi cephfs and nfs container logs persisted in a file 2) Use the cephcluster api specs to configure the log rotate 3) Add log rotation to rotate the log file and Add a sidecar log collector container And some fixes on the implementation: 1) Add a operator namespace in the log file path 2) Only add volume to the container if logrotate is enabled Closes: rook#12809, rook#14429 Signed-off-by: parth-gr <partharora1010@gmail.com>
Make the csi rbd container logs persisted in a file
(csi plugin, csi provisioner, csi addons sidecar)
Use the cephcluster api specs to configure the log rotate
Add log rotation to rotate the log file and
Add a sidecar log collector container
part-of: #12809
Updates:
When you mount a volume to a directory in a container, it effectively overrides the contents of that directory with the contents of the volume. This can cause issues if there are existing configurations or files in that directory that you want to preserve while adding new files or configurations.
Checklist: