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

fix(kuma-cp) Switch leader election to leader-for-life #3023

Merged
merged 7 commits into from
Nov 10, 2021

Conversation

parkanzky
Copy link
Contributor

@parkanzky parkanzky commented Oct 27, 2021

Signed-off-by: Paul Parkanzky paul.parkanzky@konghq.com

Summary

Work in progress on switching to leader election as leader-for-life. Will upgrade to actual PR when sufficiently tested.

Note, need this extra config on kuma-cp container ENV

- name: POD_NAME
  valueFrom:
    fieldRef:
      fieldPath: metadata.name

I've added this to kumactl install, however this breaks compatibility between newer versions of kuma-cp and previous kumactl.

Full changelog

  • Change leader election to be resilient to slow API and temporary network partition.

Documentation

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

Backwards compatibility

  • Add backport-to-stable label if the code is backwards compatible. Otherwise, list breaking changes.

Paul Parkanzky added 3 commits October 27, 2021 10:31
Signed-off-by: Paul Parkanzky <paul.parkanzky@konghq.com>
Signed-off-by: Paul Parkanzky <paul.parkanzky@konghq.com>
Signed-off-by: Paul Parkanzky <paul.parkanzky@konghq.com>
@parkanzky parkanzky marked this pull request as ready for review November 2, 2021 15:54
@parkanzky parkanzky requested a review from a team as a code owner November 2, 2021 15:54
@parkanzky parkanzky marked this pull request as draft November 3, 2021 20:15
Paul Parkanzky and others added 2 commits November 9, 2021 14:48
@parkanzky parkanzky marked this pull request as ready for review November 9, 2021 19:51
Copy link
Contributor

@jpeach jpeach left a comment

Choose a reason for hiding this comment

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

Looks good overall to me, just some nits around style and logging.

Paul Parkanzky added 2 commits November 10, 2021 09:40
Signed-off-by: Paul Parkanzky <paul.parkanzky@konghq.com>
@parkanzky parkanzky merged commit f5b2b27 into master Nov 10, 2021
@parkanzky parkanzky deleted the fix/leader-election-loss branch November 10, 2021 18:49
mergify bot pushed a commit that referenced this pull request Nov 10, 2021
* fix(kuma-cp) Switch leader election to leader-for-life

Signed-off-by: Paul Parkanzky <paul.parkanzky@konghq.com>

* tests(kuma-cp) Make check

Signed-off-by: Paul Parkanzky <paul.parkanzky@konghq.com>

* fix(kuma-cp) Add pod name to install env for leader election

Signed-off-by: Paul Parkanzky <paul.parkanzky@konghq.com>

* fix(kuma-cp) Force acquire deprecated locks

Signed-off-by: Paul Parkanzky <paul.parkanzky@konghq.com>

* fix(kuma-cp) PR comments - minor style changes

Signed-off-by: Paul Parkanzky <paul.parkanzky@konghq.com>
(cherry picked from commit f5b2b27)

# Conflicts:
#	go.mod
#	go.sum
#	pkg/plugins/bootstrap/k8s/plugin.go
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.

3 participants