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:
Liz Rice
2018-08-17 10:09:15 +01:00
committed by GitHub
4 changed files with 27 additions and 6 deletions

3
.gitignore vendored
View File

@@ -1,4 +1,3 @@
*.pyc
Dockerfile
.dockerignore
*aqua*
*aqua*

12
Dockerfile Normal file
View 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
View 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

View File

@@ -118,9 +118,5 @@ def main():
handler.free()
logging.debug("Cleaned Queue")
if config.pod:
while True:
time.sleep(5)
if __name__ == '__main__':
main()