refactor(api): remove spec.trace from AgentRuntime CRD - #377
Conversation
3bd2015 to
72c2819
Compare
Strip the tracing configuration from the AgentRuntime API surface. Tracing configuration now lives exclusively in cluster and namespace-level ConfigMaps, not per-CR fields. - Remove TraceSpec, SamplingSpec, and TraceProtocol types from agentruntime_types.go - Remove trace overrides from AgentRuntimeOverrides and ResolveConfig - Clean up controller config resolution (drop Trace from resolvedConfig) - Update sample YAMLs (remove trace blocks, keep identity) - Regenerate CRD manifests and deepcopy via controller-gen - Update all affected tests and docs Ref: RHAIENG-4932 Signed-off-by: Daniels Nagornuks <dnagornu@redhat.com> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
72c2819 to
0c74a2a
Compare
pdettori
left a comment
There was a problem hiding this comment.
Clean, thorough removal of dead spec.trace code from the AgentRuntime CRD. The TraceSpec, SamplingSpec, and TraceProtocol types were populated from the CR but never consumed by any reconciliation or injection path — genuine dead code from inception.
Areas reviewed: Go (API types, controller, webhook/injector), Helm/CRD manifests, Docs, Tests, YAML samples, Security, Commit conventions
Spec alignment (specs/001-agentcard-into-status/): No conflict. That spec adds status.card (card discovery) while this PR removes dead fields from spec.trace — orthogonal subresources and concerns. spec.identity (SPIFFE) is preserved, which the card-discovery mTLS path depends on.
CI: All 15 checks passing.
Commit: Single squashed commit, DCO signed-off, conventional format.
No issues found. LGTM.
Summary
Removes the per-workload tracing configuration (
spec.trace) from the AgentRuntime CRD, along with theTraceSpec,SamplingSpec, andTraceProtocoltypes. Tracing configuration was never consumed by any reconciliation or injection path. — theResolvedConfig.TraceEndpoint/TraceProtocol/TraceSamplingRatefields were populated from the CR but never consumed by the pod mutator or container builder, making them dead code from inception. The MLflow controller also has no trace/OTEL references.Changes
TraceSpec,SamplingSpec, andTraceProtocoltypes fromagentruntime_types.gospec.tracefield fromAgentRuntimeSpecand regenerate CRD manifests / deepcopyAgentRuntimeOverridesandextractOverridesin the webhook injectortraceConfigstruct andTracefield from the controller'sresolvedConfig(config-hash computation)TraceEndpoint/TraceProtocol/TraceSamplingRatefields fromResolvedConfig— these were never read by any code pathResolveConfigTesting
make fmt vetandmake test— passpre-commit run --all-files— all hooks passRelated Issues
Resolves: RHAIENG-4932 (partial — trace removal only; identity retained)
Made with Cursor