Skip to content
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 leader election for kube-trigger #45

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

yangsoon
Copy link
Contributor

@yangsoon yangsoon commented Apr 17, 2023

Description of your changes

support leader election for kube-trigger

I have:

  • Read and followed KubeVela's contribution process.
  • Add related tests.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Special notes for your reviewer

@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.11 🎉

Comparison is base (2d521b3) 73.19% compared to head (94cb439) 73.30%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #45      +/-   ##
==========================================
+ Coverage   73.19%   73.30%   +0.11%     
==========================================
  Files          13       15       +2     
  Lines        1134     1195      +61     
==========================================
+ Hits          830      876      +46     
- Misses        262      275      +13     
- Partials       42       44       +2     
Flag Coverage Δ
unittests 73.30% <ø> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 3 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.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yangsoon yangsoon force-pushed the feature/support-leaderelection branch from 8e3ab76 to c337b56 Compare April 17, 2023 09:55
Copy link
Member

@charlie0129 charlie0129 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, LGTM

pkg/cmd/cmd.go Outdated Show resolved Hide resolved
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
@yangsoon yangsoon force-pushed the feature/support-leaderelection branch from c337b56 to 94cb439 Compare April 17, 2023 11:57
@charlie0129 charlie0129 merged commit 2a3243f into kubevela:main Apr 17, 2023
@yangsoon yangsoon deleted the feature/support-leaderelection branch April 17, 2023 12:09
semmet95 pushed a commit to semmet95/kube-trigger that referenced this pull request May 10, 2023
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
semmet95 pushed a commit to semmet95/kube-trigger that referenced this pull request May 10, 2023
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
semmet95 pushed a commit to semmet95/kube-trigger that referenced this pull request May 10, 2023
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
semmet95 pushed a commit to semmet95/kube-trigger that referenced this pull request May 10, 2023
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
semmet95 pushed a commit to semmet95/kube-trigger that referenced this pull request May 10, 2023
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
semmet95 pushed a commit to semmet95/kube-trigger that referenced this pull request May 11, 2023
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
semmet95 added a commit to semmet95/kube-trigger that referenced this pull request May 19, 2023
This reverts commit 4351008.

Removing changes unrelated to this branch
semmet95 added a commit to semmet95/kube-trigger that referenced this pull request May 19, 2023
This reverts commit 4351008.

Removing changes unrelated to this branch

Signed-off-by: Amit Singh <singhamitch@outlook.com>
FogDong pushed a commit that referenced this pull request May 19, 2023
* Feat: upgrade k8s.io dependency to 0.26 (#39)

* Feat: upgrade k8s.io dependency to 0.26

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Fix: golangci-lint action failure

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

---------

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>

* Feat: add cluster info to action context (#43)

Feat: add cluster info in action context

Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>

* Feat: add cronjob source (#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 <charlie_c_0129@outlook.com>

* Feat: add cronjob source

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: update cron lib

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: do not exit if config contains invalid sources

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: add tests and fix linter

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: go mod tidy

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Docs: add cronjob example

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* fix comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: force lint to use the exact version

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* remove unnecessary dep

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* fix comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* use codecov token

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* update lint script

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

---------

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>

* Feat: support leader election for kube-trigger (#45)

Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>

* adds instruction to enable kube-trigger addon

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* updates sample.yaml path

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* fix: updates instructions to apply config files in order

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* fix: adds the missing api group to the first rule

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* Revert "Feat: support leader election for kube-trigger (#45)"

This reverts commit 4351008.

Removing changes unrelated to this branch

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* Revert "Feat: add cronjob source (#42)"

This reverts commit 46f5975.

Removes changes unrelated to the branch

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* Revert "Feat: add cluster info to action context (#43)"

This reverts commit e214be5.

Removes changes unrelated to the branch

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* Revert "Feat: upgrade k8s.io dependency to 0.26 (#39)"

This reverts commit a22e316.

Removes changes unrelated to the branch

Signed-off-by: Amit Singh <singhamitch@outlook.com>

---------

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Co-authored-by: Somefive <Somefive@foxmail.com>
Co-authored-by: yangs <yangsoonlx@gmail.com>
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
Co-authored-by: Charlie Chiang <charlie_c_0129@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants