Status
Warning
This content is part of the legacy version of Waypoint that is no longer actively maintained. For additional information on the new vision of Waypoint, check out this blog post and the HCP Waypoint documentation.
https://pkg.go.dev/github.com/hashicorp/waypoint-plugin-sdk/component#Status
The Status
interface is responsible for reporting on the current health
for resources which have been created by the waypoint deploy
and release
phase. The intended use is to leverage the platforms existing
health check features to determine the overall health.
Status can only be implemented in Platform
and ReleaseManager
components and is implemented through the following interface.
StatusFunc
requires that you return a StatusReport proto message describing
the reported health of the deployment or release. If your plugin pulls a report
from an external platform, you'll need to mark the report as External
.
Each report has a top level Health
which should be the health of the deployment
or release your plugin created. Each report can also describe the resources
involved and their reported health.
https://pkg.go.dev/github.com/hashicorp/waypoint-plugin-sdk/proto/gen#StatusReport
When picking what kind of Health
your deployment or release has, a Waypoint
status report has a few options to fit its status into:
When adding a StatusFunc
to your plugin, you might define one like the following
example in the waypoint-plugin-examples
repo with the filepath
plugin. In
this case, the filepath
plugin creates a file when Waypoint runs a deployment.
The example status check below is not an External
check, because it did
the health check itself rather than pulling from an external report
(such as pod status health in Kubernetes).