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

Update k8s client and release k8s lock gracefully #22919

Merged
merged 3 commits into from
Dec 9, 2020

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Dec 4, 2020

What does this PR do?

Updates k8s go client to utilise a fix so as to gracefully release leader lock.

Why is it important?

To release the leader lease gracefully and make it instantly available for other candidates.

Related issues

How to test this PR locally

  1. Deploy a k8s cluster using kind: kind create cluster --config kind-mutly.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
  1. Deploy metricbeat with the latest change included using 7.11.0-SNAPSHOT

metricbeat-kubernetes-leader.7.11.yaml.txt

  1. Follow the logs of the 2 daemonset pods and kill the one holding the lease. Verify that no errors occur and that the lease was gained by the other Pod.

  2. Verify that basic autodiscovery works along with metadata:
    nats.yaml.txt

Signed-off-by: chrismark <chrismarkou92@gmail.com>
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 4, 2020
@ChrsMark ChrsMark self-assigned this Dec 4, 2020
@ChrsMark ChrsMark added the Team:Platforms Label for the Integrations - Platforms team label Dec 4, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 4, 2020
Signed-off-by: chrismark <chrismarkou92@gmail.com>
@elasticmachine
Copy link
Collaborator

elasticmachine commented Dec 4, 2020

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #22919 updated

  • Start Time: 2020-12-08T12:29:09.250+0000

  • Duration: 101 min 40 sec

Test stats 🧪

Test Results
Failed 0
Passed 17359
Skipped 1373
Total 18732

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 17359
Skipped 1373
Total 18732

@andresrc andresrc closed this Dec 5, 2020
@andresrc andresrc reopened this Dec 5, 2020
@jsoriano jsoriano added needs_backport PR is waiting to be backported to other branches. test-plan Add this PR to be manual test plan v7.11.0 labels Dec 7, 2020
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Thanks @ChrsMark for keeping an eye on this!

@ChrsMark ChrsMark merged commit deba318 into elastic:master Dec 9, 2020
ChrsMark added a commit to ChrsMark/beats that referenced this pull request Dec 9, 2020
@ChrsMark ChrsMark removed the needs_backport PR is waiting to be backported to other branches. label Dec 9, 2020
ChrsMark added a commit that referenced this pull request Dec 9, 2020
@andresrc andresrc added the test-plan-added This PR has been added to the test plan label Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Platforms Label for the Integrations - Platforms team test-plan Add this PR to be manual test plan test-plan-added This PR has been added to the test plan v7.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Kubernetes] Release leader lock on shutdown for faster failover
4 participants