Observing Your Platform Health with Native Quarkus and CronJobs


Author: Sergio Canales • June 2025
Repo: https://github.com/scanalesespinoza/platform-stability-mvp
🧭 Table of Contents
- Motivation and Context: A Typical Day for a Platform Engineer
- Lightweight & “Green” Architecture
- Our Native Quarkus Microservice
- CronJob with Kubernetes CLI (oc ≃ kubectl)
- Integration with Teams and Front-End
- Native and Container Deployment
- Why Not ELK?
- Lessons for New Platform Engineers
1. Motivation and Context: A Typical Day for a Platform Engineer
Who hasn’t shown up on a Monday to dozens of alerts about Pods constantly restarting? Or had the team say, “The API is down!”, and not known where to begin?
It’s the classic moment when we ask ourselves: how can we instantly monitor our namespaces’ health without spinning up ELK or draining resources and time? That’s when this lightweight MVP was born: a ninja script, a native Quarkus service, and a couple of simple dashboards.
2. Lightweight & “Green” Architecture
Just like choosing to walk instead of drive to protect the planet, this project embraces “green software.” Green apps are designed to minimize carbon footprint and resource consumption. They matter because they lower operational costs, reduce data-center energy usage, and promote sustainable practices.
What makes this app green?
- Compiled natively with GraalVM/Quarkus: ultra-fast startup and minimal memory.
- CronJob runs a single lightweight CLI image (
oc
orkubectl
) instead of a heavy stack.- Simple charts with minimal libraries.
flowchart LR
subgraph Cluster
CronJob -->|oc get| API
API -->|POST CSV| Frontend
end
Frontend -->|Alerts| Teams
User -->|UI Query| Frontend
- CronJob: uses
oc
(orkubectl
) in minimal containers. - Native Quarkus: starts in the blink of an eye with tiny RAM usage.
- Qute + Chart.js: clear visuals without bloat.
- Teams: instant notifications.
3. Our Native Quarkus Microservice
It often happens: you need a REST API, a fast UI, and health checks… without a 1 GB container.
- FIFO Cache (
app.max-reports
): we store only what’s essential. - Endpoints:
/reports/upload
,/summary-page
,/detail-page
. - Qute for HTML rendering and Chart.js for availability percentage charts.
- SmallRye Health with
/health/live
and/health/ready
.
4. CronJob with Kubernetes CLI (oc ≃ kubectl)
Remember that time a Pod wouldn’t start and you spent 30 minutes chasing logs? With our CronJob, you see everything in five minutes:
#!/bin/bash
set -euxo pipefail
log(){ echo "[$(date -u +%FT%TZ)] $1"; }
log "Fetching namespaces..."
for ns in $(oc projects -q); do
log "Checking $ns"
oc get deploy -n $ns --no-headers | while read name ready _; do
r=${ready%%/*}; d=${ready##*/}
if [[ $r -ne $d ]]; then
echo "$ns,$name,$(date -u +%FT%TZ)" >> /tmp/not_ready.csv
fi
done
done
You can swap oc
for kubectl
using images like lachlanevenson/k8s-kubectl
.
5. Integration with Teams and Front-End
Then someone says: “I posted a report in the team chat, take a look.” With a single click you open:
- The availability trend at
/summary-page
. - Details of each resource at
/detail-page?name=…
.
6. Native and Container Deployment
Like testing your app before production:
./mvnw clean package -Pnative,container -Dquarkus.native.container-build=true -Dquarkus.container-image.builder=podman -Dquarkus.container-image.push=true
Then with Podman:
podman run -d -p 8080:8080 -e FRONTEND_URL=http://localhost:8080 quay.io/sergio_canales_e/txt-report-frontend:1.0.0
7. Why Not ELK?
Sometimes less is more: you don’t need 50 GB of disk and 4 extra CPUs to know if a deployment is unhealthy. This MVP fits in a few MB container.
8. Lessons for New Platform Engineers
🌟 Energy Alert! This project embraces Platform Engineering principles:
- Visibility: gives your team immediate feedback.
- Simplicity: minimal components, easy to understand and extend.
- Sustainability: conscious resource use, mindful of the environment.
- Collaboration: share this MVP, document your workflow, and teach newcomers.
Building lightweight solutions shows that complex problems don’t always need heavyweight tools. Be the champion of a green and efficient approach in your organization!
Try it out and contribute! https://github.com/scanalesespinoza/platform-stability-mvp
Subscribe to my newsletter
Read articles from Sergio Canales directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
