---
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: azure-disk-loss-sa
      containers:
      - name: gotest
        image: busybox 
        command: 
          - sleep
          - "3600"
        env:
          # provide application namespace
          - name: APP_NAMESPACE
            value: ''

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

          - name: TOTAL_CHAOS_DURATION
            value: ''

          # provide auxiliary application details - namespace and labels of the applications
          # sample input is - "ns1:app=percona,ns2:name=nginx"
          - name: AUXILIARY_APPINFO
            value: ''
          
          ## Period to wait before injection of chaos in sec
          - name: RAMP_TIME
            value: ''

          ## env var that describes the library used to execute the chaos
          ## default: litmus
          - name: LIB
            value: ''

          # provide the chaos namespace
          - name: CHAOS_NAMESPACE
            value: ''
          
          # provide target container name
          - name: TARGET_CONTAINER
            value: ''
          
          # provide the resouce group of the instance
          - name: RESOURCE_GROUP
            value: ''
          
          # provide the virtual disk names (comma seperated if multiple)
          - name: VIRTUAL_DISK_NAMES
            value: ''
          
          # whether the disk is attached to scale instance or not, accepted values are disable, enable
          - name: SCALE_SET
            value: 'disable'
          
          # provide the sequence type for the run. Options: serial/parallel
          - name: SEQUENCE
            value: ''
          
          # provide the path to aks credentials mounted from secret
          - name: AZURE_AUTH_LOCATION
            value: '/tmp/azure.auth'

            
          - name: POD_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.name

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

