-
Notifications
You must be signed in to change notification settings - Fork 178
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
Remove controller runtime dependency #847
Remove controller runtime dependency #847
Conversation
Signed-off-by: Xudong Liu <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: XudongLiuHarold 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 |
Signed-off-by: Xudong Liu <[email protected]>
d6d4f9e
to
bb8c76e
Compare
Signed-off-by: Xudong Liu <[email protected]>
1136300
to
0915a50
Compare
Signed-off-by: Xudong Liu <[email protected]>
58e7427
to
503ec08
Compare
9699897
to
c624418
Compare
Signed-off-by: Xudong Liu <[email protected]>
c624418
to
37441be
Compare
Signed-off-by: Xudong Liu <[email protected]>
753b98b
to
7cc41d5
Compare
|
||
func (v *virtualMachineServices) Get(ctx context.Context, name string, opts v1.GetOptions) (*vmopv1alpha1.VirtualMachineService, error) { | ||
virtualMachineService := &vmopv1alpha1.VirtualMachineService{} | ||
if obj, err := v.client.Resource(VirtualMachineServiceGVR).Namespace(v.ns).Get(ctx, name, opts); err != nil { |
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.
I will create an feature request to use dynamic informer for get and list.
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.
Since we don't need to watch virtualmachine & virtualmachineservcie resources, we may not need informer and lister here?
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.
It depends on how frequently get/list is called. In general, a controller should call get/list from cache to reduce API calls on kube-apiserver even it does not watch those resources. Controller-runtime by default add the resource to informer cache at the first time get/list is called.
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.
I see! Yeah, we need a follow-up for this, thanks @DanielXiao !
@XudongLiuHarold Thanks and this is great. I would also invite @sbueringer @chrischdi to take a look. |
Signed-off-by: Xudong Liu <[email protected]>
017bdc7
to
d861bcd
Compare
/retest |
I'll try to find time tomorrow to take a look |
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.
Just a few nits. Looks pretty good
pkg/cloudprovider/vsphereparavirtual/vmoperator/client/virtualmachine_client_test.go
Outdated
Show resolved
Hide resolved
pkg/cloudprovider/vsphereparavirtual/vmoperator/client/virtualmachine_client_test.go
Outdated
Show resolved
Hide resolved
pkg/cloudprovider/vsphereparavirtual/vmoperator/client/virtualmachine_client_test.go
Show resolved
Hide resolved
Signed-off-by: Xudong Liu <[email protected]>
d861bcd
to
1006123
Compare
/retest |
/lgtm |
What this PR does / why we need it:
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged):fixes #840
Special notes for your reviewer:
Release note: