apiVersion: litmuschaos.io/v1alpha1
description:
  message: |
    Kills the kubelet service on the application node to check the resiliency.
kind: ChaosExperiment
metadata:
  name: kubelet-service-kill
  labels:
    name: kubelet-service-kill
    app.kubernetes.io/part-of: litmus
    app.kubernetes.io/component: chaosexperiment
    app.kubernetes.io/version: latest
spec:
  definition:
    scope: Cluster
    permissions:
      - apiGroups:
          - ""
          - "batch"
          - "litmuschaos.io"
        resources:
          - "jobs"
          - "pods"
          - "pods/log"
          - "pods/exec"
          - "events"
          - "chaosengines"
          - "chaosexperiments"
          - "chaosresults"
        verbs:
          - "create"
          - "list"
          - "get"
          - "patch"
          - "update"
          - "delete"
          - "deletecollection"
      - apiGroups:
          - ""
        resources: 
          - "nodes"
        verbs:
          - "get"
          - "list"
    image: "litmuschaos/go-runner:latest"
    imagePullPolicy: Always
    args:
    - -c
    - ./experiments -name kubelet-service-kill
    command:
    - /bin/bash
    env:
   
    - name: TOTAL_CHAOS_DURATION
      value: '90' # in seconds

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

    - name: LIB
      value: 'litmus'

    # provide lib image
    - name: LIB_IMAGE
      value: 'ubuntu:16.04' 
            
    # provide the target node name
    - name: TARGET_NODE
      value: ''

    labels:
      name: kubelet-service-kill
      app.kubernetes.io/part-of: litmus
      app.kubernetes.io/component: experiment-job
      app.kubernetes.io/version: latest
