apiVersion: batch/v1
kind: Job
metadata:
  name: httpx-BBS_PROJECT_CODE
  labels:
    app: httpx-BBS_PROJECT_CODE
spec:
  ttlSecondsAfterFinished: 100
  template:
    metadata:
      labels:
        app: httpx-BBS_PROJECT_CODE
    spec:
      volumes:
      - name: data-volume
        hostPath: 
          path: /mnt/volume_lon1_01
          type: Directory
      containers:
      - name: httpx-BBS_PROJECT_CODE
        image: golang:rc-stretch
        volumeMounts:
        - name: data-volume
          mountPath: /optdata
        command: 
        - /bin/bash
        - -c
        - |
          echo httpx v1
          echo Code: BBS_PROJECT_CODE
          echo Id: BBS_PROJECT_ID
          echo List: BBS_PROJECT_LIST
          GO111MODULE=on go get -v github.com/projectdiscovery/httpx/cmd/httpx
          
          
          mkdir -p /optdata/BBS/output/project-data/BBS_PROJECT_CODE/data/scanner/httpx/data/$HOSTNAME/
          cd /optdata/BBS/output/project-data/BBS_PROJECT_CODE/data/scanner/httpx/
          
          
          
          cat /optdata/BBS/output/project-data/BBS_PROJECT_CODE/BBS_PROJECT_LIST | httpx -no-color -title -tech-detect -status-code -follow-redirects > data/$HOSTNAME/httpx.txt
          
          cp data/$HOSTNAME/httpx.txt ./httpx.txt

          
          
                    
          echo all done
      restartPolicy: Never

