refactor package infrastructure/kubernetes#1259
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1259 +/- ##
==========================================
+ Coverage 61.81% 62.03% +0.22%
==========================================
Files 85 76 -9
Lines 10854 10701 -153
==========================================
- Hits 6709 6638 -71
+ Misses 3700 3624 -76
+ Partials 445 439 -6
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
59ee7b3 to
0255bad
Compare
There was a problem hiding this comment.
nit: we can just pass the ns and name to delete a specific resource, or we can use a single function to delete all kinds of resources.
There was a problem hiding this comment.
IMO, this PR is too large to review, let's do more refactor later.
Applier absolute can be more generic.
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
237fbc5 to
02b9e68
Compare
|
@qicz can you also help review this PR since you've done some refactoring in this area in the past, thanks in advance ! |
No problem. in fact, i have already reviewed a few days ago without.note, i will do this again. |
| // expectedProxyDeployment returns the expected Deployment based on the provided infra. | ||
| func (i *Infra) expectedProxyDeployment(infra *ir.Infra) (*appsv1.Deployment, error) { | ||
| type ResourceRender struct { | ||
| infra *ir.Infra |
There was a problem hiding this comment.
IMO, it's too wide to use ProxyInfra here for now, change it when necessary in the future.
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
refactor package to reuse code :
Applierto create/update/delete Kubernetes resourcesResourceRenderto render resource forProxy/RateLimitutilspackagecc @arkodg