-
Notifications
You must be signed in to change notification settings - Fork 450
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
Add allocation_fallback_strategy option as fallback strategy for per-node strategy #3482
Add allocation_fallback_strategy option as fallback strategy for per-node strategy #3482
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change, so we either have to mark it as such, or hide it behind a feature gate. I'd prefer the latter, but am willing to be convinced otherwise. We'll discuss it during today's SIG meeting, feel free to join if you'd like to contribute @lhp-nemlig.
On a more technical note, you'll need to sign the CLA and add a changelog entry before we can merge this PR.
@swiatekm I have changed the PR to add fallback strategy as a config option, making this a non-breaking change as the default is NO fallback. |
I'm ok with this, but keep in mind that in order for this to actually be usable, you'll also need to add an attribute to the OpenTelemetryCollector CRD. That's not a problem, but since in that case you're changing the public API, it's going to invite more scrutiny during review. Just FYI. |
Ok @swiatekm, I expect to join the SIG meeting and you can tell me what I need to do in order to complete this |
@lhp-nemlig as per our discussion during the SIG meeting, the simplest way to proceed with this change without needing to add attributes to the CRDs, would be to:
You can add feature flags here and the target allocator ConfigMap is generated here. Feature flags are global, so you can just import the package, and add the config value for the fallback strategy if the flag is enabled. Does that make sense? |
@swiatekm Thanks for the clear instructions, I believe everything should be in order now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me overall, had some minor comments and nitpicks. I'm fine merging this PR as-is when they're addressed, but in an ideal world we'd also include an e2e test showing the fallback strategy assigning targets without Nodes when the flag is enabled. I'm ok with that happening in a follow-up though, as this is an off-by-default feature flag, and writing these kinds of tests in chainsaw isn't very straightforward.
Co-authored-by: Mikołaj Świątek <[email protected]>
Co-authored-by: Mikołaj Świątek <[email protected]>
Co-authored-by: Mikołaj Świątek <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for the contribution!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you for your contribution 🙇
Feature flag available since `v0.114.0` (Add allocation_fallback_strategy option as fallback strategy for per-node strategy [#3482](open-telemetry/opentelemetry-operator#3482))
Feature flag available since `v0.114.0` (Add allocation_fallback_strategy option as fallback strategy for per-node strategy [#3482](open-telemetry/opentelemetry-operator#3482))
* Release operator 0.114.1 Signed-off-by: Alex Raiu <[email protected]> * Update operator clusterrole * `secrets`: Add TLS support to auto-instrumentation [#3338](open-telemetry/opentelemetry-operator#3338) * `targetallocators`: Generate only TargetAllocator CR from Collector CR [#3402](open-telemetry/opentelemetry-operator#3402) * Add `targetAllocatorFallbackStrategy` feature flag Feature flag available since `v0.114.0` (Add allocation_fallback_strategy option as fallback strategy for per-node strategy [#3482](open-telemetry/opentelemetry-operator#3482)) * Update operator-test with manager label Adding `control-plane: controller-manager` label to match [operator-restart e2e test](open-telemetry/opentelemetry-operator#3486) --------- Signed-off-by: Alex Raiu <[email protected]>
Description:
Adds allocation_fallback_strategy option as fallback strategy for per-node strategy, such that targets that are not related to a specific node can be assigned.
The fallback strategy is configurable via the config option allocation_fallback_strategy
Link to tracking Issue(s):
Testing:
Fixed per-node tests to expect non-node target to be assigned according to fallback strategy
Documentation: