Skip to content
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

refactor: persist collectors memory settings in collectorsgroup CRD #1824

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

blumamir
Copy link
Collaborator

This PR makes it so:

  • calculated memory settings for collectors are calculated and written in collectors group CRD by the scheduler.
  • The values can be easily seen where the blong logically, in each collectors group.
  • after the refactor, auto scaler no longer depends or watches the odigos config resource in case it changes.
  • any changes to the memory settings are updated in the collector group CRD which autoscaler already watch and reconcile.

It aim to simplify the reconciliation processes in autoscaler, and make it depend on one less resource. any config computations are offloaded to scheduler and should trigger autoscaler less.

This PR is pure refactor and does not change any existing behavior. follow up PRs will introduce changes, additions, and applying memory settings also in node collector.

@blumamir blumamir requested review from RonFed and edeNFed November 22, 2024 19:02
// - running out of memory and being killed by the k8s OOM killer
// - consuming all available memory on the node which can lead to node instability
// - pushing back pressure to the instrumented applications
MemorySettings CollectorsGroupMemorySettings `json:"memorySettings"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have omitempty or default values in the kubebuilder level?

I saw that currently the default values are defined in the code. Perhaps defining them in the schema will be better?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have omitempty or default values in the kubebuilder level?

that's intentional, since the consumers just use this value as is so it must be set

I saw that currently the default values are defined in the code. Perhaps defining them in the schema will be better?

I agree, since my focus now is elsewhere, I prefer to do this refactor and leave the current behavior as is. might be addressed in followup PRs

@blumamir blumamir merged commit d6df850 into odigos-io:main Nov 22, 2024
28 checks passed
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.

2 participants