apiVersion: batch/v1
kind: Job
metadata:
  name: pod-delete
spec:
  template:
    metadata:
      labels:
        app: pod-delete
    spec:
      #nodeName:
        ## mandatory: provide name of host where target container resides
        ## kubernetes.io/hostname: ""
      restartPolicy: Never
      containers:
      - image: litmuschaos/pod-deleter:latest
        imagePullPolicy: Always
        name: pod-delete
        command: 
        - /bin/sh
        args:
        - ./pod-delete.sh 
        env:
            ## optional: provide the value of force
            ## Default set to false
          - name: FORCE
            value: ""
            ## application namespace under pod-delete chaos
          - name: APP_NS
            value: ""
            ## application label under pod-delete chaos
          - name: APP_LABEL
            value: ""
            ## number of kill counts
          - name: KILL_COUNT
            value: ""                        
            ## optional: provide duration for pod-delete chaos
            ## defalut: 15 seconds
          - name: DURATION
            value: ""
          ## chaos namespace
          - name: CHAOS_NAMESPACE
            value: ""
          ## name of chaosengine
          - name: CHAOS_ENGINE
            value: ""
          - name: CHAOS_UID
            value: ""  
          ## optional: provide interval between pod-delete chaos
          ## defalut: 5 seconds
          - name: INTERVAL
            value: ""
          ## helper pod name
          - name: POD_NAME
            value: ""
          - name: ITERATIONS
            value: ""              
        volumeMounts:
          - name: dockersocket
            mountPath: /var/run/docker.sock
      volumes:
        - hostPath:
            path: /var/run/docker.sock
          name: dockersocket
