---
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: docker-service-kill-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. Supported values: litmus, powerfulseal, chaoskube
            - name: LIB
              value: ""

            # provide the chaos namespace
            - name: CHAOS_NAMESPACE
              value: ""

            - name: NODE_LABEL
              value: ""

            - name: TARGET_NODE
              value: ""

            - name: TARGET_CONTAINER
              value: ""

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

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