---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: litmus-experiment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: litmus-experiment
  template:
    metadata:
      labels: 
        app: litmus-experiment
    spec:
      serviceAccountName: pod-fio-stress-sa
      containers:
      - name: gotest
        image: busybox 
        command: 
          - sleep
          - "3600"
        env:
          # provide application namespace
          - name: APP_NAMESPACE
            value: 'default'

          # provide application labels
          - name: APP_LABEL
            value: 'app=nginx'
 
          # provide application kind
          - name: APP_KIND
            value: '' 

          - name: TOTAL_CHAOS_DURATION
            value: '120'
          
          ## Period to wait before injection of chaos in sec
          - name: RAMP_TIME
            value: ''

          - name: LIB
            value: 'litmus'

          # provide the chaos namespace
          - name: CHAOS_NAMESPACE
            value: ''
          
          - name: SEQUENCE
            value: 'serial'

          - name: IO_ENGINE
            value: 'libaio'
        
          - name: IO_DEPTH
            value: '1'
          
          - name: READ_WRITE_MODE
            value: 'randwrite'

          - name: BLOCK_SIZE
            value: '4k'

          # Size in MBs
          - name: SIZE
            value: '5120'

          - name: NUMBER_OF_JOBS
            value: '2'
          
          - name: POD_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.name

          - name: CHAOS_SERVICE_ACCOUNT
            valueFrom:
              fieldRef:
                fieldPath: spec.serviceAccountName