Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run probeHTTP on a filter #326

Open
ljansen97 opened this issue Apr 7, 2021 · 0 comments
Open

Run probeHTTP on a filter #326

ljansen97 opened this issue Apr 7, 2021 · 0 comments

Comments

@ljansen97
Copy link

ljansen97 commented Apr 7, 2021

Hi,

I am not sure if this is the right place to ask this, excuse me if it isn't. I am running into a problem, I am killing a pod with the podAction and then doing a probeHttp to check if the service is still available, but as far as I know and could find, it is not possible to set a filter on the probeHttp, meaning cycle it tries to run the test, it will probe the HTTP service even though it isn't killing the service, is there any way around this?

My second (unrelated) question is, currently I am setting the minimum wait time to 29 and maximum wait time to 30 seconds, which means every 30 ish seconds it checks if theres a job to do, if I wanna run a job at 11.05 AM each thursday I currently set the startTime to 11.05 and endTime to 11.06, which means with a wait time of 30 seconds, it will always execute on time, is there a better way to do it?

Below is my YAML for my first question:

- name: Checks the availability after a pod is killed
  description: >
    If a pod gets killed, verify the service is still available

    Ran each week on a thursday at 11.05AM
  steps:
  - podAction:
      matches:
        - deployment:
            name: "service-deployment"
            namespace: "services"
      filters:
        - dayTime:
            onlyDays:
              - "thursday"
            startTime:
              hour: 11
              minute: 05
              second: 0
            endTime:
              hour: 11
              minute: 06
              second: 0
        - randomSample:
            size: 1
      actions:
        - kill:
            probability: 1
  - probeHTTP:
      target:
        url: 'https://service.example.com/'
      endpoint: /health
      code: 200```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant