-
Notifications
You must be signed in to change notification settings - Fork 9
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
REST API for VPC #80
REST API for VPC #80
Conversation
bangqipropel
commented
Dec 14, 2022
- Add API for VPC struct
- Expose VPC struct in apiserver
- Add unit test for the changes introduced
more unit tests can be added tomorrow, and for now, we just compare this branch to vpc_poller now |
Codecov Report
@@ Coverage Diff @@
## main #80 +/- ##
==========================================
+ Coverage 55.70% 55.97% +0.26%
==========================================
Files 48 49 +1
Lines 7691 7804 +113
==========================================
+ Hits 4284 4368 +84
- Misses 2977 2997 +20
- Partials 430 439 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
|
3ec802a
to
8d0489a
Compare
bf906cc
to
89089e9
Compare
8d0489a
to
ae2d70d
Compare
89089e9
to
2a80b05
Compare
pkg/apiserver/registry/vpc/rest.go
Outdated
func (r *REST) Get(ctx context.Context, name string, _ *metav1.GetOptions) (runtime.Object, error) { | ||
ns, ok := request.NamespaceFrom(ctx) | ||
if !ok || len(ns) == 0 { | ||
return nil, errors.NewBadRequest("Namespace cannot be empty.") |
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.
can the namespace ever be empty?
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 think when it has some error when requesting from the server, it an be this
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.
nit: namespace
pkg/apiserver/registry/vpc/rest.go
Outdated
return nil, errors.NewBadRequest("Namespace cannot be empty.") | ||
} | ||
|
||
objs, found := r.vpcIndexer.ByIndex(cloud.VpcIndexerByName, name) |
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.
nit:
objs, found := r.vpcIndexer.ByIndex(cloud.VpcIndexerByName, name) | |
objs, err := r.vpcIndexer.ByIndex(cloud.VpcIndexerByName, name) |
dd7a92b
to
7a1ea36
Compare
a6abdcf
to
5bc43b4
Compare
7a1ea36
to
5bc43b4
Compare
5bc43b4
to
d6bc12d
Compare
6b154ed
to
fee2085
Compare
d6bc12d
to
f24f620
Compare
fee2085
to
01b6780
Compare
7c445fc
to
d436a70
Compare
d436a70
to
1658376
Compare
2529a9d
to
fca1bfe
Compare
fca1bfe
to
fb459d2
Compare
4af7ec3
to
1278b02
Compare
bf5d87d
to
bdc1d84
Compare
bdc1d84
to
cae6434
Compare
3f0bdff
to
850f631
Compare
cae6434
to
1430a5a
Compare
850f631
to
32520d7
Compare
- Perform cloud inventory poll for vpcs on CPA add, vm instanes are skipped as configured filters are nil. - Move account poller(fetches cloud data from internal snapshot) to CPA. - Account poller is applicable for both vpc and vm instance purpose. - Maintain vpc list globally using cache indexers. - In CES, use existing account poller(created during CPA add). - On CES delete, reset vmSelector filters and skip inventory poll for vms, do not distub inventory poll for vpcs. - On CPA delete, stop cloud inventory poll and remove account poller. - Add unit test for the changes introduced. - Add documentation for vpc poller. Signed-off-by: Archana Holla <[email protected]>
- Fix for integration test issues - Improve logging. - User lower case for some fields in VPC object(follow VM CRD format). Signed-off-by: Archana Holla <[email protected]>
- Also remove unwanted files. Signed-off-by: Anand Kumar <[email protected]>
Signed-off-by: Archana Holla <[email protected]>
45dfc7a
to
1a32e52
Compare
Signed-off-by: Bangqi Zhu <[email protected]>
32520d7
to
d0781aa
Compare
Resolving conflicts Conflicts: apis/runtime/v1alpha1/vpc_types.go pkg/controllers/cloud/account_poller.go pkg/controllers/cloud/cloudprovideraccount_controller.go
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
/nephe-test-e2e-aws |
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