feat(kubectl): Alpine-based kubectl container image (#9809)#9896
Merged
feat(kubectl): Alpine-based kubectl container image (#9809)#9896
Conversation
Alpine 3.21 + kubectl 1.33.2 with sh, curl, wget, jq. Non-root user (uid 65534), drop-ALL-caps safe. Replaces distroless registry.k8s.io/kubectl which lacks /bin/sh for Job scripts.
Contributor
Dependency ReviewThe following issues were found:
Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. License Issuesapps/vm/kubectl/Cargo.toml
OpenSSF Scorecard
Scanned Files
|
…#9809) Add kbve-kubectl Rust CLI with guest-exec, run, and info subcommands for KubeVirt VM lifecycle management via QEMU Guest Agent. Multi-stage Dockerfile using chisel-ubuntu-axum builder. MDX project page wired for ci-docker pipeline.
Replace Alpine runtime with scratch-based chiseled Ubuntu 24.04 using Canonical chisel. Busybox for shell, curl from Ubuntu slice, jq + kubectl as static binaries. Matches the chisel-ubuntu-axum ecosystem pattern.
Set has_test: true, e2e_name: kubectl-e2e, test_framework: typescript so ci-docker builds and tests the image before publish.
The macos-builder VM was unschedulable because the vmx (Intel VT-x) CPU feature was required but the cluster node is AMD EPYC Rome which exposes svm instead. Also switched evictionStrategy to None for single-node compatibility and aligned runStrategy with windows-builder.
…ds, parallel tool checks (#9809) Extract init_tracing(), add kubectl_output() helper with Cow error returns, use serde_json::json! for guest-exec payload (proper escaping), parallelize tool availability checks with futures::join_all, simplify cmd_run match arms.
) - Add #[inline] on init_tracing, kubectl_output, check_tool, cmd_run - Replace futures::join_all with tokio::spawn — drops futures crate (7 sub-crates) from the dependency tree - Hoist TOOLS and VERSION to module-level const - kubectl_output: try String::from_utf8 first to avoid lossy double allocation when output is valid UTF-8 - Extract first_nonempty_line helper for domain parsing
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.
Summary
apps/vm/kubectl/project — chiseled Ubuntu + kubectl with Rust CLI wrapper for KubeVirt VM managementregistry.k8s.io/kubectl(distroless, no/bin/sh) which broke all Job scriptsvmxCPU feature frommacos-builderVM — cluster is AMD EPYC Rome (exposessvmnotvmx), causingUnschedulablenode affinity mismatch. Also setevictionStrategy: NoneandrunStrategy: Manualfor single-node compatibility.Test plan
docker build -t kbve/kubectl:latest apps/vm/kubectl/docker run --rm kbve/kubectl:latest version --clientvirtctl start macos-builder -n angelscript— confirm VMI schedules and bootsRef #9809