mirror of
https://github.com/aquasecurity/kube-hunter.git
synced 2026-05-11 03:37:52 +00:00
Merge pull request #18 from ccojocar/deployment
Add a Dockerfile and a job definition which runs the kube-hunter from inside the cluster
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,3 @@
|
||||
*.pyc
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
*aqua*
|
||||
*aqua*
|
||||
|
||||
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM python:2.7.15-alpine3.7
|
||||
|
||||
RUN apk add --update \
|
||||
linux-headers \
|
||||
build-base
|
||||
|
||||
RUN mkdir -p /kube-hunter
|
||||
COPY . /kube-hunter
|
||||
WORKDIR /kube-hunter
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
ENTRYPOINT ["python", "kube-hunter.py"]
|
||||
14
job.yaml
Normal file
14
job.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: kube-hunter
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: kube-hunter
|
||||
image: aquasec/kube-hunter
|
||||
command: ["python", "kube-hunter.py"]
|
||||
args: ["--pod"]
|
||||
restartPolicy: Never
|
||||
backoffLimit: 4
|
||||
@@ -118,9 +118,5 @@ def main():
|
||||
handler.free()
|
||||
logging.debug("Cleaned Queue")
|
||||
|
||||
if config.pod:
|
||||
while True:
|
||||
time.sleep(5)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user