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

vpc_dev branch rebase to main branch #399

Merged
merged 120 commits into from
Nov 24, 2023

Conversation

timdengyun
Copy link
Contributor

This PR is to rebase vpc_dev to main branch in order to merge back all VPC dev PRs to main branch.
Hereafter, we will use main branch as our dev branch.

timdengyun and others added 30 commits November 21, 2023 23:16
Need to pass param for enable_vpc_network when validate
VPC options under NsxConfig.
Just run `make generated` to generate.
For example, SubnetCR and IPPoolCR both need query IpAddressPoolBlockSubnet
we should filter them by tags.
Create the common method used by other modules. When using gomonkey to test the method, encounter the problem that
the mocked method doesn't take effect, fix it by adding -gcflags=all=-l option to prohibit inline optimization.
Add VPC related options in NsxConfig.
Need to pass param for enable_vpc_network when validate
VPC options under NsxConfig.
Leverage controller-runtime builtin leader-election to support HA.
Refactor the name convention.
Leverage controller-runtime builtin leader-election to support HA.
Fix make manifests error.
Fix copying files differences on linux and mac.
Change VPC type define from VPC to Vpc according to nsx resource
definition.
Add service to implement checking realize status of entity with retries.
If user forgets to set ha.enable but set replica 2, it would be confusing,
so set EnableHA default true to avoid this undefined behaviour.
Besides, NCP ha.enable default value is true, keep it aligned.
Change the mock nsxop.ini file as the formal ini format;
Initialize the config options in a central place instead of in main;
Warp HAEnabled in function, and add UT.
Upgrade golang to v1.19.10 to escape the CVEs prior to 1.19.10.
Upgrade vsphere-automation-sdk-go SDK
SDK has updated the Vpc struct. Update UT for it
Add StaticRoute controller.
Add sample yaml file
Initializing logger before loading operator config file,
otherwise, the log info will not be logged
Add subnet/subnetset controller to reconcile subnet/subnetset CRD. And
add subnet service to perform NSX subnet CRUD operations.
Subnet service will be register to mediator, so that some functions
need to be moved to controller side to avoid cycle import.
Refactor NSXCheckVersionFor.
Start those vpc controllers only when EnableVPCNetwork is true and nsx version support vpc.
If ca_file found, use ca_file to verify server certificate
Update ut since NewConfig interface updated
Since Operate function body is nil. Using Add to replace Operate.
Remove some redundant code from UT
Since ca patch update ca_file from string to []string, update parameter while
creating config
This patch is to change branch name in github workflow make file
in order to make UT running in vpc_dev branch as well.
gran-vmv and others added 5 commits November 22, 2023 09:31
…mware-tanzu#311)

Add EnableCertRotation property in NSXServiceAccount.Spec.
Cache CA content in memory.
Populate CA content to Secret when processing NSXServiceAccount create event.
Check all Secrets' ca.crt are up-to-date when first NSXServiceAccount GC finished. Update if needed.
Check all Secrets' client cert need renew every 720 GC interval.
Renew client cert if cert will expire in 7d when rotation is supported (NSXT >=4.1.3 and EnableCertRotation is true).
Use 365d instead of 3650d for new client cert when rotation is supported (NSXT >=4.1.3 and EnableCertRotation is true).

Signed-off-by: gran <[email protected]>
@zhengxiexie
Copy link
Contributor

/e2e

1 similar comment
@zhengxiexie
Copy link
Contributor

/e2e

Copy link
Contributor

@seanpang-vmware seanpang-vmware left a comment

Choose a reason for hiding this comment

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

VPC part LGTM

@zhengxiexie
Copy link
Contributor

pls add #401

When running `make test`, the generated nsx.vmware.com_ippools.yaml is
different from the current one, the CRD definition misses validation.
@timdengyun
Copy link
Contributor Author

timdengyun commented Nov 22, 2023

pls add #401
@zhengxiexie
57201b6
Pick this CLN to this PR. please take a look.

@zhengxiexie
Copy link
Contributor

LGTM

@zhengxiexie
Copy link
Contributor

pls add #401
@zhengxiexie
57201b6
Pick this CLN to this PR. please take a look.

also
#403
#404

zhengxiexie and others added 2 commits November 22, 2023 19:30
Sync pkg/apis/nsx.vmware.com/v1alpha1/2 with pkg/apis/v1alpha1/2.
Add `go mod init` `go mod tidy` in pkg/client
Sync pkg/apis/nsx.vmware.com/v1alpha1/zz_generated.deepcopy.go is
the same with pkg/apis/v1alpha1/zz_generated.deepcopy.go
@timdengyun
Copy link
Contributor Author

/e2e

Copy link
Contributor

@seanpang-vmware seanpang-vmware left a comment

Choose a reason for hiding this comment

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

LGTM

@timdengyun timdengyun merged commit 0a01661 into vmware-tanzu:main Nov 24, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants