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

Add minimal VM Flavor API #6026

Merged
merged 5 commits into from
Oct 13, 2021
Merged

Add minimal VM Flavor API #6026

merged 5 commits into from
Oct 13, 2021

Commits on Oct 8, 2021

  1. Code change: Extract methods in rest/definitions.go

    This will make adding API definitions easier
    in the following commit.
    
    Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
    akrejcir committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    d0fd087 View commit details
    Browse the repository at this point in the history
  2. Add flavor API definitions

    Added flavor API defintions and generated client.
    
    Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
    akrejcir committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    2aae054 View commit details
    Browse the repository at this point in the history
  3. Extract method in vms-admitter_test.go

    Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
    akrejcir committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    5ab7ab3 View commit details
    Browse the repository at this point in the history
  4. Add minimal flavor functionality

    Changes:
    - Added flavor package with common functionality to get flavor and apply it to VMI.
    - Added flavor FlavorMatcher field to VM API, which references a flavor.
    - VM validating webhook checks that the flavor exists, and can be applied to VMI without conflicts.
    - virt-controller applies the flavor to VMI when a VM is started
    
    Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
    akrejcir committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    6dc5484 View commit details
    Browse the repository at this point in the history
  5. Add validating webhook for flavors

    The webhook succeeds if:
    - There is at least one profile
    - At most one profile is set as default
    - Each profile can be applied to an empty VMI spec without conflicts
    
    Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
    akrejcir committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    f4c6530 View commit details
    Browse the repository at this point in the history