salus
salus is a Rust health check tool for Docker and Kubernetes workloads. It provides a single-shot probe execution model that fits container health checks cleanly.
Supported probe types:
http/httpstcpgrpc(standardgrpc.health.v1.Health/Checkonly)execfile
Design Goals
- Single execution with stable exit codes for Docker
HEALTHCHECKand Kubernetesexecprobes - Works in minimal container images without requiring a shell
- Supports strict TLS, custom CAs, client certificates, and SNI / hostname overrides
- Failure output is optimized for troubleshooting, while successful probes stay quiet by default
Architecture
salus is easiest to understand as a runtime adapter between the container platform and the probe target inside the workload.
flowchart LR
subgraph Platform["Container platform"]
Docker["Docker HEALTHCHECK"]
K8s["Kubernetes exec probe"]
end
subgraph Container["Application container"]
Salus["salus"]
HttpTarget["HTTP / HTTPS endpoint"]
TcpTarget["TCP listener / Unix socket"]
GrpcTarget["gRPC health service"]
FileTarget["State / readiness file"]
ExecTarget["Local validation command"]
end
Docker --> Salus
K8s --> Salus
Salus --> HttpTarget
Salus --> TcpTarget
Salus --> GrpcTarget
Salus --> FileTarget
Salus --> ExecTarget
Salus --> Result["Exit code 0 / 1 / 3 / 4"]
Result --> Docker
Result --> K8s
Exit Codes
0: healthy1: probe failure3: invalid arguments or configuration4: internal error
Examples
HTTP:
TCP:
gRPC health:
Exec:
File:
Docker
The production Dockerfile builds a static musl binary and runs it from scratch.
Published images are pushed to ghcr.io/lvillis/salus:<tag> and stable tags also update ghcr.io/lvillis/salus:latest.
HEALTHCHECK --interval=10s --timeout=3s --retries=3 CMD ["/bin/salus", "http", "--url", "http://127.0.0.1:8080/healthz"]
Copy salus into an application image:
FROM ghcr.io/lvillis/salus:latest AS salus
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=salus /bin/salus /bin/salus
COPY ./my-app /bin/my-app
HEALTHCHECK --interval=10s --timeout=3s --retries=3 CMD ["/bin/salus", "http", "--url", "http://127.0.0.1:8080/healthz", "--body-contains", "ok"]
ENTRYPOINT ["/bin/my-app"]
Kubernetes
Prefer native httpGet, tcpSocket, and grpc probes for simple cases. Use exec with salus when you need stricter TLS controls, file checks, process-based checks, or richer assertions.
livenessProbe:
exec:
command:
- /bin/salus
- grpc
- --address
- 127.0.0.1:50051
- --tls
- --ca-file
- /etc/tls/ca.pem
- --server-name
- localhost