Skip to content

Commit bd1efa2

Browse files
feat: add metrics security support, refactor health probe configuration, and enforce MCP health interval validation
Signed-off-by: Ankit Kr. Chowdhury <rakesh856100@gmail.com>
1 parent 9c63753 commit bd1efa2

4 files changed

Lines changed: 20 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ metadata:
202202
spec:
203203
image: ghcr.io/my-org/search-agent:v2.0.0
204204
tenantRef: team-search
205+
replicas:
206+
min: 1
207+
max: 4
208+
metric: queueDepth
209+
target: 25
205210
rollout:
206211
strategy: Canary
207212
steps:

charts/agentrax/templates/deployment.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ spec:
4040
{{- if .Values.manager.leaderElect }}
4141
- --leader-elect
4242
{{- end }}
43-
- --health-probe-bind-address={{ .Values.manager.healthProbeBindAddress | default ":8081" }}
43+
- --health-probe-bind-address=:{{ .Values.manager.healthProbeBindPort | default 8081 }}
4444
- --metrics-bind-address={{ .Values.manager.metricsBindAddress | default "0" }}
45+
{{- if hasKey .Values.manager "metricsSecure" }}
46+
- --metrics-secure={{ .Values.manager.metricsSecure }}
47+
{{- end }}
4548
- --registry-bind-address={{ .Values.registry.bindAddress | default ":9090" }}
4649
- --gpu-resource-name={{ .Values.manager.gpuResourceName | default "nvidia.com/gpu" }}
4750
{{- if .Values.prometheus.url }}

charts/agentrax/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ manager:
6666
leaderElect: false
6767
# -- Bind address for metrics. Use ":8443" for HTTPS, ":8080" for HTTP, "0" to disable.
6868
metricsBindAddress: "0"
69-
# -- Bind address for health/readiness probes.
70-
healthProbeBindAddress: ":8081"
71-
# -- Bind port for health/readiness probes (referenced by liveness/readiness probes).
69+
# -- Serve metrics securely over HTTPS. Set to false for HTTP.
70+
metricsSecure: true
71+
# -- Bind port for health/readiness probes (used for container port, probes, and manager bind address).
7272
healthProbeBindPort: 8081
7373
# -- GPU resource name used for quota calculation.
7474
gpuResourceName: "nvidia.com/gpu"

cmd/main.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,14 @@ func main() {
235235
}
236236
}
237237

238+
if mcpHealthInterval >= registryTTL {
239+
setupLog.Info("AGENTRAX_MCP_HEALTH_INTERVAL must be strictly less than AGENTRAX_REGISTRY_TTL",
240+
"configuredInterval", mcpHealthInterval,
241+
"registryTTL", registryTTL,
242+
"adjustedInterval", registryTTL/2)
243+
mcpHealthInterval = registryTTL / 2
244+
}
245+
238246
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
239247
Scheme: scheme,
240248
Metrics: metricsServerOptions,

0 commit comments

Comments
 (0)