-
Notifications
You must be signed in to change notification settings - Fork 21
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
[NSXServiceAccount] Watch mgmt-proxy service and reconcile all NSXSA #1019
base: main
Are you sure you want to change the base?
[NSXServiceAccount] Watch mgmt-proxy service and reconcile all NSXSA #1019
Conversation
Thanks for the PR. Let me review it. |
Hi @edwardbadboy @gran-vmv @liu4480 |
pkg/controllers/nsxserviceaccount/nsxserviceaccount_controller.go
Outdated
Show resolved
Hide resolved
pkg/controllers/nsxserviceaccount/nsxserviceaccount_controller.go
Outdated
Show resolved
Hide resolved
pkg/controllers/nsxserviceaccount/nsxserviceaccount_controller.go
Outdated
Show resolved
Hide resolved
d2a15ab
to
b982484
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM. A small comment.
pkg/controllers/nsxserviceaccount/nsxserviceaccount_controller.go
Outdated
Show resolved
Hide resolved
b982484
to
d361378
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Only minor comments.
pkg/controllers/nsxserviceaccount/nsxserviceaccount_controller.go
Outdated
Show resolved
Hide resolved
d361378
to
4a2118e
Compare
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (27.71%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1019 +/- ##
==========================================
- Coverage 74.52% 74.28% -0.24%
==========================================
Files 118 118
Lines 16330 16412 +82
==========================================
+ Hits 12170 12192 +22
- Misses 3391 3446 +55
- Partials 769 774 +5
|
/e2e |
1 similar comment
/e2e |
Reconcile all existing NSXSA incase of following events of K8s service corresponding to mgmt-proxy : - new service is created. - existing service is deleted. - existing service is updated with LB VIP. While reconciling realized NSXSA, update proxyEndpoints only if it has changed. Signed-off-by: Kumar Atish <[email protected]>
4a2118e
to
55c2f00
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hello @Atish-iaf , Can you test this PR and describe how you test it in the PR description? Thanks! |
Update |
did you test this patch together with antrea-interworking change |
Yes, register Pod detects the change but fails to update bootstrap-config map and register pod restarts. |
Thanks for the test I think this PR should be good to merge. |
Reconcile all existing NSXSA incase of following events of K8s service corresponding to mgmt-proxy.
While reconciling realized NSXSA, update proxyEndpoints if proxyEndpoints have changed.
Steps for testing -
Run
make photon
in nsx-operator repo.docker image save github.com/vmware-tanzu/nsx-operator:latest -o my-nsx-operator.tar
my-nsx-operator.tar
file to SVCP VMs usingscp
ctr -n=k8s.io images import <path to my-nsx-operator.tar>
to load nsx-operator image.kubectl set image deploy/nsx-ncp nsx-operator=github.com/vmware-tanzu/nsx-operator:latest -n vmware-system-nsx
loadBalancerIP: <someIP>
, check in VC UI, it gets updated, then kubectl describe nsxsa and see proxyEndpoints get updated with new LB IP.