Skip to content

fix(headlamp): allow egress to registry.npmjs.org so the plugin sidecar can bootstrap#2182

Merged
devantler merged 1 commit into
mainfrom
claude/fix-headlamp-npm-egress
Jun 20, 2026
Merged

fix(headlamp): allow egress to registry.npmjs.org so the plugin sidecar can bootstrap#2182
devantler merged 1 commit into
mainfrom
claude/fix-headlamp-npm-egress

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by Claude Code (live investigation of the prod platform)

Problem

The headlamp pod's headlamp-plugin sidecar (node:lts-alpine) is in CrashLoopBackOff. Captured crash (previous-container logs):

npm error code ETIMEDOUT
npm error network request to https://registry.npmjs.org/@headlamp-k8s%2fpluginctl failed

Root cause

The sidecar bootstraps each plugin with npx --yes @headlamp-k8s/pluginctl@latest install ..., which must download pluginctl (+deps) from registry.npmjs.org. That host is not in the Cilium egress toFQDNs allow-list, so Cilium's L7 DNS/FQDN policy drops the request → npm ETIMEDOUTnpx exits 1 → sidecar crashloops on every (re)start.

This is a regression from the world:443 → explicit-FQDN egress lockdown (#2019): the cached plugins on the PVC predate the lockdown, so the dashboard still renders, but the sidecar can no longer re-run pluginctl, and the newly added crossview-headlamp plugin never installs.

Fix

Add registry.npmjs.org to the toFQDNs list in k8s/bases/apps/headlamp/networkpolicy.yaml — the same one-line pattern as the earlier plugin-egress fix (#2112, which added the GitHub release-asset CDN). The networkpolicy is identical local+prod, so the base file is the correct place (consistent with #2112).

Validation

kubectl kustomize k8s/bases/apps/headlamp/ builds; registry.npmjs.org renders in the allow-list.

🤖 Generated with Claude Code

…ar can bootstrap

The headlamp-plugin sidecar runs `npx @headlamp-k8s/pluginctl ...`, which
downloads pluginctl and its dependencies from registry.npmjs.org. That
host is absent from the Cilium egress FQDN allow-list (a regression from
the world:443 -> explicit-FQDN lockdown in #2019), so npm fails with
ETIMEDOUT, the sidecar exits 1, and the pod CrashLoopBackOffs on every
(re)start -- the dashboard never installs new plugins (e.g. the newly
added crossview-headlamp plugin).

Add registry.npmjs.org to the toFQDNs list, mirroring the earlier
plugin-egress fix (#2112) that added the GitHub release-asset CDN.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@devantler devantler marked this pull request as ready for review June 20, 2026 09:48
@devantler devantler merged commit 0187b85 into main Jun 20, 2026
10 checks passed
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board Jun 20, 2026
@devantler devantler deleted the claude/fix-headlamp-npm-egress branch June 20, 2026 09:48
@botantler

botantler Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.69.9 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@botantler botantler Bot added the released label Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant