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

feat(vlan): Add vlan tag support for VM reconcile. #133

Merged
merged 10 commits into from
Mar 20, 2024

Conversation

CiraciNicolo
Copy link
Contributor

Description of changes:

This commit implement VLAN tag support when creating - or more in general reconciling - a ProxmoxMachine. This feature implements a new optional value in the ProxmoxMachine CRS, defined in the NetworkDevice type. The value is an integer, delimited in the range 1-4094.

Testing performed:

Tests have been also implemented to prevent regression, and e2e tests have been conducted creating both cluster using the new property and without - to check past compat.

This commit implement VLAN tag support when creating - or more in general reconciling - a ProxmoxMachine. This feature implements a new optional value in the ProxmoxMachine CRS, defined in the NetworkDevice type. The value is an integer, delimited in the range 1-4094.

Tests have been also implemented to prevent regression, and e2e tests have been conducted creating both cluster using the new property and without - to check past compat.
@CiraciNicolo
Copy link
Contributor Author

It would be possibile to have access to the SonarQube report?

Thanks.

Copy link
Collaborator

@avorima avorima left a comment

Choose a reason for hiding this comment

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

SonarCloud complains about missing coverage for the webhook package. Since the changes there are actually not needed you can just revert them and the test should pass.

internal/service/vmservice/utils_test.go Outdated Show resolved Hide resolved
return nil
}

func validateNetworkDeviceVLAN(device *infrav1.NetworkDevice) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is already covered by the OpenAPI spec, so you can remove it.

@CiraciNicolo
Copy link
Contributor Author

Hi,

I've refactored the code as you suggested, and pulled the latest changes from main 😊

@mcbenjemaa
Copy link
Member

Please rebase.

I will let @avorima finish the review.

Copy link
Collaborator

@avorima avorima left a comment

Choose a reason for hiding this comment

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

Thanks!
LGTM

@mcbenjemaa
Copy link
Member

please rebase, to get it merged)

@mcbenjemaa mcbenjemaa enabled auto-merge (squash) March 19, 2024 16:28
Copy link

sonarcloud bot commented Mar 19, 2024

@mcbenjemaa mcbenjemaa merged commit 7dbe6e4 into ionos-cloud:main Mar 20, 2024
8 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.

3 participants