Link Search Menu Expand Document

Pods reschedule SLO

Table of contents

  1. Scenario
  2. Policy

Scenario

Let’s say we want to verify that if pod is deleted, it will be rescheduled and running with a specified time.

You can do that easily with the Seal.

Policy

scenarios:
- name: Check pod rescheduling SLO
  description: >
    Verifies that after a pod is killed,
    it's succesfully rescheduled after 30 seconds.
  steps:

  # kill a pod
  - podAction:
      matches:
        - namespace: some-namespace
      filters:
        - randomSample:
            size: 1
      actions:
        - kill:
            force: true

  # wait the minimal time for the SLO
  - wait:
      seconds: 30

  # make sure all pods are running in the namespace
  - podAction:
      matches:
        - namespace: some-namespace
      actions:
        - checkPodState:
            state: Running
        - checkPodCount:
            count: 2

© 2020 Bloomberg Finance L.P.