Repository navigation
Conversation
AddLivenessCheck registers a check that makes /livez return 503 while it fails, so components can ask kubelet for a restart when they are broken in a way a restart fixes (e.g. the container hook's fanotify gatekeeper was lost). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
… gatekeeper - Pin the inspektor-gadget fork to the merge of kubescape/inspektor-gadget#41 (c23a76d66): the fanotify gatekeeper and containerhook.Health. - Register containerhook.Health as a /livez check. - Build cmd/container-hook-gatekeeper from the same IG module version and ship it as /usr/bin/ig-container-hook-gatekeeper in the release and debug images, where the hook looks first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
🔵 Needs a closer look
The privileged fanotify process and host-cgroup changes need human runtime validation because neither image builds nor cluster validation were performed.
No open issues 🎉
What changed in this PR
Adds container-hook health monitoring so Kubernetes can restart node-agent after gatekeeper loss or a stuck watcher, and packages the gatekeeper to protect runc from node-agent stalls.
Changes:
- Adds named liveness checks with error reporting and recovery tests.
- Registers container-hook health with
/livez. - Updates the Inspektor Gadget pin, ships its gatekeeper in both images, and documents the behavior.
| File | Description |
|---|---|
pkg/healthmanager/health_manager.go |
Adds liveness-check registration and failure responses. |
pkg/healthmanager/health_manager_test.go |
Tests healthy, failing, and recovered checks. |
go.sum |
Updates Inspektor Gadget checksums. |
go.mod |
Pins the gatekeeper-enabled Inspektor Gadget revision. |
docs/features/liveness-checks.md |
Documents probe behavior and container-hook health. |
cmd/main.go |
Registers the container-hook liveness check. |
build/README.md |
Documents gatekeeper packaging and fallback behavior. |
build/Dockerfile.debug |
Builds and includes the gatekeeper in debug images. |
build/Dockerfile |
Builds and includes the gatekeeper in release images. |
Review effort: Balanced
Performance Benchmark ResultsNode-Agent Resource Usage
Dedup EffectivenessNo data available. |
kubescape/inspektor-gadget#65 (0920c07e0): a gatekeeper stall ends only on a reply within its event's deadline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
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 freezeruncon the node.HealthManager.AddLivenessCheck(name, check)./livezreturns 503 with the joined errors while a check fails.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./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).0920c07e0), which includes validate we have the resource version before update filtered SBOM #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'sdocs/devel/container-hook-gatekeeper.mdfor 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.Related issues/PRs
🤖 Generated with Claude Code
AI-skills: armosec-shared-rules:agent-dispatch-policy,gh-review,armosec-shared-rules:pr_comments
Summary by CodeRabbit