11# Tekton EventListener for MLOps Benchmarking
22
3- This directory contains a Tekton EventListener implementation that triggers the sast-ai-orchestrator MLOps batch API via webhook. This enables automated MLOps performance testing and benchmarking with DVC data versioning and S3 integration .
3+ This directory contains a Tekton EventListener implementation that triggers the sast-ai-orchestrator MLOps batch API via webhook. This enables automated MLOps performance testing and benchmarking with DVC data versioning.
44
55## 🎯 Purpose
66
77Enable MLOps benchmark testing for batch SAST analysis jobs:
88- ✅ Webhook-based triggering (curl/HTTP POST)
99- ✅ Integration with sast-ai-orchestrator MLOps API (` /api/v1/mlops-batches ` )
1010- ✅ DVC data versioning support
11- - ✅ S3 object storage integration
1211- ✅ Container image version testing
1312- ✅ Separation from production workflows
1413- ✅ Fork-friendly configuration
@@ -90,8 +89,6 @@ make eventlistener \
9089- ✅ Deploys all EventListener resources via Kustomize
9190- ✅ Shows verification and testing commands
9291
93- ** Note:** The Google Sheet URL is provided via the webhook payload when triggering the EventListener, not during deployment.
94-
9592** Note:** The EventListener always calls ` /api/v1/mlops-batches ` endpoint (hardcoded for MLOps benchmarking).
9693
9794Verify deployment:
@@ -118,12 +115,11 @@ http://el-benchmark-mlop-listener.<namespace>.svc.cluster.local:8080
118115curl -X POST http://localhost:8080 \
119116 -H ' Content-Type: application/json' \
120117 -d ' {
121- "batch_sheet_url": "https://docs.google.com/spreadsheets/d/YOUR_TEST_SHEET/edit",
122118 "submitted_by": "manual-test",
123- "dvc_repo_url ": "https://gitlab.com/your-org/dvc-repo.git ",
124- "dvc_data_version ": "v1.0.0",
125- "s3_endpoint_url ": "https://s3.amazonaws.com ",
126- "s3_input_bucket_name ": "mlops-test-data "
119+ "image_version ": "v2.1.0 ",
120+ "dvc_nvr_version ": "v1.0.0",
121+ "dvc_known_false_positives_version ": "v1.0.0 ",
122+ "dvc_prompts_version ": "v1.0.0 "
127123 }'
128124```
129125
@@ -132,13 +128,11 @@ curl -X POST http://localhost:8080 \
132128curl -X POST http://localhost:8080 \
133129 -H ' Content-Type: application/json' \
134130 -d ' {
135- "batch_sheet_url": "https://docs.google.com/spreadsheets/d/YOUR_TEST_SHEET/edit",
136131 "submitted_by": "version-test",
137- "dvc_repo_url": "https://gitlab.com/your-org/dvc-repo.git",
138- "dvc_data_version": "v1.0.0",
139- "s3_endpoint_url": "https://s3.amazonaws.com",
140- "s3_input_bucket_name": "mlops-test-data",
141- "image_version": "v2.1.0"
132+ "image_version": "v2.1.0",
133+ "dvc_nvr_version": "v1.0.0",
134+ "dvc_known_false_positives_version": "v1.0.0",
135+ "dvc_prompts_version": "v1.0.0"
142136 }'
143137```
144138
@@ -182,9 +176,10 @@ Calling Orchestrator MLOps Batch API
182176Configuration:
183177 Orchestrator URL: http://sast-ai-orchestrator...
184178 API Endpoint: /api/v1/mlops-batches (MLOps benchmarking)
185- Batch Sheet URL: https://docs.google.com/...
186- DVC Repo: https://gitlab.com/...
187- S3 Bucket: mlops-test-data
179+ Image Version: v2.1.0
180+ DVC NVR Version: v1.0.0
181+ DVC Prompts Version: v1.0.0
182+ DVC Known False Positives Version: v1.0.0
188183 ...
189184✓ API call successful!
190185Batch ID: batch-12345
@@ -220,7 +215,7 @@ oc logs -l tekton.dev/pipelineTask=call-orchestrator-api --tail=100
220215- Orchestrator URL incorrect in ConfigMap
221216- Orchestrator service not running: ` oc get pods -l app=sast-ai-orchestrator `
222217- Network policy blocking connections
223- - Google Sheet URL not accessible by orchestrator
218+ - DVC version parameters not provided in webhook payload
224219
225220#### Verify ConfigMap
226221
@@ -243,26 +238,22 @@ Send JSON payload with these fields:
243238
244239``` json
245240{
246- "batch_sheet_url" : " https://docs.google.com/spreadsheets/d/SHEET_ID/edit" ,
247241 "submitted_by" : " trigger-source" ,
248- "dvc_repo_url" : " https://gitlab.com/org/dvc-repo.git" ,
249- "dvc_data_version" : " v1.2.3" ,
250- "s3_endpoint_url" : " https://s3.amazonaws.com" ,
251- "s3_input_bucket_name" : " mlops-data" ,
242+ "dvc_nvr_version" : " v1.2.3" ,
243+ "dvc_known_false_positives_version" : " v1.2.3" ,
244+ "dvc_prompts_version" : " v1.2.3" ,
252245 "image_version" : " v2.0.0"
253246}
254247```
255248
256249** Required Fields:**
257- - ` batch_sheet_url ` - Google Sheet with package list
258- - ` dvc_repo_url ` - DVC repository URL
259- - ` dvc_data_version ` - DVC data version tag
260- - ` s3_endpoint_url ` - S3 endpoint URL
261- - ` s3_input_bucket_name ` - S3 bucket name
250+ - ` dvc_nvr_version ` - DVC NVR resource version
251+ - ` dvc_prompts_version ` - DVC prompts resource version
252+ - ` dvc_known_false_positives_version ` - DVC known false positives resource version
262253
263254** Optional Fields:**
264255- ` submitted_by ` - Defaults to "eventlistener-webhook"
265- - ` image_version ` - Override workflow version for testing (e.g., "v2.1.0", "sha-abc123")
256+ - ` image_version ` - Defaults to "latest" (e.g., "v2.1.0", "sha-abc123")
266257
267258### ConfigMap Keys
268259
@@ -281,13 +272,11 @@ The `benchmark-config` ConfigMap is automatically generated by `make eventlisten
281272
282273| Parameter | Type | Required | Default | Description |
283274| -----------| ------| ----------| ---------| -------------|
284- | ` batch-sheet-url ` | string | Yes | - | Google Sheet with package list |
275+ | ` dvc-nvr-version ` | string | ** Yes** | - | DVC NVR resource version |
276+ | ` dvc-prompts-version ` | string | ** Yes** | - | DVC prompts resource version |
277+ | ` dvc-known-false-positives-version ` | string | ** Yes** | - | DVC known false positives resource version |
285278| ` submitted-by ` | string | No | ` eventlistener-webhook ` | Trigger source identifier |
286- | ` dvc-repo-url ` | string | Yes | - | DVC repository URL for data versioning |
287- | ` dvc-data-version ` | string | Yes | - | DVC data version tag |
288- | ` s3-endpoint-url ` | string | Yes | - | S3 endpoint URL |
289- | ` s3-input-bucket-name ` | string | Yes | - | S3 bucket name for input data |
290- | ` image-version ` | string | No | (default from pipeline) | Workflow image version for testing (tag only, e.g., "v2.1.0") |
279+ | ` image-version ` | string | No | ` latest ` | Workflow image version for testing (tag only, e.g., "v2.1.0") |
291280
292281## 🎓 Understanding the Architecture
293282
@@ -339,6 +328,7 @@ The `benchmark-config` ConfigMap is automatically generated by `make eventlisten
339328 │ Orchestrator API │
340329 │ POST /api/v1/ │
341330 │ mlops-batches │
331+ │ (with DVC versions) │
342332 └──────────────────────┘
343333```
344334
@@ -351,10 +341,21 @@ The `benchmark-config` ConfigMap is automatically generated by `make eventlisten
3513412 . ** TriggerBinding** : Extracts parameters from webhook JSON payload (including MLOps params)
3523423 . ** TriggerTemplate** : Generates PipelineRun with extracted parameters
3533434 . ** Pipeline** : Orchestrates task execution, monitors completion, handles results
354- 5 . ** Task 1 (call-orchestrator-api)** : Calls orchestrator MLOps API with DVC/S3 params
344+ 5 . ** Task 1 (call-orchestrator-api)** : Calls orchestrator MLOps API with DVC version params
3553456 . ** Task 2 (poll-batch-status)** : Monitors batch completion until done or timeout
3563467 . ** ConfigMap** : Stores environment-specific configuration (orchestrator URL, API endpoint)
357347
348+ ## 🔄 Production Enhancements
349+
350+ For production use, consider:
351+
352+ ### Automation
353+
354+ 1 . ** Create CronJob** for scheduled benchmarking
355+ 2 . ** Set up monitoring** (Prometheus metrics)
356+ 3 . ** Configure notifications** (Slack/email on completion/failure)
357+ 4 . ** Add retry logic** for transient failures
358+
358359### Production Deployment
359360
360361Deploy to dedicated namespace:
@@ -381,8 +382,6 @@ This creates both:
381382- The ` mlop-sast-ai-workflow-pipeline ` that the orchestrator will trigger
382383- The EventListener webhook endpoint for triggering benchmarks
383384
384- ** Note:** The Google Sheet URL is provided when triggering the EventListener via webhook, not during deployment.
385-
386385## 🧹 Cleanup
387386
388387To remove all MLOps benchmark resources:
0 commit comments