mirror of
https://github.com/coredns/coredns.git
synced 2026-04-05 11:45:33 -04:00
89 lines
2.4 KiB
Groff
89 lines
2.4 KiB
Groff
.\" Generated by Mmark Markdown Processer - mmark.miek.nl
|
|
.TH "COREDNS-READY" 7 "March 2026" "CoreDNS" "CoreDNS Plugins"
|
|
|
|
.SH "NAME"
|
|
.PP
|
|
\fIready\fP - enables a readiness check HTTP endpoint.
|
|
|
|
.SH "DESCRIPTION"
|
|
.PP
|
|
By enabling \fIready\fP an HTTP endpoint on port 8181 will return 200 OK, when all plugins that are able
|
|
to signal readiness have done so. If some are not ready yet the endpoint will return a 503 with the
|
|
body containing the list of plugins that are not ready.
|
|
|
|
.PP
|
|
Each Server Block that enables the \fIready\fP plugin will have the plugins \fIin that server block\fP
|
|
report readiness into the /ready endpoint that runs on the same port. This also means that the
|
|
\fIsame\fP plugin with different configurations (in potentially \fIdifferent\fP Server Blocks) will have
|
|
their readiness reported as the union of their respective readinesses.
|
|
|
|
.SH "SYNTAX"
|
|
.PP
|
|
.RS
|
|
|
|
.nf
|
|
ready [ADDRESS] {
|
|
monitor until\-ready|continuously
|
|
}
|
|
|
|
.fi
|
|
.RE
|
|
|
|
.PP
|
|
\fIready\fP optionally takes an address; the default is \fB\fC:8181\fR. The path is fixed to \fB\fC/ready\fR. The
|
|
readiness endpoint returns a 200 response code and the word "OK" when this server is ready. It
|
|
returns a 503 otherwise \fIand\fP the list of plugins that are not ready.
|
|
By default, once a plugin has signaled it is ready it will not be queried again.
|
|
|
|
.PP
|
|
The \fIready\fP directive can include an optional \fB\fCmonitor\fR parameter, defaulting to \fB\fCuntil-ready\fR. The following values are supported:
|
|
|
|
.IP \(bu 4
|
|
\fB\fCuntil-ready\fR - once a plugin signals it is ready, it will not be checked again. This mode assumes stability after the initial readiness confirmation.
|
|
.IP \(bu 4
|
|
\fB\fCcontinuously\fR - in this mode, plugins are continuously monitored for readiness. This means a plugin may transition between ready and not ready states, providing real-time status updates.
|
|
|
|
|
|
.SH "PLUGINS"
|
|
.PP
|
|
Any plugin wanting to signal readiness will need to implement the \fB\fCready.Readiness\fR interface by
|
|
implementing a method \fB\fCReady() bool\fR that returns true when the plugin is ready and false otherwise.
|
|
|
|
.SH "EXAMPLES"
|
|
.PP
|
|
Let \fIready\fP report readiness for both the \fB\fC.\fR and \fB\fCexample.org\fR servers (assuming the \fIwhois\fP
|
|
plugin also exports readiness):
|
|
|
|
.PP
|
|
.RS
|
|
|
|
.nf
|
|
\&. {
|
|
ready
|
|
erratic
|
|
}
|
|
|
|
example.org {
|
|
ready
|
|
whoami
|
|
}
|
|
|
|
|
|
.fi
|
|
.RE
|
|
|
|
.PP
|
|
Run \fIready\fP on a different port.
|
|
|
|
.PP
|
|
.RS
|
|
|
|
.nf
|
|
\&. {
|
|
ready localhost:8091
|
|
}
|
|
|
|
.fi
|
|
.RE
|
|
|