Skip to content

Commit

Permalink
job.yaml: Adding /var/lib/cni mounts for proper CIS 1.1.9 and 1.1.0 c…
Browse files Browse the repository at this point in the history
…hecking (#1547)

Signed-off-by: Andrey Polovov <andrey.polovov@flant.com>
Signed-off-by: Andrey Pavlov <andrey.pavlov@flant.com>
Co-authored-by: Andrey Pavlov <andrey.pavlov@flant.com>
Co-authored-by: chenk <hen.keinan@gmail.com>
  • Loading branch information
3 people committed Feb 11, 2024
1 parent 3021706 commit faeceb5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions job-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ spec:
image: docker.io/aquasec/kube-bench:latest
command: ["kube-bench", "run", "--targets", "master"]
volumeMounts:
- name: var-lib-cni
mountPath: /var/lib/cni
readOnly: true
- name: var-lib-etcd
mountPath: /var/lib/etcd
readOnly: true
Expand Down Expand Up @@ -72,6 +75,9 @@ spec:
readOnly: true
restartPolicy: Never
volumes:
- name: var-lib-cni
hostPath:
path: "/var/lib/cni"
- name: var-lib-etcd
hostPath:
path: "/var/lib/etcd"
Expand Down
6 changes: 6 additions & 0 deletions job-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ spec:
image: docker.io/aquasec/kube-bench:latest
command: ["kube-bench", "run", "--targets", "node"]
volumeMounts:
- name: var-lib-cni
mountPath: /var/lib/cni
readOnly: true
- name: var-lib-etcd
mountPath: /var/lib/etcd
readOnly: true
Expand Down Expand Up @@ -49,6 +52,9 @@ spec:
readOnly: true
restartPolicy: Never
volumes:
- name: var-lib-cni
hostPath:
path: "/var/lib/cni"
- name: var-lib-etcd
hostPath:
path: "/var/lib/etcd"
Expand Down
6 changes: 6 additions & 0 deletions job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ spec:
image: docker.io/aquasec/kube-bench:v0.7.1
name: kube-bench
volumeMounts:
- name: var-lib-cni
mountPath: /var/lib/cni
readOnly: true
- mountPath: /var/lib/etcd
name: var-lib-etcd
readOnly: true
Expand Down Expand Up @@ -50,6 +53,9 @@ spec:
hostPID: true
restartPolicy: Never
volumes:
- name: var-lib-cni
hostPath:
path: /var/lib/cni
- hostPath:
path: /var/lib/etcd
name: var-lib-etcd
Expand Down

0 comments on commit faeceb5

Please sign in to comment.