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

flag to bypass readiness check for target manager for /ready endpoint #1919

Closed
alexanderGalushka opened this issue Apr 8, 2020 · 0 comments · Fixed by #1920
Closed

flag to bypass readiness check for target manager for /ready endpoint #1919

alexanderGalushka opened this issue Apr 8, 2020 · 0 comments · Fixed by #1920

Comments

@alexanderGalushka
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I run promtail in k8s with readiness probe. It is used to solely scrape the logs for the worker which are not deterministic in its startup time (meaning the worker pods are not there when the promtail starts and might not be there for some unpredictable time). As a very first step in the scrape_config I check if the worker pod label is set if it is not promtail moves on.
Having promtail target manager not ready (meaning no target log files to be scraped, as described above) reports 500 for the /ready endpoint call. It causes a lot of confusion, misinterpretation actual promtail startup state, breaks deploys.
It might work for some use cases but doesn't work for the use case described above. Having an ability to control the definition of the promtail being ready is needed.

Describe the solution you'd like
Implement a simple flag to bypass the target manager check for /ready endpoint, which can be set in the promtail yaml config, e.g. readiness_target_manager_bypass=true (set to false by default)
Apply the condition here.

Describe alternatives you've considered
Implement /health endpoint which can alternatively be used for the readiness probe, which just returns OK 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
1 participant