mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2024-12-24 07:28:06 +00:00
25ba9e2fad
* Fix Junit missing testsuites Fix issue https://github.com/aquasecurity/kube-bench/issues/883 but also bug with overriding output when --outputfile is effective and only write the last controls * test new integration * Update build.yml * add wait for job to be ready * Update build.yml * Update build.yml * Update build.yml * test * Update job.yaml * Add wait * test for logs * Update job.yaml * Create Expected_output.data * Update build.yml * Update build.yml * remove empty line * Add new line at the end * add --- * Delete docker.go * Delete integration.go * Delete integration_test.go * Delete integration/testdata/cis-1.20 directory * Delete integration/testdata/cis-1.6 directory * Update integration testing * Remove integration tests Removed integration testing to github action * Update build.yml
88 lines
2.7 KiB
YAML
88 lines
2.7 KiB
YAML
---
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: kube-bench
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: kube-bench
|
|
spec:
|
|
hostPID: true
|
|
containers:
|
|
- name: kube-bench
|
|
image: aquasec/kube-bench:0.6.3
|
|
command: ["kube-bench"]
|
|
volumeMounts:
|
|
- name: var-lib-etcd
|
|
mountPath: /var/lib/etcd
|
|
readOnly: true
|
|
- name: var-lib-kubelet
|
|
mountPath: /var/lib/kubelet
|
|
readOnly: true
|
|
- name: var-lib-kube-scheduler
|
|
mountPath: /var/lib/kube-scheduler
|
|
readOnly: true
|
|
- name: var-lib-kube-controller-manager
|
|
mountPath: /var/lib/kube-controller-manager
|
|
readOnly: true
|
|
- name: etc-systemd
|
|
mountPath: /etc/systemd
|
|
readOnly: true
|
|
- name: lib-systemd
|
|
mountPath: /lib/systemd/
|
|
readOnly: true
|
|
- name: srv-kubernetes
|
|
mountPath: /srv/kubernetes/
|
|
readOnly: true
|
|
- name: etc-kubernetes
|
|
mountPath: /etc/kubernetes
|
|
readOnly: true
|
|
# /usr/local/mount-from-host/bin is mounted to access kubectl / kubelet, for auto-detecting the Kubernetes version.
|
|
# You can omit this mount if you specify --version as part of the command.
|
|
- name: usr-bin
|
|
mountPath: /usr/local/mount-from-host/bin
|
|
readOnly: true
|
|
- name: etc-cni-netd
|
|
mountPath: /etc/cni/net.d/
|
|
readOnly: true
|
|
- name: opt-cni-bin
|
|
mountPath: /opt/cni/bin/
|
|
readOnly: true
|
|
restartPolicy: Never
|
|
volumes:
|
|
- name: var-lib-etcd
|
|
hostPath:
|
|
path: "/var/lib/etcd"
|
|
- name: var-lib-kubelet
|
|
hostPath:
|
|
path: "/var/lib/kubelet"
|
|
- name: var-lib-kube-scheduler
|
|
hostPath:
|
|
path: "/var/lib/kube-scheduler"
|
|
- name: var-lib-kube-controller-manager
|
|
hostPath:
|
|
path: "/var/lib/kube-controller-manager"
|
|
- name: etc-systemd
|
|
hostPath:
|
|
path: "/etc/systemd"
|
|
- name: lib-systemd
|
|
hostPath:
|
|
path: "/lib/systemd"
|
|
- name: srv-kubernetes
|
|
hostPath:
|
|
path: "/srv/kubernetes"
|
|
- name: etc-kubernetes
|
|
hostPath:
|
|
path: "/etc/kubernetes"
|
|
- name: usr-bin
|
|
hostPath:
|
|
path: "/usr/bin"
|
|
- name: etc-cni-netd
|
|
hostPath:
|
|
path: "/etc/cni/net.d/"
|
|
- name: opt-cni-bin
|
|
hostPath:
|
|
path: "/opt/cni/bin/"
|