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

fix(vm): Improve KVVM Builder. Add method SetMetadata #668

Merged
merged 4 commits into from
Jan 27, 2025

Conversation

yaroslavborbat
Copy link
Member

@yaroslavborbat yaroslavborbat commented Jan 27, 2025

Description

This pull request introduces the SetMetadata method to the KVVM Builder. Previously, we did not set metadata in the KVVM template during creation, as it was synchronized later using a dedicated handler. While this approach worked for syncing metadata, it caused an issue with the initial pod scheduling.

Without setting metadata upfront, some required labels were missing during the initial pod scheduling phase. These labels are critical for features like pod affinity and anti-affinity rules. As a result, the initial scheduling could make incorrect decisions, potentially leading to rule violations or suboptimal placement.

By introducing the SetMetadata method, this PR ensures that metadata is properly set in the template during the initial build phase, preventing such scheduling issues.

Why do we need it, and what problem does it solve?

What is the expected result?

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

fl64
fl64 previously approved these changes Jan 27, 2025
Copy link
Member

@fl64 fl64 left a comment

Choose a reason for hiding this comment

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

Let`s enable e2e test case with affinity!

@fl64 fl64 self-requested a review January 27, 2025 12:32
Signed-off-by: Yaroslav Borbat <[email protected]>
Signed-off-by: Yaroslav Borbat <[email protected]>
+
Signed-off-by: Yaroslav Borbat <[email protected]>
fl64
fl64 previously approved these changes Jan 27, 2025
+
Signed-off-by: Yaroslav Borbat <[email protected]>
@yaroslavborbat yaroslavborbat merged commit 9469bdc into main Jan 27, 2025
12 checks passed
@yaroslavborbat yaroslavborbat deleted the fix/vm/setmetadata branch January 27, 2025 14:35
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.

3 participants