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

Vm controller unit tests #38

Merged
1 commit merged into from Aug 12, 2022
Merged

Vm controller unit tests #38

1 commit merged into from Aug 12, 2022

Conversation

ghost
Copy link

@ghost ghost commented Aug 4, 2022

What type of PR is this?
/kind feature

What this PR does / why we need it:

  • Handle link and unlink volume
  • Handle add vm as backend
  • Handle attach eip
  • Handle add sg with vm sgmember
  • Update volume unit test
  • Add vm unit-test

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #29

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

@ghost ghost requested review from outscale-mdr and outscale-hmi August 4, 2022 10:29
* Handle link and unlink volume
* Handle add vm as backend
* Handle attach eip
* Handle add sg with vm sgmember
* Update volume unit test
* Add vm unit test
@ghost
Copy link
Author

ghost commented Aug 9, 2022

@ghost ghost requested a review from jerome-jutteau August 9, 2022 11:42
loadBalancerSecurityGroupClusterScopeName := loadBalancerSecurityGroupName + "-" + clusterScope.GetUID()
associateSecurityGroupId := securityGroupsRef.ResourceMap[loadBalancerSecurityGroupClusterScopeName]
machineScope.Info("Get sg", "associateSecurityGroupId", associateSecurityGroupId)
_, err = securityGroupSvc.CreateSecurityGroupRule(associateSecurityGroupId, flow, ipProtocol, "", securityGroupIds[0], fromPortRange, toPortRange)
_, err = securityGroupSvc.CreateSecurityGroupRule(associateSecurityGroupId, "Outbound", ipProtocol, "", securityGroupIds[0], fromPortRange, toPortRange)
Copy link
Contributor

Choose a reason for hiding this comment

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

In SecurityGroup, there is a default rules to allow all outbound traffic, no ?

Copy link
Author

@ghost ghost Aug 10, 2022

Choose a reason for hiding this comment

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

@outscale-mdr
Yes, there is a default rules which allow outbound traffic, but you have to set outbound security group rule (in lbu sg) for each securityGroup (securityGroupMember) associate to your backend instance associate with lbu.
And you have to set inbound security group rule in each sg backend instance associate with lbu securityGroupMember.
(https://docs.outscale.com/fr/userguide/%C3%80-propos-des-security-groups-dans-LBU.html)

Copy link
Author

@ghost ghost Aug 10, 2022

Choose a reason for hiding this comment

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

default rules which allow outbound traffic is not enough for lbu.

@ghost ghost requested a review from outscale-mdr August 10, 2022 09:41
@ghost ghost mentioned this pull request Aug 11, 2022
3 tasks
@ghost ghost merged commit 2ac1027 into outscale:main Aug 12, 2022
@ghost ghost added the kind/feature Feature resolution label Aug 12, 2022
@ghost
Copy link
Author

ghost commented Sep 8, 2022

close #29

@ghost ghost deleted the vm-controller-unit-tests branch September 8, 2022 07:14
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Feature resolution
Development

Successfully merging this pull request may close these issues.

[Feature]: Implement Outscale machine infrastructure controller unit test for vm
2 participants