Skip to content

Commit

Permalink
Add etc/rancher mounts to cis-operator (#164)
Browse files Browse the repository at this point in the history
Add /etc/rancher mounts to cis-operator
  • Loading branch information
galal-hussein authored Sep 19, 2022
1 parent b45612a commit 1c39b1e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ var (
debug bool
securityScanImage = "rancher/security-scan"
securityScanImageTag = "v0.2.1"
sonobuoyImage = "rancher/sonobuoy-sonobuoy"
sonobuoyImageTag = "v0.16.3"
sonobuoyImage = "rancher/mirrored-sonobuoy-sonobuoy"
sonobuoyImageTag = "v0.56.7"
clusterName string
)

Expand Down
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/lib/rancher
name: rke2-root
- hostPath:
path: /etc/rancher
name: rke2-root-config
- hostPath:
path: /etc/cni/net.d
name: rke2-cni
Expand Down Expand Up @@ -111,6 +114,9 @@ data:
- mountPath: /var/lib/rancher
name: rke2-root
readOnly: true
- mountPath: /etc/rancher
name: rke2-root-config
readOnly: true
- mountPath: /etc/cni/net.d
name: rke2-cni
readOnly: true
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 @@ -122,6 +122,13 @@ func New(clusterscan *cisoperatorapiv1.ClusterScan, clusterscanprofile *cisopera
Path: `/var/lib/rancher`,
},
},
}, {
Name: `rke2-root-config`,
VolumeSource: corev1.VolumeSource{
HostPath: &corev1.HostPathVolumeSource{
Path: `/etc/rancher`,
},
},
}, {
Name: `rke2-cni`,
VolumeSource: corev1.VolumeSource{
Expand Down Expand Up @@ -202,6 +209,9 @@ func New(clusterscan *cisoperatorapiv1.ClusterScan, clusterscanprofile *cisopera
}, {
Name: `rke2-root`,
MountPath: `/var/lib/rancher`,
}, {
Name: `rke2-root-config`,
MountPath: `/etc/rancher`,
}, {
Name: `rke2-cni`,
MountPath: `/etc/cni/net.d`,
Expand Down

0 comments on commit 1c39b1e

Please sign in to comment.