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

Cherry-pick #22919 to 7.x: Update k8s client and release k8s lock gracefully #23013

Merged
merged 2 commits into from
Dec 9, 2020

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Dec 9, 2020

Cherry-pick of PR #22919 to 7.x branch. Original message:

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

@ChrsMark ChrsMark added [zube]: In Review backport Team:Platforms Label for the Integrations - Platforms team labels Dec 9, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 9, 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 9, 2020
Signed-off-by: chrismark <[email protected]>
@ChrsMark ChrsMark requested a review from jsoriano December 9, 2020 07:04
@elasticmachine
Copy link
Collaborator

elasticmachine commented Dec 9, 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 #23013 updated

  • Start Time: 2020-12-09T07:03:45.429+0000

  • Duration: 90 min 32 sec

Test stats 🧪

Test Results
Failed 0
Passed 16876
Skipped 1398
Total 18274

Steps errors 2

Expand to view the steps failures

Terraform Apply on x-pack/metricbeat/module/aws
  • Took 0 min 16 sec . View more details on here
Terraform Apply on x-pack/metricbeat/module/aws
  • Took 0 min 15 sec . View more details on here

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 16876
Skipped 1398
Total 18274

@ChrsMark ChrsMark merged commit 9547596 into elastic:7.x Dec 9, 2020
@zube zube bot removed the [zube]: Done label Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Platforms Label for the Integrations - Platforms team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants