kube-eventer icon indicating copy to clipboard operation
kube-eventer copied to clipboard

添加leaderElection,支持多副本高可用部署

Open silenceper opened this issue 5 years ago • 11 comments

fix #62

silenceper avatar Feb 21 '20 03:02 silenceper

Codecov Report

Merging #63 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #63   +/-   ##
=======================================
  Coverage   52.58%   52.58%           
=======================================
  Files          24       24           
  Lines        1434     1434           
=======================================
  Hits          754      754           
  Misses        618      618           
  Partials       62       62

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9a0b3b8...82ff79b. Read the comment docs.

codecov-io avatar Feb 21 '20 03:02 codecov-io

That's really cool!

ringtail avatar Feb 21 '20 08:02 ringtail

I will review this pr later.

ringtail avatar Feb 21 '20 08:02 ringtail

This pr is too large because of vendor changes. Could you split this PR into two commit. One is for the source code changes and the other for the vendor. Thanks!

ringtail avatar Mar 02 '20 16:03 ringtail

Resubmitted

silenceper avatar Mar 03 '20 08:03 silenceper

@silenceper 你这个实现,对副本数有要求吗?比如要奇数个不能偶数个之类的

然后就是,主从节点怎么消费 Event 的

zeusro avatar Mar 03 '20 09:03 zeusro

还有,如果你要配置高可用的话,YAML 文件必须用反亲和度让所有的pod不运行在同一个节点吧?

zeusro avatar Mar 03 '20 09:03 zeusro

@silenceper 你这个实现,对副本数有要求吗?比如要奇数个不能偶数个之类的

然后就是,主从节点怎么消费 Event 的

没要求,跟你理解的etcd不一样,它实现是一个分布式锁,谁先抢占到就执行,其余的等待,同时工作的只会有一个节点

silenceper avatar Mar 03 '20 09:03 silenceper

@silenceper 你这个实现,对副本数有要求吗?比如要奇数个不能偶数个之类的 然后就是,主从节点怎么消费 Event 的

没要求,跟你理解的etcd不一样,它实现是一个分布式锁,谁先抢占到就执行,其余的等待,同时工作的只会有一个节点

那可以以replicas: 1运行吗?有些 kubernetes 环境是测试的,只有1节点.

zeusro avatar Mar 03 '20 09:03 zeusro

可以

silenceper avatar Mar 03 '20 09:03 silenceper