Skip to content

Start migration to leases for leader election #2993

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

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

johngmyers
Copy link
Contributor

@johngmyers johngmyers commented Jan 23, 2023

Issue

N/A

Description

Configures leader election to use both ConfigMaps and Leases.

Migration to leases is long overdue. The most recent version of controller-runtime appears to not support using only ConfigMaps.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the docs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 23, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2023

Codecov Report

Base: 54.01% // Head: 54.01% // No change to project coverage 👍

Coverage data is based on head (33dd23d) compared to base (d9c2a77).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2993   +/-   ##
=======================================
  Coverage   54.01%   54.01%           
=======================================
  Files         144      144           
  Lines        8312     8312           
=======================================
  Hits         4490     4490           
  Misses       3494     3494           
  Partials      328      328           
Impacted Files Coverage Δ
pkg/config/runtime_config.go 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 23, 2023
@johngmyers johngmyers changed the title WIP Start migration to leases for leader election Start migration to leases for leader election Jan 23, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 23, 2023
@kishorj kishorj added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jan 23, 2023
@kishorj
Copy link
Collaborator

kishorj commented Jan 23, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 23, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johngmyers, kishorj

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 23, 2023
@k8s-ci-robot k8s-ci-robot merged commit 9b1032c into kubernetes-sigs:main Jan 23, 2023
@johngmyers johngmyers deleted the lease branch January 24, 2023 01:59
a7i pushed a commit to a7i/aws-load-balancer-controller that referenced this pull request Apr 7, 2023
@johngmyers johngmyers mentioned this pull request Aug 23, 2023
12 tasks
Timothy-Dougherty pushed a commit to adammw/aws-load-balancer-controller that referenced this pull request Nov 9, 2023
alebedev87 added a commit to alebedev87/aws-load-balancer-operator that referenced this pull request Sep 11, 2024
Controller-runtime has been updated and doesn't support configmaps
for the leader election anymore.
Upstream PR: kubernetes-sigs/aws-load-balancer-controller#2993
alebedev87 added a commit to alebedev87/aws-load-balancer-operator that referenced this pull request Dec 6, 2024
Controller-runtime has been updated and doesn't support configmaps
for the leader election anymore.
Upstream PR: kubernetes-sigs/aws-load-balancer-controller#2993
@sj26
Copy link

sj26 commented Mar 20, 2025

I have a fresh install of the aws load balancer controller on a fresh eks cluster but it's stuck at this log entry:

image

Searching around I see a lot of the same problem, but no clear guidance on solutions or diagnostics.

How do I diagnose where this is going wrong?

kubectl version
Client Version: v1.30.7
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.32.2-eks-bc803b4
helm list --namespace kube-system
NAME                            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                                   APP VERSION
aws-load-balancer-controller    kube-system     1               2025-03-20 14:22:57.85533 +1100 AEDT    deployed        aws-load-balancer-controller-1.12.0     v2.12.0

Sorry if this is the wrong place. Please point at docs if there is somewhere I need to look, for future travellers as well 🙏

Edit: Turns out this may have been a red herring - it seems like the controller got past that state but doesn't log that the lease is obtained, or the logs are presented out of order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants