-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[k8sobjectsreceiver] Degrade gracefully, when watched CRDs are not found #38803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I can see two possible approaches to handle this
What do you think? |
I think a new config option is a good idea and will make sure that any changes to behavior are introduced in a non-breaking way. I think there are probably 2 modes to start:
I want to think about the situation in mode 2 where all objects cannot be found. Should the receiver still start? |
IMO it's better to start than being in a CrashLoopBackOff. I am fine making this depend on error_mode, and only fail when it's set to propagate. |
@TylerHelmuth, I was wondering if you could help us out here: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/38851/files#r2010626635 Today, the receiver's My original approach was to introduce |
I have filed open-telemetry/opentelemetry-collector#12715 to follow up on the behavior of the Validate function. |
/label waiting-for-code-owners |
…#38851) #### Description This PR adopts a similar logic to `ottl.ErrorMode` for `k8sobjectsreceiver`, enabling users to choose between ignoring, silencing, and propagating errors for missing objects. The default is `propagate`, therefore it is backward compatible with the current state. <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes #38803 <!--Describe what testing was performed and which tests were added.--> #### Testing Added tests, and also tested by building my own image and deployed into a Kubernetes cluster. <!--Describe the documentation added.--> #### Documentation I've updated `receiver/k8sobjectsreceiver/config.yaml` and README with the new config options. <!--Please delete paragraphs that you did not use before submitting.-->
…open-telemetry#38851) #### Description This PR adopts a similar logic to `ottl.ErrorMode` for `k8sobjectsreceiver`, enabling users to choose between ignoring, silencing, and propagating errors for missing objects. The default is `propagate`, therefore it is backward compatible with the current state. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#38803 <!--Describe what testing was performed and which tests were added.--> #### Testing Added tests, and also tested by building my own image and deployed into a Kubernetes cluster. <!--Describe the documentation added.--> #### Documentation I've updated `receiver/k8sobjectsreceiver/config.yaml` and README with the new config options. <!--Please delete paragraphs that you did not use before submitting.-->
…open-telemetry#38851) #### Description This PR adopts a similar logic to `ottl.ErrorMode` for `k8sobjectsreceiver`, enabling users to choose between ignoring, silencing, and propagating errors for missing objects. The default is `propagate`, therefore it is backward compatible with the current state. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#38803 <!--Describe what testing was performed and which tests were added.--> #### Testing Added tests, and also tested by building my own image and deployed into a Kubernetes cluster. <!--Describe the documentation added.--> #### Documentation I've updated `receiver/k8sobjectsreceiver/config.yaml` and README with the new config options. <!--Please delete paragraphs that you did not use before submitting.-->
Uh oh!
There was an error while loading. Please reload this page.
Component(s)
receiver/k8sobjects
What happened?
Description
Today, if you specify a list of CRDs to be watched, the collector won't start if any of them are missing and stay in CrashLoopBackOff.
Steps to Reproduce
Apply the following receiver and use it in a pipeline without having
telemetries.telemetry.istio.io
installed on your cluster.Expected Result
The collector should start, and the receiver should be able to watch all CRDs it has found.
Actual Result
Error: invalid configuration: receivers::k8sobjects: resource XY not found. Valid resources are: [ helmchartconfigs configmaps rolebindings etc. ...
Collector version
v0.115.0
Environment information
Environment
N/A
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: