Initial revisin of healthchecker, inspired by HAProxy

This commit is contained in:
2026-04-10 17:30:44 +02:00
commit b84b3274b1
24 changed files with 4400 additions and 0 deletions

27
Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
FROM golang:1.25 AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN make build
# ---- runtime image ----------------------------------------------------------
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
iproute2 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /src/bin/healthchecker /usr/local/bin/healthchecker
# Required capabilities:
# CAP_NET_ADMIN — create/delete GRE tunnel interfaces via netlink
# CAP_NET_RAW — open raw ICMP sockets for health probing
#
# Grant these in your container runtime, e.g.:
# docker run --cap-add NET_ADMIN --cap-add NET_RAW ...
# or in Kubernetes via securityContext.capabilities.add
ENTRYPOINT ["/usr/local/bin/healthchecker"]