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

Fabric8 leader election (CAN ONLY GO IN THE NEXT MAJOR RELEASE) #1658

Draft
wants to merge 234 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 215 commits
Commits
Show all changes
234 commits
Select commit Hold shift + click to select a range
032014e
test
wind57 Dec 4, 2021
c3d0ad2
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Dec 13, 2021
10889fd
fix @Nested tests not running
wind57 Dec 16, 2021
8f0375a
merged main
wind57 Dec 17, 2021
96ebf42
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jan 5, 2022
db8403e
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jan 12, 2022
90a5345
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jan 12, 2022
b041c00
trigger again
wind57 Jan 13, 2022
9580444
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 15, 2022
a34ac47
Add renovate.json
renovate[bot] Jul 13, 2022
6613f78
Merge branch 'spring-cloud:main' into main
wind57 Jul 13, 2022
1b3eae9
Merge pull request #1 from wind57/renovate/configure
wind57 Jul 13, 2022
4275382
Merge branch 'spring-cloud:main' into main
wind57 Mar 13, 2023
618f25a
Delete renovate.json
wind57 Mar 14, 2023
100a9cd
Delete delme.sh
wind57 Mar 14, 2023
4b9056b
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 14, 2023
315a85b
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 15, 2023
ed3c264
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 15, 2023
446d630
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 16, 2023
6821a28
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 16, 2023
9e95a8a
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 16, 2023
02840b1
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 16, 2023
7e31d65
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 20, 2023
926f4d7
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 20, 2023
344e1d4
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 21, 2023
e91ac12
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 23, 2023
ba6e088
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 28, 2023
49025e8
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 1, 2023
a647bb3
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 4, 2023
16b09ab
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 4, 2023
c8d8a72
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 5, 2023
591f340
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 6, 2023
c331bd0
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 6, 2023
f48b22b
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 7, 2023
900843d
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 8, 2023
76ecdd5
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 8, 2023
b69d4a6
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 11, 2023
df2ddcc
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 14, 2023
3ff1cdd
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 18, 2023
bd89cc8
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 18, 2023
39ef510
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 19, 2023
d389953
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 19, 2023
b676bac
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 21, 2023
b1473c9
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 24, 2023
83ff113
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 24, 2023
33dfbb7
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 24, 2023
316af58
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 25, 2023
425d30b
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 26, 2023
763280a
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 26, 2023
3afbaef
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 27, 2023
cb97ba1
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 28, 2023
b33edc8
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 1, 2023
7a1fdf1
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 2, 2023
a8beed9
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 2, 2023
2e445d9
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 9, 2023
5b51db1
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 12, 2023
b0ce76c
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 12, 2023
918bb7f
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 12, 2023
c629951
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 15, 2023
ccfc0bf
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 22, 2023
0f3fa24
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 23, 2023
b60a283
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 25, 2023
901cb66
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 26, 2023
251002b
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 27, 2023
fedeb17
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 30, 2023
004f95b
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jun 3, 2023
10168be
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jun 5, 2023
dc811cf
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jun 6, 2023
3dfe77d
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jun 8, 2023
619c8d0
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jun 16, 2023
12ca211
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jun 17, 2023
a91c1e1
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jun 22, 2023
be2e809
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jun 24, 2023
1c84e33
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jul 17, 2023
1319fe7
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jul 18, 2023
9424c2e
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jul 25, 2023
cddd550
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Aug 2, 2023
f8d34f2
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Aug 3, 2023
31d2fb8
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Aug 5, 2023
fa9fd09
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Aug 8, 2023
22f3f51
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Aug 16, 2023
bb44f4b
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Aug 21, 2023
9714f2c
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Aug 22, 2023
0f9cb3d
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 2, 2023
6e60174
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 11, 2023
78c5575
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 12, 2023
5eb5c51
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 16, 2023
48f7cb0
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 18, 2023
8a18085
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 20, 2023
e4cab39
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 21, 2023
ba4cab0
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 21, 2023
bbc6e30
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 23, 2023
0e9f1ad
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 26, 2023
8a5243c
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 28, 2023
cbf83c4
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 29, 2023
3dd0260
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 30, 2023
1408d44
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Oct 2, 2023
2925ee1
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Oct 2, 2023
af3a12b
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Oct 5, 2023
f5a27dc
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Oct 7, 2023
494454a
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Oct 7, 2023
add0f67
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Oct 13, 2023
b6a4b45
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Oct 20, 2023
00a559d
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Oct 27, 2023
882f9c1
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Oct 31, 2023
6c9071e
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Nov 3, 2023
09c10bb
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Nov 8, 2023
3615396
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Nov 14, 2023
116c199
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Nov 16, 2023
f1447cd
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Nov 18, 2023
14b165b
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Nov 21, 2023
3ce8fac
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Nov 30, 2023
41eaa8d
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Dec 4, 2023
4f89298
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Dec 7, 2023
ee1031d
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Dec 19, 2023
f6707d5
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Dec 22, 2023
9930c7d
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Dec 27, 2023
0043006
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jan 16, 2024
4e292ec
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Feb 2, 2024
3129276
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Feb 16, 2024
1c90fc2
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Feb 16, 2024
fa0888a
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Feb 22, 2024
ab680d1
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Feb 25, 2024
4023ca3
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 9, 2024
7ed7f5d
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 9, 2024
3be81b7
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 10, 2024
dd710ec
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 10, 2024
4fdd06a
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 12, 2024
bf61054
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 13, 2024
f059697
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 13, 2024
013cc6a
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 14, 2024
13ff3b3
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 18, 2024
88021bb
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 18, 2024
dcf4e62
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 19, 2024
a600c69
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 19, 2024
3f1a180
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 21, 2024
85ca441
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 27, 2024
65acfe6
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 27, 2024
5526b50
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 28, 2024
0c131b5
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 28, 2024
af8a8ee
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 29, 2024
9c74e14
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Mar 30, 2024
a410606
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 2, 2024
8c38ece
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 2, 2024
dcb8fb4
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 3, 2024
73e9765
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 3, 2024
1a3a4d9
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 3, 2024
926d2b0
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 3, 2024
02737d4
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 3, 2024
24defb8
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 4, 2024
14c9780
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 5, 2024
719ccbc
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 6, 2024
5784dfa
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 8, 2024
ecf13b8
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 11, 2024
658a5f6
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 11, 2024
4eb0e3c
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 12, 2024
256332d
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 16, 2024
d64dd18
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 17, 2024
2861ea5
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 17, 2024
9fffd36
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 18, 2024
a84bef6
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 24, 2024
a7000eb
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 29, 2024
219289f
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 29, 2024
ab12e1d
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 30, 2024
b32e8a0
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Apr 30, 2024
2ddaca9
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 1, 2024
8ee9390
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 1, 2024
ad54a3f
dirty
wind57 May 16, 2024
bdf347b
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 17, 2024
70d6a7c
Merge branch 'main' into fabric8-leader-election
wind57 May 17, 2024
f42a5ca
more changes
wind57 May 28, 2024
2e88bc4
fix test
wind57 May 29, 2024
83e4453
add one more log statement
wind57 May 29, 2024
2e6cfb3
add one more log statement
wind57 May 29, 2024
9683fad
add one more log statement
wind57 May 29, 2024
61904dd
enable pod namespace
wind57 May 29, 2024
aeb5f93
checkstyle
wind57 May 29, 2024
6dc82b5
add catch block
wind57 May 29, 2024
e3e6334
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 29, 2024
e8653ad
Merge branch 'main' into fabric8-leader-election
wind57 May 29, 2024
acb8550
more log statements
wind57 May 29, 2024
152f6bf
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 May 31, 2024
a279c0c
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jun 1, 2024
f6e608e
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jun 11, 2024
6a51e1a
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jun 13, 2024
a02efb2
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jun 13, 2024
fa8ca61
Merge branch 'main' into fabric8-leader-election
wind57 Jun 14, 2024
24dd2e4
merge main + review comments
wind57 Jun 14, 2024
5864ab1
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jul 11, 2024
d34806d
Merge branch 'main' into fabric8-leader-election
wind57 Jul 16, 2024
8acf002
add documentation
wind57 Jul 18, 2024
2ac6bdd
typo
wind57 Jul 18, 2024
fdddf41
typo
wind57 Jul 18, 2024
d872393
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jul 24, 2024
e690faf
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Jul 25, 2024
f73667f
Merge branch 'main' into fabric8-leader-election
wind57 Jul 25, 2024
97010ab
review comments
wind57 Jul 25, 2024
f38ec53
more review comments
wind57 Jul 25, 2024
b178548
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Aug 5, 2024
750a4fe
Merge branch 'main' into fabric8-leader-election
wind57 Aug 5, 2024
713824a
merge main + added logs
wind57 Aug 5, 2024
56d4b40
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Aug 19, 2024
c298dfe
Merge branch 'main' into fabric8-leader-election
wind57 Aug 19, 2024
aa47ab7
review comments
wind57 Sep 3, 2024
554112b
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 3, 2024
44389b2
Merge branch 'main' into fabric8-leader-election
wind57 Sep 3, 2024
8116a39
checkstyle
wind57 Sep 3, 2024
90176ef
remove un-used code
wind57 Sep 3, 2024
ae40722
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 4, 2024
af673ba
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 5, 2024
e3ca2f8
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 6, 2024
f96a8fa
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 10, 2024
2847f75
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 13, 2024
462e568
Merge branch 'main' into fabric8-leader-election
wind57 Sep 13, 2024
0893cc0
placeholder commit
wind57 Sep 13, 2024
ed78705
fix some comments
wind57 Sep 26, 2024
7468875
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Sep 26, 2024
4405694
Merge branch 'main' into fabric8-leader-election
wind57 Sep 26, 2024
2f76b5d
fix some comments
wind57 Sep 26, 2024
f45d763
checkstyle
wind57 Sep 26, 2024
af56e7c
test fix
wind57 Sep 26, 2024
2b42942
remove exception
wind57 Sep 27, 2024
c416eea
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Oct 1, 2024
99a0b08
Merge branch 'main' into fabric8-leader-election
wind57 Oct 2, 2024
7c5a312
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Oct 19, 2024
ed2080b
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Oct 24, 2024
b87c349
Merge branch 'main' into fabric8-leader-election
wind57 Oct 24, 2024
8fe3240
fix test
wind57 Oct 25, 2024
0355d7a
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Nov 9, 2024
5e157bc
Merge branch 'main' into fabric8-leader-election
wind57 Nov 9, 2024
bf0cc39
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Nov 25, 2024
193aa2b
Merge branch 'main' into fabric8-leader-election
wind57 Nov 25, 2024
f342faf
Merge branch 'main' of https://github.com/spring-cloud/spring-cloud-k…
wind57 Dec 6, 2024
391dcf2
Merge branch 'main' into fabric8-leader-election
wind57 Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions docs/modules/ROOT/pages/leader-election.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,76 @@ To specify the name of the configmap used for leader election use the following
----
spring.cloud.kubernetes.leader.config-map-name=leader
----

'''

There is another way you can configure leader election, and it comes with native support in the fabric8 library. In the long run, this will be the default way to configure leader election, while the previous one will be dropped. You can treat this one much like the JDKs "preview" features.

To be able to use it, you need to set the property:

[source]
----
spring.cloud.kubernetes.leader.election.enabled=true
----

Unlike the old implementation, this one will use either the `Lease` _or_ `ConfigMap` as the lock, depending on your cluster version. The name of that `Lease` or `ConfigMap` can be defined using the property (default value is `spring-k8s-leader-election-lock`):

[source]
----
spring.cloud.kubernetes.leader.election.lockName=other-name
----

The namespace where the lock is created (`default` being set if no explicit one exists) can be set also:

[source]
----
spring.cloud.kubernetes.leader.election.lockNamespace=other-namespace
----

Before the leader election process kicks in, you can wait until the pod is ready (via the readiness check). This is enabled by default, but you can disable it if needed:
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the point of disabling this if it won't work without it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So there are two reasons I did this. First one is that in the current (old) implementation, we already have such a check: "if pod is not ready, don't start leader election, re-check after some interval". So having this check in the first place, is to do what the old implementation was doing.

The second one, to why I would like to give an option for users to disable this, is what if readiness is made in such a way that has no influence on the leadership election? So when pods scale up, disabling readiness checks here would mean that pods can start faster.


[source]
----
spring.cloud.kubernetes.leader.election.waitForPodReady=false
----

Like with the old implementation, we will publish events by default, but this can be disabled:

[source]
----
spring.cloud.kubernetes.leader.election.publishEvents=false
----

There are a few parameters that control how the leader election process will happen. In order to explain them, we need to look at the high level implementation of this process. All the candidates (pods), try to become the leader, or they try to _acquire_ the lock. If the lock is already taken, they will continue to retry to acquire it every `spring.cloud.kubernetes.leader.election.retryPeriod` (value is specified in seconds, and by default it is 2 seconds).
ryanjbaxter marked this conversation as resolved.
Show resolved Hide resolved

If the lock is not taken, current pod becomes the leader. It does so by inserting a so-called "record" into the lock (`Lease` or `ConfigMap`). Among the things that the "record" contains, is the `leaseDuration` (that you can specify via `spring.cloud.kubernetes.leader.election.leaseDuration` and by default it is 15 seconds). This acts like a TTL on the lock: no other candidate can acquire the lock, unless this period has expired (from the last renewal time).

Once a certain pod establishes itself as the leader (by acquiring the lock), it will continuously (every `spring.cloud.kubernetes.leader.election.retryPeriod`) try to renew its lease, or in other words: it will try to extend its leadership. When a renewal happens, the "record" that is stored inside the lock, is updated. For example, `renewTime` is updated inside the record, to denote when the last renewal happened. (You can always peek inside these fields by using `kubectl describe lease...` for example).

Renewal must happen within a certain interval, specified by `spring.cloud.kubernetes.leader.election.renewDeadline`. By default, it is equal to 10 seconds, and it means that the leader pod has a maximum of 10 seconds to renew its leadership. If that does not happen, this pod loses its leadership and leader election starts again. Because other pods try to become leaders every 2 seconds (by default), it could mean that the pod that just lost leadership, will become leader again. If you want other pods to have a higher chance of becoming leaders, you can set the property (specified in seconds, by default it is 0) :

[source]
----
spring.cloud.kubernetes.leader.election.wait-after-renewal-failure=3
----

This will mean that the pod (that could not renew its lease) and lost leadership, will wait this many seconds, before trying to become leader again.

Let's try to explain these settings based on an example: there are two pods that participate in leader election. For simplicity let's call them `podA` and `podB`. They both start at the same time: `12:00:00`, but `podA` establishes itself as the leader. This means that every two seconds (`retryPeriod`), `podB` will try to become the new leader. So at `12:00:02`, then at `12:00:04` and so on, it will basically ask : "Can I become the leader?". In our simplified example, the answer to that question can be answered based on `podA` activity.

After `podA` has become the leader, at every 2 seconds, it will try to "extend" or _renew_ its leadership. So at `12:00:02`, then at `12:00:04` and so on, `podA` goes to the lock and updates its record to reflect that it is still the leader. Between the last successful renewal and the next one, it has exactly 10 seconds (`renewalDeadline`). If it fails to renew its leadership (there is a connection problem or a big GC pause, etc.) within those 10 seconds, it stops leading and `podB` can acquire the leadership now. When `podA` stops being a leader in a graceful way, the lock record is "cleared", basically meaning that `podB` can acquire leadership immediately.
ryanjbaxter marked this conversation as resolved.
Show resolved Hide resolved

A different story happens when `podA` dies with an OOM for example, without being able to gracefully update lock record and this is when `leaseDuration` argument matters. The easiest way to explain is via an example:
ryanjbaxter marked this conversation as resolved.
Show resolved Hide resolved

`podA` has renewed its leadership at `12:00:04`, but at `12:00:05` it has been killed by the OOMKiller. At `12:00:06`, `podB` will try to become the leader. It will check if "now" (`12:00:06`) is _after_ last renewal + lease duration, essentially it will check:
ryanjbaxter marked this conversation as resolved.
Show resolved Hide resolved

[source]
----
12:00:06 > (12:00:04 + 00:00:10)
----

The condition is not fulfilled, so it can't become the leader. Same result will be at `12:00:08`, `12:00:10` and so on, until `12:00:16` and this is where the TTL (`leaseDuration`) of the lock will expire and `podB` can acquire it.




Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,33 @@

package org.springframework.cloud.kubernetes.commons.leader;

import java.io.File;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Optional;
import java.util.concurrent.locks.ReentrantLock;

import org.springframework.cloud.kubernetes.commons.EnvReader;
import org.springframework.core.log.LogAccessor;
import org.springframework.util.StringUtils;

import static org.springframework.cloud.kubernetes.commons.KubernetesClientProperties.SERVICE_ACCOUNT_NAMESPACE_PATH;

/**
* @author wind57
*/
public final class LeaderUtils {

private static final LogAccessor LOG = new LogAccessor(LeaderUtils.class);

// k8s environment variable responsible for host name
private static final String HOSTNAME = "HOSTNAME";

private static final String POD_NAMESPACE = "POD_NAMESPACE";

private LeaderUtils() {

}
Expand All @@ -45,6 +57,27 @@ public static String hostName() throws UnknownHostException {
}
}

/**
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need to know in which namespace the pod is running, so that I could query it for readiness.

* ideally, should always be present. If not, downward api must enable this one.
*/
public static Optional<String> podNamespace() {
Path serviceAccountPath = new File(SERVICE_ACCOUNT_NAMESPACE_PATH).toPath();
boolean serviceAccountNamespaceExists = Files.isRegularFile(serviceAccountPath);
if (serviceAccountNamespaceExists) {
try {
String namespace = new String(Files.readAllBytes(serviceAccountPath)).replace(System.lineSeparator(),
"");
LOG.info(() -> "read namespace : " + namespace + " from service account " + serviceAccountPath);
return Optional.of(namespace);
}
catch (IOException e) {
throw new RuntimeException(e);
}

}
return Optional.ofNullable(EnvReader.getEnv(POD_NAMESPACE));
}

public static void guarded(ReentrantLock lock, Runnable runnable) {
try {
lock.lock();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright 2013-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.cloud.kubernetes.commons.leader.election;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;

/**
* Provides a more succinct conditional for:
* <code>spring.cloud.kubernetes.leader.election.enabled</code>.
*
* @author wind57
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@ConditionalOnProperty(value = "spring.cloud.kubernetes.leader.election.enabled", matchIfMissing = true,
havingValue = "false")
public @interface ConditionalOnLeaderElectionDisabled {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright 2013-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.cloud.kubernetes.commons.leader.election;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;

/**
* Provides a more succinct conditional for:
* <code>spring.cloud.kubernetes.leader.election.enabled</code>.
*
* @author wind57
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@ConditionalOnProperty(value = "spring.cloud.kubernetes.leader.election.enabled", matchIfMissing = false,
havingValue = "true")
public @interface ConditionalOnLeaderElectionEnabled {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright 2013-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.cloud.kubernetes.commons.leader.election;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.bind.DefaultValue;

/**
* @author wind57
*/
// @formatter:off
@ConfigurationProperties("spring.cloud.kubernetes.leader.election")
public record LeaderElectionProperties(
Copy link
Contributor Author

@wind57 wind57 May 29, 2024

Choose a reason for hiding this comment

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

the properties needed in order to configure the new leader election:

  • waitForPodReady should we wait for the readiness of the pod, before we even trigger the leader election process
  • publishEvents - should we publish events (ApplicationEvent) when the state of leaders change. We do this in the current implementation, so I added it here also
  • leaseDuration - TTL of the lease, if for example the leader dies. No other leader candidate can acquire the lease, unless this one expires.
  • lockNamespace - where to create the "lock" (this is either a lease or a config map)
  • lockName - the name of the lease or configmap
  • renewDeadline - once the lock is acquired and we are the current leader, we try to "extend" the lease. We must extend it within this timeline.
  • retryPeriod - how often to retry when trying to get the lock in order to become the leader.
    In our current code, this is what we use in LeaderInitiator::start, more exactly in the scheduleAtFixRate

I'll try to explain this a bit more verbose.

The process internally in fabric8 is something like this:

  • first try to acquire the lock (lock is either a configmap or a lease) and by "acquire" I mean write to it (or its annotations for a configmap). Whomever writes first (all others will get a 409) becomes the leader.
  • All leader candidates that are not leaders, will continue to spin forever until they get a chance to become a leader. The retry every retryPeriod
  • The current leader, after it establishes itself as one, will spin forever too, but will try to extend its leadership. It extends that by updating the entries in the lease, specifically the one we care about is : renewTime. This one is updated on every time retryPeriod. For example, every 2 seconds (retryPeriod), it will update its renewTime with "now".
  • All other, non-leaders, are spinning and check a few things in each cycle:
  1. "am I the leader?" If the answer is no, they go to (2)
  2. "can I become the leader?" This is answered by looking at :
now().isAfter(leaderElectionRecord.getRenewTime().plus(leaderElectionConfig.getLeaseDuration()))

So they can only try to acquire the leadership if leaseDuration (basically a TTL) + renewTime (when was the last renewal) has expired.

As such, leaseDuration acts a s TTL, if that makes sense. But that means that no one will be able to even try to acquire the lock until that leaseDuration expires and that is OK for the cases when the pod dies or is killed.

But in case of a graceful shutdown (and I implemented this via CompletableFuture::cancel because this is what fabric8 expects), there is code that fabric8 will trigger to "reset" the lease: they will set the renewTime to "now" and leaseDuration to 1 second.

@DefaultValue("true") boolean waitForPodReady,
@DefaultValue("true") boolean publishEvents,
@DefaultValue("15") int leaseDuration,
@DefaultValue("default") String lockNamespace,
@DefaultValue("spring-k8s-leader-election-lock") String lockName,
@DefaultValue("10") int renewDeadline,
@DefaultValue("2") int retryPeriod,
@DefaultValue("0") int waitAfterRenewalFailure) {
// @formatter:on

/**
* Coordination group for leader election.
*/
public static final String COORDINATION_GROUP = "coordination.k8s.io";

/**
* Coordination version for leader election.
*/
public static final String COORDINATION_VERSION = "v1";

/**
* Lease constant.
*/
public static final String LEASE = "Lease";

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright 2013-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.cloud.kubernetes.commons.leader.election.events;

import org.springframework.context.ApplicationEvent;

public final class NewLeaderEvent extends ApplicationEvent {

private final String holderIdentity;

public NewLeaderEvent(Object source) {
super(source);
holderIdentity = (String) source;
}

public String holderIdentity() {
return holderIdentity;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright 2013-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.cloud.kubernetes.commons.leader.election.events;

import org.springframework.context.ApplicationEvent;

/**
* @author wind57
*/
public final class StartLeadingEvent extends ApplicationEvent {

private final String holderIdentity;

public StartLeadingEvent(Object source) {
super(source);
holderIdentity = (String) source;
}

public String holderIdentity() {
return holderIdentity;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright 2013-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.cloud.kubernetes.commons.leader.election.events;

import org.springframework.context.ApplicationEvent;

/**
* @author wind57
*/
public final class StopLeadingEvent extends ApplicationEvent {

private final String holderIdentity;

public StopLeadingEvent(Object source) {
super(source);
holderIdentity = (String) source;
}

public String holderIdentity() {
return holderIdentity;
}

}
Loading
Loading