feat(shell): add nano and crictl to the shell image - #2706
Open
Quang Nguyen (nddq) wants to merge 1 commit into
Open
feat(shell): add nano and crictl to the shell image#2706Quang Nguyen (nddq) wants to merge 1 commit into
Quang Nguyen (nddq) wants to merge 1 commit into
Conversation
Quang Nguyen (nddq)
requested review from
Camryn Lee (camrynl) and
Steven Nguyen (snguyen64)
September 1, 2026 16:04
Retina Code Coverage ReportTotal coverage no changeIncreased diff
|
Quang Nguyen (nddq)
force-pushed
the
feat/shell-add-nano-crictl
branch
2 times, most recently
from
September 1, 2026 16:28
3cc3d67 to
2eff20d
Compare
Both come from the Azure Linux base repo, the same tier every other package in the image already comes from, and both are published for amd64 and aarch64. crictl gives container-level introspection on the node: which container owns a network namespace, why one keeps restarting, what it logged before it died. It needs no extra capabilities, because --mount-host-filesystem already mounts the host's /run and the containerd socket is therefore present. The image ships an /etc/crictl.yaml pointing at containerd; other runtimes can override it with --runtime-endpoint. Without --mount-host-filesystem the socket is absent and crictl is inert, so this adds no new privilege surface. cri-tools also installs critest, a CRI conformance suite binary as large as crictl itself and with no use in a debug shell. The install layer removes it, which halves the payload of the package. nano covers editing a config or scratch file without leaving the shell. It is chosen over vim for scan hygiene: nano has 4 CVEs on record since 2010, none rated HIGH or CRITICAL, while vim has 250 with 64% HIGH or CRITICAL and takes a CVE-driven version bump in Azure Linux roughly every 12 days. Between releases that would leave findings in the weekly Trivy scan that no one can close. crictl logs opens the kubelet's log files at /var/log/pods itself; the CRI API does not stream log content. The files exist only on the host, so the image ships a symlink from /var/log/pods to /host/var/log/pods. The read-only /host mount is enough for the read, and the link dangles harmlessly when --mount-host-filesystem is not set. Docs gain a crictl section and a note that the host's /run is mounted read-write even without --allow-host-filesystem-write. Signed-off-by: Quang Nguyen <28567936+nddq@users.noreply.github.com>
Quang Nguyen (nddq)
force-pushed
the
feat/shell-add-nano-crictl
branch
from
September 1, 2026 16:53
2eff20d to
576e742
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
retina shellships no text editor and no tool to inspect the node's containers from the runtime's point of view. This PR adds two packages from the Azure Linux 3.0 base repo, the same tier every other package in the image comes from. Both are published foramd64andaarch64.cri-tools: providescrictl. It needs no extra capabilities —--mount-host-filesystemalready mounts the host's/run, so the containerd socket is present in the container. The image ships an/etc/crictl.yamlthat points at the containerd socket. Clusters on another CRI implementation override it withcrictl --runtime-endpoint. Without--mount-host-filesystemthe socket is absent andcrictlis inert, so the package grants nothing the flag did not already grant. The install layer removescritest, a CRI conformance suite binary as large ascrictlitself and with no use in a debug shell. The image also ships a symlink from/var/log/podsto/host/var/log/pods—crictl logsopens the kubelet's log files itself, and they exist only on the host. The read-only/hostmount covers the read, and the link dangles harmlessly when the flag is not set.nano: lets you edit a config or scratch file inside the shell.docs/06-Troubleshooting/shell.mdgets acrictlsection and namesnanoin the tool list. It documents that the host's/runmount is always read-write — pre-existing behavior fromshell/manifests.go, only documented here.nanoovervimis deliberate.trivy.yamlscansretina-shellweekly onCRITICAL,HIGH.nanohas 4 CVEs since 2010, none rated HIGH or CRITICAL.vimhas 250, and Azure Linux bumps it for a CVE roughly every 12 days. Between releases, that parks HIGH findings in the scan that nobody can close without a release.Related Issue
Supersedes #2705 — same change, reopened from an in-repo branch.
Checklist
git commit -S -s ...). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
Image built locally for
amd64and tested on a kind cluster (containerd v2.3.1). The test pod mirrors the--mount-host-filesystemspec fromshell/manifests.go: host/read-only at/host, host/runat/run, and no added capabilities.crictl version,crictl pods,crictl ps, andcrictl inspectwork against the live runtime with only the shipped/etc/crictl.yaml— no endpoint flags.crictl logsreturns the container's log lines out of the box, through the baked-in symlink and the read-only/hostmount.nano6.4 andcrictl1.32.0 run in the built image;critestis absent.markdownlint-cli2reports 0 issues on the changed doc.Additional Notes
Two stale entries in the doc's Limitations section (
bpftrace,nsenter) are left alone to keep this PR focused.