Skip to content

Commit 0e5c8c6

Browse files
feat: PAAL-123 remove delay of readiness probe for agents with subagents; remove tools from sample
1 parent 32d13bb commit 0e5c8c6

File tree

4 files changed

+8
-40
lines changed

4 files changed

+8
-40
lines changed

config/samples/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ resources:
33
- runtime_v1alpha1_agent.yaml
44
- runtime_v1alpha1_agent_template.yaml
55
- runtime_v1alpha1_agent_openai.yaml
6-
- runtime_v1alpha1_agent_no_probe.yaml
76
- configmap.yaml
87
# +kubebuilder:scaffold:manifestskustomizesamples

config/samples/runtime_v1alpha1_agent_no_probe.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

config/samples/runtime_v1alpha1_agent_template.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ spec:
1313
subAgents:
1414
- name: summarizer_agent
1515
url: "https://agents.example.com/summarizer-agent.json"
16-
tools:
17-
- name: news_fetcher
18-
url: "https://news.mcpservers.org/fetch/mcp"
19-
- name: web_fetch
20-
url: "https://remote.mcpservers.org/fetch/mcp"
16+
# Uncommented for now since health probe needs working mcp tools
17+
# tools:
18+
# - name: news_fetcher
19+
# url: "https://news.mcpservers.org/fetch/mcp"
20+
# - name: web_fetch
21+
# url: "https://remote.mcpservers.org/fetch/mcp"
2122
protocols:
2223
- type: A2A
2324
path: "/"

internal/controller/agent_controller.go

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,6 @@ func (r *AgentReconciler) getA2AHealthPath(protocol *runtimev1alpha1.AgentProtoc
424424
// generateReadinessProbe generates appropriate readiness probe based on agent protocols
425425
func (r *AgentReconciler) generateReadinessProbe(agent *runtimev1alpha1.Agent) *corev1.Probe {
426426
// Check if agent has external dependencies (subAgents or tools)
427-
hasExternalDeps := len(agent.Spec.SubAgents) > 0 || len(agent.Spec.Tools) > 0
428427

429428
// Priority: A2A > OpenAI > None
430429
if r.hasA2AProtocol(agent) {
@@ -434,21 +433,15 @@ func (r *AgentReconciler) generateReadinessProbe(agent *runtimev1alpha1.Agent) *
434433
port := r.getProtocolPort(a2aProtocol, 8000)
435434

436435
probe := r.buildA2AReadinessProbe(healthPath, port)
437-
if hasExternalDeps {
438-
// More generous timing for agents with external dependencies
439-
return delay(probe, 180, 20, 10)
440-
}
436+
441437
return probe
442438
} else if r.hasOpenAIProtocol(agent) {
443439
// Use TCP probe for OpenAI-only agents
444440
openaiProtocol := r.getOpenAIProtocol(agent)
445441
port := r.getProtocolPort(openaiProtocol, 8000)
446442

447443
probe := r.buildOpenAIReadinessProbe(port)
448-
if hasExternalDeps {
449-
// More generous timing for agents with external dependencies
450-
return delay(probe, 180, 20, 10)
451-
}
444+
452445
return probe
453446
}
454447

@@ -904,13 +897,3 @@ func (r *AgentReconciler) buildA2AReadinessProbe(healthPath string, port int32)
904897
FailureThreshold: 3,
905898
}
906899
}
907-
908-
// delay modifies probe timing settings for agents with external dependencies
909-
func delay(probe *corev1.Probe, initialDelaySeconds int32, timeoutSeconds int32, failureThreshold int32) *corev1.Probe {
910-
if probe != nil {
911-
probe.InitialDelaySeconds = initialDelaySeconds
912-
probe.TimeoutSeconds = timeoutSeconds
913-
probe.FailureThreshold = failureThreshold
914-
}
915-
return probe
916-
}

0 commit comments

Comments
 (0)