Commit a78d9bf
Restructure MCPTelemetryConfig CRD to nested spec per RFC THV-0023 (#4487)
* Restructure MCPTelemetryConfig CRD to nested spec per RFC THV-0023
The MCPTelemetryConfig spec was using a flat inline embedding of
telemetry.Config which exposed CLI-only fields and didn't match the
nested structure specified in RFC THV-0023.
Restructure to use openTelemetry/prometheus sub-objects:
- spec.openTelemetry: endpoint, headers, sensitiveHeaders,
resourceAttributes, tracing, metrics, useLegacyAttributes
- spec.prometheus: enabled
- status.referencingWorkloads: structured WorkloadReference
(kind/namespace/name) replacing bare string list
Update the conversion layer (spectoconfig, controllerutil) to map
the nested CRD types to the flat telemetry.Config at runtime. Add
operator example YAML files for MCPTelemetryConfig and MCPServer
with telemetryConfigRef.
Closes #4262
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Consolidate telemetry examples into single multi-document YAML
Combine MCPTelemetryConfig and MCPServer-with-ref examples into
mcpserver_fetch_otel.yaml as a single apply-able file. Remove the
separate telemetry-configs directory.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Address review: gate OTel on Enabled flag, add endpoint CEL validation
Fix two issues from PR review:
- NormalizeMCPTelemetryConfig now gates OTel config on Enabled flag,
matching ConvertTelemetryConfig behavior. Setting enabled: false
correctly disables OTLP even if sub-fields are populated.
- Add CEL validation rejecting endpoint when neither tracing nor
metrics is enabled, catching the misconfiguration at admission
time instead of failing at proxy runner startup.
Add test cases covering both scenarios.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix CEL rule YAML quoting in CRD manifests
Use single-quoted YAML for the endpoint validation CEL rule to match
the quoting style of other CEL rules in the chart. Double-quoted YAML
caused the rule value to include literal quote characters, failing
CRD installation with a CEL syntax error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix OTel collector endpoint in telemetry example
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Move endpoint validation to Validate(), fix smart quote corruption
The gci linter was replacing ASCII quotes with Unicode smart quotes
(U+201C/U+201D) in kubebuilder annotations, breaking controller-gen
CRD generation. Additionally, the CEL rule for endpoint validation
generated double-quoted YAML that the Helm wrapper mishandled.
Move the endpoint-requires-signals validation from a CEL rule to the
programmatic Validate() method, which avoids both issues and provides
clearer error messages. Add test case for this validation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Reuse shared WorkloadReference type from MCPOIDCConfig
Remove duplicate WorkloadReference definition from
mcptelemetryconfig_types.go and use the shared type already
defined in mcpoidcconfig_types.go. Drop the Namespace field
(cross-namespace refs are not supported) to match the shared
type's schema.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 862f9b8 commit a78d9bf
15 files changed
Lines changed: 735 additions & 449 deletions
File tree
- cmd/thv-operator
- api/v1alpha1
- controllers
- pkg
- controllerutil
- runconfig
- spectoconfig
- test-integration
- mcp-server
- mcp-telemetry-config
- deploy/charts/operator-crds
- files/crds
- templates
- docs/operator
- examples/operator/mcp-servers
Lines changed: 89 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
| |||
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
33 | 32 | | |
34 | | - | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
38 | | - | |
39 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
40 | 55 | | |
41 | 56 | | |
42 | 57 | | |
43 | 58 | | |
44 | 59 | | |
45 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
46 | 96 | | |
47 | 97 | | |
48 | 98 | | |
| |||
59 | 109 | | |
60 | 110 | | |
61 | 111 | | |
62 | | - | |
| 112 | + | |
63 | 113 | | |
64 | | - | |
| 114 | + | |
65 | 115 | | |
66 | 116 | | |
67 | 117 | | |
68 | 118 | | |
69 | 119 | | |
70 | | - | |
| 120 | + | |
71 | 121 | | |
72 | | - | |
| 122 | + | |
| 123 | + | |
73 | 124 | | |
74 | 125 | | |
75 | 126 | | |
| |||
115 | 166 | | |
116 | 167 | | |
117 | 168 | | |
118 | | - | |
| 169 | + | |
119 | 170 | | |
120 | 171 | | |
121 | 172 | | |
122 | 173 | | |
123 | 174 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
128 | 189 | | |
129 | 190 | | |
130 | 191 | | |
131 | 192 | | |
132 | 193 | | |
133 | 194 | | |
134 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
135 | 200 | | |
136 | | - | |
| 201 | + | |
137 | 202 | | |
138 | 203 | | |
139 | | - | |
| 204 | + | |
140 | 205 | | |
141 | 206 | | |
142 | | - | |
| 207 | + | |
143 | 208 | | |
144 | | - | |
| 209 | + | |
145 | 210 | | |
146 | 211 | | |
147 | 212 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 39 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
111 | | - | |
112 | | - | |
| 110 | + | |
| 111 | + | |
113 | 112 | | |
114 | | - | |
| 113 | + | |
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
120 | | - | |
| 119 | + | |
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
| |||
129 | 128 | | |
130 | 129 | | |
131 | 130 | | |
132 | | - | |
| 131 | + | |
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
| |||
142 | 141 | | |
143 | 142 | | |
144 | 143 | | |
145 | | - | |
| 144 | + | |
146 | 145 | | |
147 | 146 | | |
148 | 147 | | |
| |||
187 | 186 | | |
188 | 187 | | |
189 | 188 | | |
190 | | - | |
191 | | - | |
| 189 | + | |
| 190 | + | |
192 | 191 | | |
193 | | - | |
| 192 | + | |
194 | 193 | | |
195 | 194 | | |
196 | 195 | | |
197 | | - | |
198 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
199 | 202 | | |
200 | 203 | | |
201 | 204 | | |
| |||
220 | 223 | | |
221 | 224 | | |
222 | 225 | | |
223 | | - | |
| 226 | + | |
224 | 227 | | |
225 | | - | |
| 228 | + | |
226 | 229 | | |
227 | 230 | | |
228 | | - | |
| 231 | + | |
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
233 | 236 | | |
234 | | - | |
| 237 | + | |
235 | 238 | | |
236 | 239 | | |
237 | 240 | | |
238 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
239 | 245 | | |
240 | 246 | | |
241 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
242 | 256 | | |
243 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
0 commit comments