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

sync main to v4.2.0 #928

Open
wants to merge 79 commits into
base: v4.2.0
Choose a base branch
from
Open

Conversation

wenqiq
Copy link
Contributor

@wenqiq wenqiq commented Nov 22, 2024

No description provided.

TaoZou1 and others added 30 commits October 21, 2024 14:44
VPC deletion addes a is_recursive flag to delete children resources.
The default value is false. Set it to true while deleting VPC
…orkInfo CR (vmware-tanzu#799)

This change has introduce a goroutine to periodically get the pre-created VPC
configuration from NSX, and sync to the referred NetworkInfo CR's status if
private IPs are changed. The sync interval is 10m.
…zu#807)

This change has introduce a Namespace Condion "NamespaceNetworkReady" to mark if
the K8s Namespace network is ready or not with VPC case.
Set is_recursive to true while deleting VPC
Also need to update yaml mount readonly, remove init container, remember

Signed-off-by: Xie Zheng <[email protected]>
Co-authored-by: Xie Zheng <[email protected]>
In most cases, the CR may be not existed while updating the status.
It's useless to update the status
Remove updating status in deleteFail/deleteSuccess
vmware-tanzu#820)

This PR adds webhook server for SubnetSet and Subnet to block the deletion of SubnetSet/Subnet if there are stale SubnetPorts under it.

Signed-off-by: Yanjun Zhou <[email protected]>
Add unit-test for Namespace controller

Signed-off-by: Wenqi Qiu <[email protected]>
Signed-off-by: Xie Zheng <[email protected]>
…ain/ut_node

Add unit tests for node_controller and node service
…ubnet-service-ut

Add unit-test for Subnet service
…ain/remove_ipa_finializer

Remove ipaddressallocation finalizer
UT will exclude dir which name including mock. servcies_mock.go is
a mock file and should'nt be included in UT

Fix one staticroute UT error
In order to ensure TLS 1.3 is supportted. We bump Golang version to 1.23.1
In order to support golang v1.23.1, we also bump golangci to v1.61.0

Signed-off-by: Yun-Tang Hsu <[email protected]>
zhengxiexie and others added 29 commits November 13, 2024 16:22
…ain/generated

Add `make generated` in github ci
In order to ensure TLS 1.3 is supportted. We bump Golang version to 1.23.1

In this patch, we do:
1. Bump golangci to v1.61.0 in order to support golang v1.23.1
2. To increase flexibility for downstream consumers, we set a lower Go version in `go.mod` for API module (nsx-operator/pkg/apis), allowing them to choose their preferred Go version. However, we will keep the main module (nsx-operator) on the latest Go version. Currently, we set Go 1.21 for the API module.
3. Update controller-runtime to v0.19.0 for this issue:
kubernetes-sigs/controller-runtime#2925
4. Update controller-gen to v16.5 to resolve the error below.
```
/Users/hsuy/Desktop/nsx-operator/bin/controller-gen rbac:roleName=manager-role crd webhook paths="github.com/vmware-tanzu/nsx-operator/pkg/apis/legacy/v1alpha1" output:crd:artifacts:config=build/yaml/crd/legacy/
/Users/hsuy/go/pkg/mod/k8s.io/[email protected]/core/v1/doc.go:21:1: missing argument "" (at <input>)
/Users/hsuy/go/pkg/mod/k8s.io/[email protected]/core/v1/doc.go:21:1: missing argument "" (at <input>)
k8s.io/api/core/v1:-: unknown type "k8s.io/api/core/v1".ConditionStatus
k8s.io/api/core/v1:-: unknown type "k8s.io/api/core/v1".ConditionStatus
github.com/vmware-tanzu/nsx-operator/pkg/apis/legacy/v1alpha1:-: unable to locate schema for type "k8s.io/api/core/v1".ConditionStatus
```

Signed-off-by: Yun-Tang Hsu <[email protected]>
Now vsphere-automation-sdk-go repo has the dev branch. Uses the dev
branch instead of personal repo
Use vsphere-automation-sdk-go dev branch
* Use CRD ClientSet to get CRD resource
* Improve some test cases
* Update the test-e2e script
* Remove the `ippool` parameter
* Add a `debug` parameter to improve the test log output
---------

Signed-off-by: Wenqi Qiu <[email protected]>
The PR supports DHCP changes in NSX subnet.

Testing done:

Create Subnet with DHCPServer/DHCPDeactivated mode and create a vm on it
Create SubnetSet with DHCPServer/DHCPDeactivated mode and create a vm on it
Create a Subnet with DHCPServer and create a vm on it, switch from DHCPServer to DHCPDeactivated
Create a SubnetSet with DHCPServer and create a vm on it, switch from DHCPServer to DHCPDeactivated

Signed-off-by: Yanjun Zhou <[email protected]>
…ain/gomonkey_fix

Fix gomonkey issue on mac m1/m4 arm chip
There is a error in vsphere-automation-sdk-go services/nsxt/go.mod.
The go.mod refered to a gitlab repo which cause 'go list' error.
Update vsphere-automation-sdk-go version to fix that issue
Update vsphere-automation-sdk-go version
vpcPath is removed from networkinfo CRD, change e2e to verify
if private ip blocks is empty.
For default project, the realized-state path should be
"/policy/api/infra/realized-state/realized-entities?". There is
no orgs and projects info in it

Test Done:
1. create resources under /orgs/default/projects/default
2. check if resources created
Unit test coverage increased by 3%, reaching 73.07%.

Signed-off-by: Wenqi Qiu <[email protected]>
Tidy the output, remove redundant information.
…ain/e2e_log_refactor

Unify log format in e2e running
Operator sometimes will check error type instead of just returning error.
Add error type in NSXApiError
To ensure the webhook targets the active endpoint in HA mode, we should label the pods accordingly and configure the webhook service to select these labeled pods.
Add conditions to CR. Follow SubnetPort conditions.
Handle SubnetPort deleted when AddressBinding exists.

Signed-off-by: Ran Gu <[email protected]>
…ain/update_pod_labels

Update pod label based on the master election
Previously we add lock on subnet to prevent the race between SubnetPort/Pod controller and SubnetSet GC.
In this PR we replace the mutex lock by read-write lock to improve the parallelism of the SubnetPort creation.

Testing done:
Created 32 SubnetPort at a time, each SubnetPort reconcile finished in 2-3 seconds

Signed-off-by: Yanjun Zhou <[email protected]>
Add validations for SubnetPort CR to specify one of subnet or subnetSet under spec.
…ain/gc_interval

Lengthen GC interval to 10min
…etport_spec

Add validations for SubnetPort CRD
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.