-
Notifications
You must be signed in to change notification settings - Fork 17
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
Feat :support create service #46
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Mcduller <[email protected]>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
==========================================
- Coverage 73.19% 70.70% -2.49%
==========================================
Files 13 16 +3
Lines 1134 1386 +252
==========================================
+ Hits 830 980 +150
- Misses 262 339 +77
- Partials 42 67 +25
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
return err | ||
} | ||
|
||
if err := r.createService(ctx, ts, v); 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.
Please check createService
first, if the value is true, then create the service.
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.
you mean check before invoking the function? or we can check the value in the function ?
config/definition/default.yaml
Outdated
} | ||
}] | ||
if parameter.service.clusterIp != _|_ { | ||
clusterIp: parameter.service.clusterIp |
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.
Why users need to specify the clusterIP?
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.
Why users need to specify the clusterIP?
my fault, i will remove it.
Co-authored-by: Tianxin Dong <[email protected]>
Co-authored-by: Tianxin Dong <[email protected]>
Co-authored-by: Tianxin Dong <[email protected]>
add unit test Co-authored-by: Tianxin Dong <[email protected]> Signed-off-by: Mcduller <[email protected]>
# Conflicts: # config/definition/default.yaml
* Feat: upgrade k8s.io dependency to 0.26 (kubevela#39) * Feat: upgrade k8s.io dependency to 0.26 Signed-off-by: Yin Da <[email protected]> * Fix: golangci-lint action failure Signed-off-by: Yin Da <[email protected]> --------- Signed-off-by: Yin Da <[email protected]> Signed-off-by: Amit Singh <[email protected]> * Feat: add cluster info to action context (kubevela#43) Feat: add cluster info in action context Signed-off-by: yangsoon <[email protected]> Co-authored-by: yangsoon <[email protected]> Signed-off-by: Amit Singh <[email protected]> * Feat: add cronjob source (kubevela#42) * Refactor: allow the use of singleton for one Source, while also allowing non-singleton Sources, making it more extensible Signed-off-by: Charlie Chiang <[email protected]> * Feat: add cronjob source Signed-off-by: Charlie Chiang <[email protected]> * Chore: update cron lib Signed-off-by: Charlie Chiang <[email protected]> * Feat: do not exit if config contains invalid sources Signed-off-by: Charlie Chiang <[email protected]> * Chore: add tests and fix linter Signed-off-by: Charlie Chiang <[email protected]> * Chore: go mod tidy Signed-off-by: Charlie Chiang <[email protected]> * Docs: add cronjob example Signed-off-by: Charlie Chiang <[email protected]> * fix comments Signed-off-by: Charlie Chiang <[email protected]> * Chore: force lint to use the exact version Signed-off-by: Charlie Chiang <[email protected]> * remove unnecessary dep Signed-off-by: Charlie Chiang <[email protected]> * fix comments Signed-off-by: Charlie Chiang <[email protected]> * use codecov token Signed-off-by: Charlie Chiang <[email protected]> * update lint script Signed-off-by: Charlie Chiang <[email protected]> --------- Signed-off-by: Charlie Chiang <[email protected]> Signed-off-by: Amit Singh <[email protected]> * Feat: support leader election for kube-trigger (kubevela#45) Signed-off-by: yangsoon <[email protected]> Co-authored-by: yangsoon <[email protected]> Signed-off-by: Amit Singh <[email protected]> * adds instruction to enable kube-trigger addon Signed-off-by: Amit Singh <[email protected]> * updates sample.yaml path Signed-off-by: Amit Singh <[email protected]> * fix: updates instructions to apply config files in order Signed-off-by: Amit Singh <[email protected]> * fix: adds the missing api group to the first rule Signed-off-by: Amit Singh <[email protected]> * Revert "Feat: support leader election for kube-trigger (kubevela#45)" This reverts commit 4351008. Removing changes unrelated to this branch Signed-off-by: Amit Singh <[email protected]> * Revert "Feat: add cronjob source (kubevela#42)" This reverts commit 46f5975. Removes changes unrelated to the branch Signed-off-by: Amit Singh <[email protected]> * Revert "Feat: add cluster info to action context (kubevela#43)" This reverts commit e214be5. Removes changes unrelated to the branch Signed-off-by: Amit Singh <[email protected]> * Revert "Feat: upgrade k8s.io dependency to 0.26 (kubevela#39)" This reverts commit a22e316. Removes changes unrelated to the branch Signed-off-by: Amit Singh <[email protected]> --------- Signed-off-by: Yin Da <[email protected]> Signed-off-by: Amit Singh <[email protected]> Signed-off-by: yangsoon <[email protected]> Signed-off-by: Charlie Chiang <[email protected]> Co-authored-by: Somefive <[email protected]> Co-authored-by: yangs <[email protected]> Co-authored-by: yangsoon <[email protected]> Co-authored-by: Charlie Chiang <[email protected]>
Signed-off-by: Mcduller <[email protected]>
Signed-off-by: Mcduller <[email protected]>
Signed-off-by: Mcduller <[email protected]>
@charlie0129 @FogDong please review this pr :) |
Signed-off-by: Mcduller <[email protected]>
Co-authored-by: Tianxin Dong <[email protected]>
Co-authored-by: Tianxin Dong <[email protected]>
add unit test Co-authored-by: Tianxin Dong <[email protected]> Signed-off-by: Mcduller <[email protected]>
Signed-off-by: Mcduller <[email protected]>
# Conflicts: # controllers/triggerservice/suite_test.go # controllers/utils/test_util.go
Signed-off-by: Mcduller <[email protected]>
# Conflicts: # controllers/utils/test_util.go
Signed-off-by: Mcduller <[email protected]>
return err | ||
} | ||
|
||
if !needCreateService { |
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.
If the needCreateService
is false, then we'll try to delete the existing service? I think it is a dangerous behavior and we shouldn't clean the service for user automatically.
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.
should we add another flag to clean the service when user want to clean service?
- resources: | ||
- apiGroups: | ||
- "" | ||
resources: |
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.
Is this change caused by our scripts? /cc @charlie0129
Description of your changes
In order to support future webhook sources, support for creating services, and some code refactoring
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Special notes for your reviewer