Skip to content

Add HTTP API for health checks and scan triggers#12

Closed
bakayolo wants to merge 1 commit intomainfrom
add-http-trigger
Closed

Add HTTP API for health checks and scan triggers#12
bakayolo wants to merge 1 commit intomainfrom
add-http-trigger

Conversation

@bakayolo
Copy link
Copy Markdown
Collaborator

Adds a lightweight HTTP server on port 8081 (HTTP_PORT):

  • GET /healthz — health check (can replace the TCP probe on the disabled gRPC port)
  • POST /scan — triggers an OrchestratorWorkflow and returns the workflow/run ID as JSON

This makes it easy to trigger scans without needing the Temporal CLI or mTLS certs:

# Via port-forward
kubectl port-forward svc/version-guard 8081:8081
curl -X POST http://localhost:8081/scan

# Or from within the cluster
curl -X POST http://version-guard.version-guard:8081/scan

Adds a lightweight HTTP server on port 8081 (configurable via HTTP_PORT):
- GET /healthz - health check endpoint
- POST /scan - triggers an OrchestratorWorkflow and returns the workflow ID

This allows triggering scans via simple HTTP calls (e.g. curl, port-forward)
without needing the Temporal CLI or mTLS certs.

Amp-Thread-ID: https://ampcode.com/threads/T-019d7d00-6416-7611-be48-6f8c0b961df1
Co-authored-by: Amp <amp@ampcode.com>
@bakayolo bakayolo closed this Apr 15, 2026
@bakayolo bakayolo deleted the add-http-trigger branch April 15, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant