Skip to content

Commit c4e676c

Browse files
authored
Merge pull request #92 from MonzElmasry/add_k3s
Add journalctl and sysd logs to mount necessary volumes for k3s-cis scans
2 parents d7e1d61 + d747bc6 commit c4e676c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

pkg/securityscan/job/job.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,21 @@ func New(clusterscan *cisoperatorapiv1.ClusterScan, clusterscanprofile *cisopera
142142
HostPath: &corev1.HostPathVolumeSource{
143143
Path: `/etc/group`,
144144
},
145+
},
146+
}, {
147+
Name: `journalctl`,
148+
VolumeSource: corev1.VolumeSource{
149+
HostPath: &corev1.HostPathVolumeSource{
150+
Path: ` /var/log/journal`,
151+
},
145152
}},
153+
{
154+
Name: `syslog`,
155+
VolumeSource: corev1.VolumeSource{
156+
HostPath: &corev1.HostPathVolumeSource{
157+
Path: ` /var/log/syslog`,
158+
},
159+
}},
146160
},
147161
Containers: []corev1.Container{{
148162
Name: `rancher-cis-benchmark`,
@@ -196,6 +210,12 @@ func New(clusterscan *cisoperatorapiv1.ClusterScan, clusterscanprofile *cisopera
196210
}, {
197211
Name: `etc-group`,
198212
MountPath: `/etc/group`,
213+
}, {
214+
Name: `journalctl`,
215+
MountPath: `/var/log/journal`,
216+
}, {
217+
Name: `syslog`,
218+
MountPath: `/var/log/syslog`,
199219
}},
200220
}},
201221
},

0 commit comments

Comments
 (0)