diff --git a/.chloggen/resourcedetection-aks-panic.yaml b/.chloggen/resourcedetection-aks-panic.yaml new file mode 100755 index 000000000000..921ad3c560f1 --- /dev/null +++ b/.chloggen/resourcedetection-aks-panic.yaml @@ -0,0 +1,20 @@ +# Use this changelog template to create an entry for release notes. +# If your change doesn't affect end users, such as a test fix or a tooling change, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: processor/resourcedetection + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: make sure to use a aks config struct instead of nil to avoid collector panic + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [24549] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/processor/resourcedetectionprocessor/config.go b/processor/resourcedetectionprocessor/config.go index 6d667edeb455..a2da68ae9591 100644 --- a/processor/resourcedetectionprocessor/config.go +++ b/processor/resourcedetectionprocessor/config.go @@ -116,6 +116,8 @@ func (d *DetectorConfig) GetConfigFromType(detectorType internal.DetectorType) i return d.LambdaConfig case azure.TypeStr: return d.AzureConfig + case aks.TypeStr: + return d.AksConfig case consul.TypeStr: return d.ConsulConfig case docker.TypeStr: diff --git a/processor/resourcedetectionprocessor/testdata/config.yaml b/processor/resourcedetectionprocessor/testdata/config.yaml index 42acce86c364..6cde1f5251c5 100644 --- a/processor/resourcedetectionprocessor/testdata/config.yaml +++ b/processor/resourcedetectionprocessor/testdata/config.yaml @@ -9,6 +9,11 @@ resourcedetection/openshift: tls: insecure: true +resourcedetection/aks: + detectors: [ env, aks ] + timeout: 2s + override: false + resourcedetection/gcp: detectors: [env, gcp] timeout: 2s