Repository navigation
Summary
Picks up kubescape/inspektor-gadget#41 (merged as c23a76d66): the container hook now answers runc's fanotify permission events from a separate gatekeeper process with a deadline, so a stalled node-agent can no longer freeze runc on the node.
- Pluggable liveness checks:
HealthManager.AddLivenessCheck(name, check)./livezreturns 503 with the joined errors while a check fails. - Container-hook check:
cmd/main.goregisterscontainerhook.Health. It fails when the gatekeeper was lost, or when a watcher has spent more than 30s on one event while another waits for it. In both cases the node keeps working, but containers are no longer detected until node-agent restarts. Running without a gatekeeper does not fail it, since a restart doesn't change that. - Gatekeeper binary: the release and debug images ship
/usr/bin/ig-container-hook-gatekeeper, built from the same IG module version as node-agent (likefence-provision). The hook tries it first; without it, it re-executes node-agent as the gatekeeper (~18 MB more, charged to node-agent's cgroup). - IG pin: bumped to the merge of kubescape/inspektor-gadget#65 (
0920c07e0), which includes #41 and ends a gatekeeper stall only on a reply within its event's deadline. The other replace directives already match the fork'sgo.mod.
Overview
Docs: docs/features/liveness-checks.md, build/README.md, and the fork's docs/devel/container-hook-gatekeeper.md for the design.
How to Test
go test ./pkg/healthmanager/(newTestLivenessProbe_Checks).go build ./cmdandgo build github.com/inspektor-gadget/inspektor-gadget/cmd/container-hook-gatekeeperpass.- The gatekeeper itself is tested in the fork: root tests in its CI, plus k3s A/B runs reproducing the customer freeze.
- Not done locally: an image build and a cluster run.
Related issues/PRs
- kubescape/inspektor-gadget#41
- kubescape/inspektor-gadget#65 (merged: end a stall only on a reply in time)
🤖 Generated with Claude Code
AI-skills: armosec-shared-rules:agent-dispatch-policy,gh-review,armosec-shared-rules:pr_comments
Summary by CodeRabbit
- New Features
- Container images, including debug images, now include the container-hook gatekeeper.
- The liveness endpoint runs registered component health checks and returns an error status with details when a check fails. The container hook is included as a monitored component.
- Documentation
- Added information about liveness and readiness endpoints, health-check behavior, and the container-hook gatekeeper.