You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(helm): honour bindAddress=0 as a metrics disable signal
The `controller.metrics.bindAddress` value mirrors the controller's
`--metrics-bind-address` flag, and that flag's documented contract
treats `0` as "disable the metrics server" (see
go/core/pkg/app/app.go:145-146). Letting the chart silently render an
invalid `containerPort: 0` when the operator follows that contract is
surprising; treat the binary's disable sentinel as another way of
saying `controller.metrics.enabled=false`.
Wrap the existing `kagent.controller.metricsPort` helper with a new
`kagent.controller.metricsEnabled` helper that returns truthy only
when `enabled` is true *and* the resolved port is a real, non-zero
value. Switch the Service, both ClusterRoles, the ClusterRoleBinding,
and the Deployment env/port wiring over to the new helper so the two
disable signals are equivalent in their effect on rendered manifests.
The escape-hatch behaviour is unchanged: setting
`METRICS_BIND_ADDRESS` via `controller.env` still shifts only the
runtime listener and cannot move the chart-rendered Service.
Addresses review feedback on #1803.
Signed-off-by: Daniel Orbach <ddorbach@gmail.com>
0 commit comments