-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add something like /status or /health to NGINX config #90
Comments
I assume that what you need is the following:
I suggest we add the following annotation to the ConfigMap:
the health check location can be as easy as this: location /nginx-health {
return 200 "healthy\n";
} This location should be added to the default server -- a server that responds to the requests with the host header not matching any Ingress hostnames. Currently, there is no default server deployed, so we need to add it. When the user creates an Ingress rule without a hostname, for example:
this becomes a default server (#79). So we need to make sure that if the user deploys such an Ingress, we add the health location to it. I suggest we add this feature after #77, which will handle cases when multiple Ingress rules with the same hostname exist in the cluster. As a temporal solution you can add the following config to the image: server {
listen 80 default_server;
location /nginx-health {
access_log off;
return 200 "healthy\n";
}
} |
Thanks for the feedback. Sounds great. Then I'll wait for #77. |
It's been a while now. Any news? @pleshakov |
@jmastr As the user can deploy Ingress resources without hostnames, #77 should help to handle merging of the health location and such Ingress resources to handle edge cases. I'd still wait #77 to be completed before starting fully working on the default server. For now, we can add the server {
listen 80 default_server;
location /nginx-health {
access_log off;
return 200 "healthy\n";
}
} Let me know what you think |
Ideally, this feature should be a part of a bigger feature (the default server) that solves nginxinc#52. For now, we add the "-health-status" parameter to the controller. If it is present, the default server listening on port 80 with the health check location "/nginx-health" gets added to the main nginx configuration. Closes nginxinc#90
Much better with default_type text/plain;
|
hi @Alexandr-Pletnev @pleshakov i have 1 doubt in my case from CICD pipeline they add health check part like--/ui/health so from location section we add health check like below or need to change something can you please help me regarding this one: location /ui/health { |
Hi,
I have a setup, where an external LoadBalancer pointing to the NGINX Ingress Controller . The NGINX Ingress Controller serves multiple Kubernetes Namespaces. For the external LoadBalancer's health checker I need a location that is available in all NGINX config files.
ngx_http_stub_status_module
comes to mind, which is already available in the shipped NGINX:Something like this maybe? Is there a better way? How about a new annotation like
nginx.org/status
?The text was updated successfully, but these errors were encountered: