Skip to content

WIP: fix(target-allocator): decode prom-operator types with json:",inline" embedded structs#4992

Draft
ozzywalsh wants to merge 4 commits into
open-telemetry:mainfrom
ozzywalsh:fix/ta-scrapeclass-tls-deserialization
Draft

WIP: fix(target-allocator): decode prom-operator types with json:",inline" embedded structs#4992
ozzywalsh wants to merge 4 commits into
open-telemetry:mainfrom
ozzywalsh:fix/ta-scrapeclass-tls-deserialization

Conversation

@ozzywalsh
Copy link
Copy Markdown
Contributor

No description provided.

… embedded structs

The TA config deserializer uses mapstructure with TagName:"yaml", which
cannot squash embedded structs tagged with json:",inline" (e.g.
TLSConfig embedding SafeTLSConfig and TLSFilesConfig). This silently
drops fields like CAFile and InsecureSkipVerify when deserializing
ScrapeClass TLS configuration from the ConfigMap.

Add a generic decode hook (MapToMonitoringV1) that round-trips all
monitoring/v1 types through sigs.k8s.io/yaml, which internally converts
YAML to JSON and uses json.Unmarshal — correctly handling json:",inline".
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

E2E Test Results

 34 files  253 suites   2h 25m 36s ⏱️
 98 tests  96 ✅ 0 💤 2 ❌
257 runs  254 ✅ 0 💤 3 ❌

Results for commit 75e2a6f.

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant