Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions controllers/gorch/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ func (r *GuardrailsOrchestratorReconciler) reconcileGatewayRoute(ctx context.Con
ServiceName: orchestrator.Name + "-service",
PortName: "gateway",
Termination: utils.StringPointer(gatewayTermination),
Annotations: map[string]string{
// Fix for RHOAIENG-33054: Set HAProxy timeout to 5 minutes
// Gateway route handles LLM traffic that can exceed default 30s timeout
"haproxy.router.openshift.io/timeout": "5m",
},
}
err := utils.ReconcileRoute(ctx, r.Client, orchestrator, routeConfig, routeTemplatePath, templateParser.ParseResource)
return err
Expand All @@ -33,6 +38,11 @@ func (r *GuardrailsOrchestratorReconciler) reconcileOrchestratorRoute(ctx contex
ServiceName: orchestrator.Name + "-service",
PortName: "https",
Termination: utils.StringPointer(utils.Reencrypt),
Annotations: map[string]string{
// Fix for RHOAIENG-33054: Set HAProxy timeout to 5 minutes
// LLM-based guardrails detection can take longer than the default 30s
"haproxy.router.openshift.io/timeout": "5m",
},
}
err := utils.ReconcileRoute(ctx, r.Client, orchestrator, routeConfig, routeTemplatePath, templateParser.ParseResource)
return err
Expand All @@ -48,6 +58,11 @@ func (r *GuardrailsOrchestratorReconciler) reconcileBuiltInDetectorRoute(ctx con
ServiceName: orchestrator.Name + "-service",
PortName: "built-in-detector",
Termination: utils.StringPointer(termination),
Annotations: map[string]string{
// Fix for RHOAIENG-33054: Set HAProxy timeout to 5 minutes
// Built-in detector route handles LLM traffic that can exceed default 30s timeout
"haproxy.router.openshift.io/timeout": "5m",
},
}
err := utils.ReconcileRoute(ctx, r.Client, orchestrator, routeConfig, routeTemplatePath, templateParser.ParseResource)
return err
Expand Down
6 changes: 6 additions & 0 deletions controllers/gorch/templates/route.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ metadata:
labels:
app: {{.Owner.Name}}
component: {{.Owner.Name}}
{{- if .Annotations}}
annotations:
{{- range $key, $value := .Annotations}}
{{$key}}: {{$value}}
{{- end}}
{{- end}}
spec:
to:
kind: Service
Expand Down
1 change: 1 addition & 0 deletions controllers/utils/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type RouteConfig struct {
Owner *metav1.Object
PortName string
Termination *string
Annotations map[string]string // Fix for RHOAIENG-33054: HAProxy timeout annotations
}

const (
Expand Down
Loading