You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, services have a built-in health checker (portHealthChecker) that verifies the container ports defined in withExposedPort are reachable.
Sometimes, this is not enough for services binding ports before they're actually healthy.
Dagger could provide a way to define "custom" healthchecks.
Possible solutions:
Define a custom command that gets invoked in the service container to check for health
Same as above, but use the HEALTHCHECK docker/oci directive
Dagger uses HEALTHCHECK to check for service readiness (would also work for any container images having that metadata)
Dagger provides a WithHealthcheck (also useful for non-services to export the HEALTHCHECK metadata)
Define a custom container that gets executed to check for health
Same concept as above, but the health check container can be an entirely different thing than the actual service container
The main advantage is running health checks on 3rd party containers that might lack the toolchain to actually test (e.g. curl, grep etc on a nginx container)
IMHO, the HEALTHCHECK approach feels better:
It's somewhat "standard"
A ton of OCI images already come with healthchecks that would work out of the box with dagger
WithHealthcheck is useful even outside of services to publish OCI images with that metadata
Currently, services have a built-in health checker (
portHealthChecker
) that verifies the container ports defined inwithExposedPort
are reachable.Sometimes, this is not enough for services binding ports before they're actually healthy.
Dagger could provide a way to define "custom" healthchecks.
Possible solutions:
HEALTHCHECK
docker/oci directiveHEALTHCHECK
to check for service readiness (would also work for any container images having that metadata)WithHealthcheck
(also useful for non-services to export theHEALTHCHECK
metadata)nginx
container)IMHO, the
HEALTHCHECK
approach feels better:WithHealthcheck
is useful even outside of services to publish OCI images with that metadata/cc @vito
The text was updated successfully, but these errors were encountered: