Include maniftests that can run load with the benchmark pod for techempower and petclinic benchmark#71
Open
kusumachalasani wants to merge 4 commits intokruize:masterfrom
Open
Include maniftests that can run load with the benchmark pod for techempower and petclinic benchmark#71kusumachalasani wants to merge 4 commits intokruize:masterfrom
kusumachalasani wants to merge 4 commits intokruize:masterfrom
Conversation
Signed-off-by: kusuma chalasani <kchalasa@redhat.com>
Reviewer's GuideAdds Kubernetes manifests for TechEmpower Quarkus RESTEasy Hibernate and Spring Petclinic benchmarks, including app and database deployments, services, in-cluster load generator Jobs, and ServiceMonitors for Prometheus scraping. Sequence diagram for benchmark load job waiting on app readiness and running loadsequenceDiagram
participant TFB_Load_Job as tfb-qrh-load-generator Job
participant Init as wait-for-tfb initContainer
participant Load as tfb-qrh-load container
participant TFB_Service as tfb-qrh-service
participant TFB_App as tfb-qrh application Pod
TFB_Load_Job->>Init: Start initContainer wait-for-tfb
Init->>TFB_Service: HTTP GET /plaintext
TFB_Service->>TFB_App: Forward request to app
TFB_App-->>TFB_Service: 200 OK when ready
TFB_Service-->>Init: 200 OK
Init-->>TFB_Load_Job: Exit 0 (app is ready)
TFB_Load_Job->>Load: Start tfb-qrh-load container
Load->>TFB_Service: Run Phase 1 ramp-up (plaintext, db, queries)
TFB_Service->>TFB_App: Handle Phase 1 traffic
Load->>TFB_Service: Run Phase 2 plaintext (CPU focus)
TFB_Service->>TFB_App: Handle Phase 2 traffic
Load->>TFB_Service: Run Phase 3 db (pool focus)
TFB_Service->>TFB_App: Handle Phase 3 traffic
Load->>TFB_Service: Run Phase 4 queries (memory focus)
TFB_Service->>TFB_App: Handle Phase 4 traffic
Load-->>TFB_Load_Job: Complete benchmark and exit
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The
test-volumein thetfb-qrh-sampleDeployment is declared without a type (e.g.emptyDir,hostPath, etc.), which makes the manifest invalid; define an appropriate volume source underspec.volumes. - The
loadgensidecar exits after running the load script, and with a Deployment's defaultrestartPolicy: Alwaysthis will cause the whole pod to restart and rerun the load in a loop; consider making this aninitContainer, a separateJob, or otherwise adjusting the workload/restart semantics. - The Postgres
postStarthook uses a fixedsleep 10before runningpsql, which is prone to race conditions on slower starts; consider replacing this with an initContainer that waits for readiness or a more robust readiness check before seeding the database.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `test-volume` in the `tfb-qrh-sample` Deployment is declared without a type (e.g. `emptyDir`, `hostPath`, etc.), which makes the manifest invalid; define an appropriate volume source under `spec.volumes`.
- The `loadgen` sidecar exits after running the load script, and with a Deployment's default `restartPolicy: Always` this will cause the whole pod to restart and rerun the load in a loop; consider making this an `initContainer`, a separate `Job`, or otherwise adjusting the workload/restart semantics.
- The Postgres `postStart` hook uses a fixed `sleep 10` before running `psql`, which is prone to race conditions on slower starts; consider replacing this with an initContainer that waits for readiness or a more robust readiness check before seeding the database.
## Individual Comments
### Comment 1
<location path="techempower/manifests/kruize-runtimes/quarkus-resteasy-hibernate.yaml" line_range="70" />
<code_context>
+ 1200 \
+ 1024 \
+ 8096
+ echo "wrk finished"
+
+---
</code_context>
<issue_to_address>
**suggestion:** Log message at the end of the loadgen script is misleading relative to the tool being run.
The container runs `/opt/run_hyperfoil_load.sh`, but the final log line says `wrk finished`, which is misleading when reading logs. Please update the message (e.g., `echo "hyperfoil load finished"`) to reflect the actual tool being used.
```suggestion
echo "hyperfoil load finished"
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
techempower/manifests/kruize-runtimes/quarkus-resteasy-hibernate.yaml
Outdated
Show resolved
Hide resolved
Signed-off-by: kusuma chalasani <kchalasa@redhat.com>
Contributor
|
@sourcery-ai review |
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- In the
tfb-qrh-sampleDeployment, thetest-volumeis referenced by avolumeMountbut the corresponding volume definition has no type (e.g.emptyDir: {}or PVC), which will prevent the pod from starting; define the volume source underspec.volumes. - The PetClinic
ServiceMonitorselectsapp: petclinic-app, but neither thepetclinic-servicenor the Deployment's pod template uses that label (they useapp: petclinic-deployment), so the ServiceMonitor will not match anything; align the labels between the ServiceMonitor selector and the Service/Pod labels.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the `tfb-qrh-sample` Deployment, the `test-volume` is referenced by a `volumeMount` but the corresponding volume definition has no type (e.g. `emptyDir: {}` or PVC), which will prevent the pod from starting; define the volume source under `spec.volumes`.
- The PetClinic `ServiceMonitor` selects `app: petclinic-app`, but neither the `petclinic-service` nor the Deployment's pod template uses that label (they use `app: petclinic-deployment`), so the ServiceMonitor will not match anything; align the labels between the ServiceMonitor selector and the Service/Pod labels.
## Individual Comments
### Comment 1
<location path="spring-petclinic/manifests/kruize-demos/service-monitor.yaml" line_range="8-10" />
<code_context>
+ targetPort: 8081
+ nodePort: 32334
+ name: petclinic-port
+ selector:
+ app: petclinic-deployment
+---
</code_context>
<issue_to_address>
**issue (bug_risk):** ServiceMonitor selector label does not match the Service/Deployment labels, so nothing will be scraped.
The ServiceMonitor is selecting `app: petclinic-app`, but the Service/Deployment use `app: petclinic-deployment`, and the Service metadata in `petclinic.yaml` doesn’t define `app: petclinic-app`. This mismatch means the ServiceMonitor won’t discover any targets; please update the label to match the Service you intend to monitor.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
chandrams
reviewed
Mar 16, 2026
| @@ -0,0 +1,98 @@ | |||
| # 1. PetClinic Service: Fixed port 8081 and matching selectors | |||
| apiVersion: v1 | |||
Contributor
There was a problem hiding this comment.
@kusumachalasani Can you update the benchmark readme to indicate that on using these manifests load is run internally
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.
Include kruize-runtimes manifests in the TechEmpower benchmark so that the pod runs the load internally instead of relying on a separate Docker image.
Summary by Sourcery
Add Kubernetes manifests to run internal load-generating benchmarks for TechEmpower Quarkus RESTEasy Hibernate and Spring Petclinic applications, including their database and monitoring setup.
New Features: