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

Automatically exclude liveness/readiness probe endpoints #195

Open
Tracked by #251
roobre opened this issue Jun 9, 2023 · 3 comments
Open
Tracked by #251

Automatically exclude liveness/readiness probe endpoints #195

roobre opened this issue Jun 9, 2023 · 3 comments
Labels
enhancement New feature or request needs evaluation issue needs evaluation to assess viability or impact

Comments

@roobre
Copy link
Member

roobre commented Jun 9, 2023

It is common to add exclusions for liveness/readiness endpoints to the test config, as not doing so may cause probes to fail and the pod to be removed from the service load balancer, or even restarted:

    const fault = {
        // ...
        exclude: '/health,/ready',
    };

However, it might not be immediately obvious to application developers why this needs to be done. As http readiness/liveness probes are defined in the pod spec, it should be possible for the disruptor to check for any http probes present in this spec, and automatically feed them to the proxy.

Proposal

We can make a change in the agent so that, by default, bypasses all requests that include an User-Agent header that starts with kube-probe.

As there can be some cases where we do want for probes to be disrupted, we can add an option to opt-out of this behavior:

{
  includeProbes: true, // Defaults to false.
}
@pablochacin
Copy link
Collaborator

However, it might not be immediately obvious to application developers why this needs to be done.

Maybe this should be documented better

@pablochacin pablochacin added enhancement New feature or request needs evaluation issue needs evaluation to assess viability or impact labels Jun 9, 2023
@roobre
Copy link
Member Author

roobre commented Jun 22, 2023

An alternative solution to this would be for the disruptor to pass-through requests whose User-Agent starts with kube-probe/.

@pablochacin
Copy link
Collaborator

We should consider that in some cases there may be a legitimate case of users wanting to disrupt the probes. Therefore, if we make this the default behavior we should add an option to exclude the probes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs evaluation issue needs evaluation to assess viability or impact
Projects
None yet
Development

No branches or pull requests

2 participants