Repository navigation
feat(ubi-bash): add a UBI-based minimal shell image - #61
Open
krishnaGajabi wants to merge 3 commits into
Open
krishnaGajabi wants to merge 3 commits into
krishnaGajabi wants to merge 3 commits into
Conversation
The helper and init containers in the OpenEBS charts currently use alpine-sh / alpine-bash. Some deployments need those images to sit on a vendor-supported minimal base instead of Alpine, so add a third option built on ubi9/ubi-micro. ubi-micro already ships bash and coreutils-single, which covers every command the helper and probe scripts use (timeout, sleep, date, chown), so nothing is installed and the image needs no package manager. netcat is deliberately absent. bash's /dev/tcp redirection does the same job for the readiness probes, which lets the image stay package-manager free rather than pulling in a netcat and its dependency tree. ubi-micro publishes no linux/arm/v7 and does publish linux/s390x, so the build and release workflows now take the platform list per matrix entry instead of one list shared by every image. The existing three images keep exactly the list they had. `make test` checks the tools with `command -v` rather than `which`, which ubi-micro does not ship, and asserts that /dev/tcp correctly reports a closed port instead of asserting that nc exists. Signed-off-by: krishnaGajabi <gajbikrishna23@gmail.com>
Author
|
The chart-side change that consumes this image is up as a draft: openebs/mayastor-extensions#1143. It is blocked on a linux-utils release carrying |
krishnaGajabi
marked this pull request as ready for review
December 2, 2026 08:52
krishnaGajabi
marked this pull request as draft
December 2, 2026 08:58
…scriminate Restating only some of ubi-micro's labels left the image describing the base rather than itself: `version` read 9.9 and `release` carried Red Hat's build id, on every release of this image. Set both from build arguments the workflows already produce, along with url, build-date and the io.k8s pair. build.yml now passes RELEASE_TAG too, so a develop build labels itself with the tag it was built as. com.redhat.component, com.redhat.license_terms and cpe stay inherited on purpose. They describe the base layer accurately, and cpe is what vulnerability scanners read to select the Red Hat CVE feed. The /dev/tcp assertion checked that a closed port is refused. A bash built without net redirections fails that same exec, reporting "No such file or directory" for the literal path, so the assertion passed whether or not the feature existed -- which is the one thing the absent netcat depends on. Grep for the refusal instead, so only a bash that reaches connect(2) passes. Signed-off-by: krishnaGajabi <gajbikrishna23@gmail.com>
registry.access.redhat.com/ubi9/ubi-micro:9.9 is rebuilt in place, so the bare tag names different content over time: it moved from sha256:b59ac4f2 to sha256:dbd325b9 within one week, before this branch was even opened. Nothing in this repo rebuilds a published image tag -- build.yml runs on pushes to develop and release.yml on a release -- so the floating tag was not delivering base fixes to any published image. It only changed what the next build happened to pick up, with no diff to show for it, and it left the scheduled trivy scan free to change verdict with no commit behind it. Pinning turns a base change into something reviewable and gives that scan a line to point at. The alpine images keep their plain tags on purpose: Alpine does not rebuild a patch tag, so alpine:3.23.5 is already immutable. The digest is the manifest list, not a per-architecture one; verified to build for all four platforms this image targets. Signed-off-by: krishnaGajabi <gajbikrishna23@gmail.com>
krishnaGajabi
marked this pull request as ready for review
December 2, 2026 10:01
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.
Adds a third helper image,
ubi-bash, built onregistry.access.redhat.com/ubi9/ubi-micro:9.9, alongside the existingalpine-shandalpine-bash.Why
The helper and init containers in the OpenEBS charts run on Alpine today. Some deployments need those images to sit on a vendor-supported minimal base instead, and there is currently no option in this repo that offers one. This adds the option without changing anything about the existing three images.
What it ships
ubi-microalready providesbashandcoreutils-single, which covers every command the helper and probe scripts use —timeout,sleep,date,chown. Nothing is installed on top, so the image carries no package manager. Result is ~23 MB.netcat is deliberately absent. bash's
/dev/tcpredirection does the same job for the readiness probes:That keeps the image package-manager-free rather than pulling in a netcat and its dependency tree for one connect check.
There is also no FIPS configuration, by design.
ubi-microships no crypto at all — no libcrypto, libssl, gnutls, nss oropensslbinary — and the probes speak plain TCP, never TLS. Addingopenssl-fips-providerwould mean a crypto stack, and its CVE surface, for code nothing in the image calls. On a FIPS-enabled host the kernel is in FIPS mode regardless.Platform list is now per-image
ubi-micro:9.9publishesamd64,arm64,ppc64leands390x— nolinux/arm/v7, which the shared platform list inbuild.ymlandrelease.ymlrequires. So the list moves into the matrix entry:The three existing images keep exactly the list they had today.
Tests
ubi-microships nowhich, so the newmake testassertions usecommand -v, and check that/dev/tcpcorrectly fails on a closed port rather than checking thatncexists.Verified locally against the built image: