Skip to content

Conversation

fl64
Copy link
Member

@fl64 fl64 commented Oct 15, 2025

Description

Enable customization of the default generic VirtualMachineClass by preventing Helm-managed overrides and removing restrictive node selectors

Enhancements:

  • Add helm.sh/resource-policy: keep annotation to the generic VirtualMachineClass to prevent Helm from overwriting it
  • Remove the default nodeSelector that excluded control-plane nodes from the generic VMClass

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.

Changelog entries

section: module
type: chore 
summary: remove node restrictions from generic vmclass

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Oct 15, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Enhance generic VirtualMachineClass Helm template by adding an annotation to prevent Helm-managed overrides and by removing the restrictive nodeSelector that excluded control-plane nodes, enabling full customization and broader scheduling.

Entity relationship diagram for updated VirtualMachineClass resource

erDiagram
    VirtualMachineClass {
        string name
        string[] annotations
        string[] labels
        string cpu_type
        string cpu_model
    }
    %% NodeSelector removed from VirtualMachineClass
    %% No direct relationships changed, only attributes modified
Loading

File-Level Changes

Change Details Files
prevent Helm-managed overrides of generic VMClass
  • add helm.sh/resource-policy: keep annotation
  • replace include "helm_lib_module_labels" with explicit labels block
templates/virtualization-controller/vmclasses-default.yaml
remove nodeSelector restriction excluding control-plane nodes
  • delete nodeSelector.matchExpressions block
  • allow scheduling on control-plane nodes
templates/virtualization-controller/vmclasses-default.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@fl64 fl64 force-pushed the chore/module/make-vmclass-generic-editable branch from b4bfc8a to 251bf61 Compare October 15, 2025 09:58
@fl64 fl64 changed the title fix(module): fix vmclass generic placement and labels chore(module): make vmclass generic editable Oct 15, 2025
@fl64 fl64 added this to the v1.2.0 milestone Oct 15, 2025
@fl64 fl64 force-pushed the chore/module/make-vmclass-generic-editable branch from 3a72572 to 357a0bd Compare October 15, 2025 10:59
@fl64 fl64 force-pushed the chore/module/make-vmclass-generic-editable branch from 357a0bd to 86fb749 Compare October 20, 2025 05:42
@fl64
Copy link
Member Author

fl64 commented Oct 20, 2025

@sourcery-ai summary

@fl64 fl64 changed the title chore(module): make vmclass generic editable chore(module): remove node restrictions from generic vmclass Oct 20, 2025
@fl64 fl64 marked this pull request as ready for review October 20, 2025 05:46
@fl64 fl64 requested a review from Isteb4k as a code owner October 20, 2025 05:46
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@fl64 fl64 marked this pull request as draft October 21, 2025 05:10
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.

1 participant