---
apiVersion: litmuschaos.io/v1alpha1
description:
  message: |
    Kill the pool pod and check if gets scheduled again
kind: ChaosExperiment
metadata:
  labels:
    litmuschaos.io/name: openebs
    name: openebs-pool-pod-failure
    app.kubernetes.io/part-of: litmus
    app.kubernetes.io/component: chaosexperiment
    app.kubernetes.io/version: latest
  name: openebs-pool-pod-failure
spec:
  definition:
    scope: Cluster
    permissions:
      - apiGroups:
          - ""
          - "extensions"
          - "apps"
          - "batch"
          - "litmuschaos.io"
          - "openebs.io"
          - "storage.k8s.io"
        resources:
          - "deployments"
          - "replicasets"
          - "jobs"
          - "pods/log"
          - "events"
          - "pods"
          - "configmaps"
          - "secrets"
          - "storageclasses"
          - "persistentvolumeclaims"
          - "cstorvolumereplicas"
          - "chaosengines"
          - "chaosexperiments"
          - "chaosresults"
        verbs:
          - "create"
          - "get"
          - "delete"
          - "list"
          - "patch"
          - "update"
      - apiGroups:
          - ""
        resources:
          - "nodes"
        verbs:
          - "get"
          - "list"
    image: "litmuschaos/ansible-runner:latest"
    imagePullPolicy: Always
    args:
    - -c
    - ansible-playbook ./experiments/openebs/openebs-pool-pod-failure/openebs_pool_pod_failure_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
    command:
    - /bin/bash
    env:
    - name: ANSIBLE_STDOUT_CALLBACK
      value: default

    - name: OPENEBS_NS
      value: 'openebs'

    - name: APP_PVC
      value: ''

    - name: LIVENESS_APP_LABEL
      value: ''

    - name: LIVENESS_APP_NAMESPACE
      value: '' 

    - name: CHAOS_ITERATIONS
      value: '2'

     # provide the kill count
    - name: KILL_COUNT
      value: ''

    - name: DATA_PERSISTENCE
      value: ''

    labels:
      name: openebs-pool-pod-failure
      app.kubernetes.io/part-of: litmus
      app.kubernetes.io/component: experiment-job
      app.kubernetes.io/version: latest
    #configmaps:
    #- name: openebs-pool-pod-failure
    #  mountPath: /mnt
      
