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

Support for attaching multiple networks to a vApp #12996

Merged
merged 3 commits into from Jan 25, 2024

Conversation

ahmedwaleedmalik
Copy link
Member

@ahmedwaleedmalik ahmedwaleedmalik commented Jan 24, 2024

What this PR does / why we need it:
This PR adds support for attaching multiple networks to vApps. This is required for HA setups that require/support multiple availability zones.

Which issue(s) this PR fixes:

Fixes #12959 and towards #12650

What type of PR is this?

/kind feature

Special notes for your reviewer:

Does this PR introduce a user-facing change? Then add your Release Note here:

* VMware Cloud Director: Support for attaching multiple networks to a vApp
* [Action Required] The field `ovdcNetwork` in `cluster` and `preset` CRDs is considered deprecated for VMware Cloud Director and `ovdcNetworks` should be used instead.

Documentation:

NONE

Signed-off-by: Waleed Malik <ahmedwaleedmalik@gmail.com>
@ahmedwaleedmalik ahmedwaleedmalik self-assigned this Jan 24, 2024
@kubermatic-bot kubermatic-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jan 24, 2024
@kubermatic-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubermatic-bot kubermatic-bot added the do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. label Jan 24, 2024
@ahmedwaleedmalik
Copy link
Member Author

/test all

@kubermatic-bot kubermatic-bot added sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 24, 2024
@ahmedwaleedmalik ahmedwaleedmalik changed the title WIP WIP: Support for attaching multiple networks to a vApp Jan 24, 2024
@kubermatic-bot kubermatic-bot added release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. docs/none Denotes a PR that doesn't need documentation (changes). and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. labels Jan 24, 2024
@ahmedwaleedmalik ahmedwaleedmalik marked this pull request as ready for review January 24, 2024 09:34
@ahmedwaleedmalik ahmedwaleedmalik changed the title WIP: Support for attaching multiple networks to a vApp Support for attaching multiple networks to a vApp Jan 24, 2024
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 24, 2024
@@ -106,6 +106,7 @@ type Secrets struct {
Organization string
VDC string
OVDCNetwork string
OVDCNetworks []string
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should keep both the old and the new syntax in the conformance-tester's CLI flags. There is no BC guarantee with the tester anyway. We should just have 1 flag, preferably the new one.

Also, this new flag is never set by our code, so the new code isn't tested. Please adjust the hack/ci/run-conformance-tests.sh accordingly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated, but in line 106 can you change the "AWS" to "VCD"?

@@ -160,6 +160,13 @@ func (p *Provider) ValidateCloudSpecUpdate(_ context.Context, oldSpec kubermatic
if oldSpec.VMwareCloudDirector.OVDCNetwork != newSpec.VMwareCloudDirector.OVDCNetwork {
return fmt.Errorf("updating VMware Cloud Director OVDCNetwork is not supported (was %s, updated to %s)", oldSpec.VMwareCloudDirector.OVDCNetwork, newSpec.VMwareCloudDirector.OVDCNetwork)
}

if oldSpec.VMwareCloudDirector.OVDCNetworks != nil && newSpec.VMwareCloudDirector.OVDCNetworks != nil {
if len(oldSpec.VMwareCloudDirector.OVDCNetworks) != len(newSpec.VMwareCloudDirector.OVDCNetworks) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this only checking the length? Is changing [a,b] to [c,d] valid? Maybe using a string set's Equal() function would work better here, if not even using a semantic equality. But I'd probably just use a set.

Copy link
Contributor

@xrstf xrstf left a comment

Choose a reason for hiding this comment

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

QQ

Signed-off-by: Waleed Malik <ahmedwaleedmalik@gmail.com>
@ahmedwaleedmalik
Copy link
Member Author

Feedback handled @xrstf

Signed-off-by: Waleed Malik <ahmedwaleedmalik@gmail.com>
Copy link
Contributor

@xrstf xrstf left a comment

Choose a reason for hiding this comment

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

/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 25, 2024
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 7607c8685152c142a587e21206f0472c5dd4f3c1

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xrstf

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 25, 2024
@kubermatic-bot kubermatic-bot merged commit 4f7e9bb into kubermatic:main Jan 25, 2024
22 checks passed
@kubermatic-bot kubermatic-bot added this to the KKP 2.25 milestone Jan 25, 2024
@ahmedwaleedmalik ahmedwaleedmalik deleted the vcd-networks branch January 25, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). lgtm Indicates that a PR is ready to be merged. release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding multi-AZ capability in KKP for VMware Cloud Director
3 participants