The Red Hat Enhancer Service is a specialized microservice within the SBOMer architecture responsible for executing Red Hat-specific SBOM enhancement requests.
It acts as a Kubernetes Operator that listens for enhancement events, manages a queue of work, and reconciles Tekton TaskRuns to enrich SBOMs with Red Hat-related information (e.g., downloading source code, adjusting manifests, and finding errata).
This service follows Hexagonal Architecture (Ports and Adapters) to decouple the scheduling logic from the execution infrastructure.
EnhancerService: The "Brain". It manages the internal work queue (Leaky Bucket pattern), enforces concurrency limits, and handles retry policies (e.g., OOM handling).TaskRunFactory: Translates genericEnhancementTaskobjects into specific TektonTaskRundefinitions (YAML), injecting configuration for PNC, Indy, and Koji based on the environment.
KafkaRequestConsumer: Listens to theenhancement.createdtopic. If the request matchesenhancer.name=redhat-enhancer, it queues it for execution.TaskReconciler: A Kubernetes Controller (using Java Operator SDK) that watches forTaskRuncompletion. It filters forsbomer.jboss.org/enhancer-type=redhat-enhancerand updates the core domain when a task succeeds or fails.
TektonEnhancementExecutor: Uses the Fabric8 Kubernetes Client to create/delete TaskRuns in the cluster.KafkaStatusNotifier: Sendsenhancement.updateevents (ENHANCING,FINISHED,FAILED) back to thesbom-servicecontrol plane.
To prevent overwhelming the Kubernetes cluster and external services (PNC/Koji), this service maintains an internal Priority Queue.
sbomer.enhancer.max-concurrent: Controls how many TaskRuns can exist simultaneously.- New requests are queued in memory.
- A scheduler runs every 10s to drain the queue into the cluster as slots become available.
The service detects if a TaskRun was killed due to Out Of Memory (OOM) issues (common when analyzing large container images).
- Detection: The Reconciler parses the container termination reason (
OOMKilled). - Reaction: Instead of failing immediately, the service calculates a new memory limit (using a configurable multiplier) and re-schedules the task transparently.
- Result: The
sbom-serviceonly seesENHANCING->FINISHED, unaware of the retries happening in the background.
The enhanced SBOMs are uploaded directly from the TaskRun pod to the Manifest Storage Service. The Enhancer Service receives the resulting URLs via the TaskRun results and passes them back to the Orchestrator.
| Property | Description | Default |
|---|---|---|
sbomer.redhat-image-enhancer.task-name |
The Tekton Task name to instantiate. | redhat-image-enhancer |
sbomer.enhancer.max-concurrent |
Max active TaskRuns allowed. | 20 |
sbomer.enhancer.oom-retries |
Number of times to retry on OOM. | 3 |
sbomer.enhancer.memory-multiplier |
Factor to increase memory by on retry (e.g. 1.5x). | 1.5 |
sbomer.storage.url |
Internal URL of the storage service reachable by Pods. | http://<svc-name>:8085 |
quarkus.kubernetes-client.namespace |
The namespace where TaskRuns are created. | sbomer |
We can run this component in a Minikube Environment by injecting it as part of the sbomer-platform helm chart.
We provide helper scripts in the hack/ directory to automate the networking and configuration between these two environments.
- Podman (for building images)
- Minikube (Kubernetes cluster)
- Helm (Package manager)
- Maven & Java 17+
- Kubectl
First, ensure you have the sbomer Minikube profile running with Tekton installed.
./hack/setup-local-dev.shSince this component interacts with Red Hat internal services (PNC, Indy, Koji), you must provide their URLs via a .env file in the project root. This file is ignored by git.
Create a .env file:
PNC_HOST=value
INDY_HOST=value
KOJI_HUB_URL=value
KOJI_WEB_URL=value
KOJI_DOWNLOAD_HOST=valueUse the ./hack/run-helm-with-local-build.sh script to start the system. This script performs several critical steps:
- Clones
sbomer-platformto the component repo. - Builds the
redhat-enhancerimage locally and loads it into Minikube. - Injects the
.envconfiguration into the Helm chart values. - Installs the
sbomer-platformhelm chart with your locally built component.
./hack/run-helm-with-local-build.shOnce deployed, you can verify the service is running:
# Check the Enhancer Pod
kubectl get pods -n sbomer-test -l app.kubernetes.io/instance=redhat-enhancer
# Check logs to confirm it connected to Kubernetes and Kafka
kubectl logs -f -n sbomer-test -l app.kubernetes.io/instance=redhat-enhancerTo test the full flow, you can trigger a generation request via the sbom-service API (exposed via the gateway).
First, expose the gateway:
# Port-forward the API Gateway
kubectl port-forward svc/sbomer-release-gateway 8080:8080 -n sbomer-testThen, send a request (example):
curl -X POST http://localhost:8080/api/v1/sboms/generate \
-H "Content-Type: application/json" \
-d '{
"identifier": "[registry.access.redhat.com/ubi8/ubi:latest](https://registry.access.redhat.com/ubi8/ubi:latest)",
"type": "CONTAINER",
"generator": "syft",
"processors": ["default"]
}'You can watch the resulting TaskRun in the cluster:
kubectl get taskruns -n sbomer-test -w