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

Upgrade controller-runtime, k8s dependencies and switch leader election lock to leases #186

Merged
merged 4 commits into from
May 22, 2024

Conversation

levan-m
Copy link
Contributor

@levan-m levan-m commented May 20, 2024

What does this PR do?

Notable changes:

  • controller-runtime 0.15.x -> 0.16.0 - didn't update to latest of 0.16.x as fake caused test failures.
  • k8s APIs 0.27.7 -> 0.28.9
  • Make leases default leader election resource lock, as others are deprecated.
    {"level":"ERROR","ts":"2024-05-20T18:35:44Z","logger":"setup","msg":"unable to start manager","error":"configmapsleases lock is removed, migrated to leases"}
    

0.16.0 release notes here.

kubernetes-sigs/controller-runtime#2407
kubernetes-sigs/controller-runtime#2422

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Describe your test plan

Write there any instructions and details you may have to test your PR.

@levan-m levan-m added this to the v0.10 milestone May 20, 2024
@levan-m levan-m requested a review from a team as a code owner May 20, 2024 18:23
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, documentation, tooling

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, documentation, tooling

case len(namespaces) > 1:
// configure cluster-scoped with MultiNamespacedCacheBuilder
logger.Info("Manager will be watching multiple namespaces", namespaces)
opt.NewCache = func(config *rest.Config, opts cache.Options) (cache.Cache, error) {
opts.Namespaces = namespaces
// https://github.com/kubernetes-sigs/controller-runtime/commit/3e35cab1ea29145d8699259b079633a2b8cfc116
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 couldn't associate this change to specific release note but here is the change relevant to below
kubernetes-sigs/controller-runtime@3e35cab

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, documentation, tooling

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, documentation, tooling

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, documentation, tooling

@codecov-commenter
Copy link

codecov-commenter commented May 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.21%. Comparing base (f0c8877) to head (a6b8b08).
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #186      +/-   ##
==========================================
+ Coverage   63.10%   63.21%   +0.10%     
==========================================
  Files          41       41              
  Lines        3098     3107       +9     
==========================================
+ Hits         1955     1964       +9     
- Misses       1023     1024       +1     
+ Partials      120      119       -1     
Flag Coverage Δ
unittests 63.21% <ø> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9da787...a6b8b08. Read the comment docs.

@levan-m levan-m added the tooling Issue linked to the repository tooling label May 21, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request contains a valid label.

@levan-m levan-m changed the title Upgrade controller-runtime to 0.16.0, k8s dependencies to 0.28.x Upgrade controller-runtime, k8s dependencies and switch to leader election lock to leases May 21, 2024
@levan-m levan-m changed the title Upgrade controller-runtime, k8s dependencies and switch to leader election lock to leases Upgrade controller-runtime, k8s dependencies and switch leader election lock to leases May 21, 2024
@levan-m levan-m merged commit 4bdc19d into main May 22, 2024
29 checks passed
@levan-m levan-m deleted the levan-m/k8s-dep-upgrades branch May 22, 2024 13:33
levan-m added a commit that referenced this pull request May 22, 2024
…tion lock to `leases` (#186)

* Checkpoint: build, docker-build, test; controller-runtime 0.15->0.16, k8s 0.27->0.28.

* Use controller-runtime 0.16.0 instead of 0.16.6 due to incompatibility with new fake

* update CRDs

* Make `leases` default  leaderElectionResourceLock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa/skip-qa tooling Issue linked to the repository tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants