Skip to content

Commit

Permalink
Merge pull request #96 from MonzElmasry/fix_k3s_centos
Browse files Browse the repository at this point in the history
mount /run/logs to get logs from centos nodes
  • Loading branch information
MonzElmasry authored Apr 28, 2021
2 parents 0460de4 + eb609a2 commit 2c36c48
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/securityscan/core/templates/pluginConfig.template
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ data:
- hostPath:
path: /var/log
name: var-log
- hostPath:
path: /run/log
name: run-log
{{- if .isCustomBenchmark }}
- configMap:
defaultMode: 420
Expand Down Expand Up @@ -108,6 +111,9 @@ data:
- mountPath: /var/log/
name: var-log
readOnly: true
- mountPath: /run/log/
name: run-log
readOnly: true
{{- if .isCustomBenchmark }}
- mountPath: /etc/kbs/custombenchmark/cfg
name: custom-benchmark-volume
Expand Down
10 changes: 10 additions & 0 deletions pkg/securityscan/job/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ func New(clusterscan *cisoperatorapiv1.ClusterScan, clusterscanprofile *cisopera
Path: `/var/log`,
},
},
}, {
Name: `run-log`,
VolumeSource: corev1.VolumeSource{
HostPath: &corev1.HostPathVolumeSource{
Path: `/run/log`,
},
},
},
},
Containers: []corev1.Container{{
Expand Down Expand Up @@ -207,6 +214,9 @@ func New(clusterscan *cisoperatorapiv1.ClusterScan, clusterscanprofile *cisopera
}, {
Name: `var-log`,
MountPath: `/var/log/`,
}, {
Name: `run-log`,
MountPath: `/run/log/`,
}},
}},
},
Expand Down

0 comments on commit 2c36c48

Please sign in to comment.