Skip to content

Commit

Permalink
Carry the leaderelection patch.
Browse files Browse the repository at this point in the history
Eventing change: knative/eventing#3405
Upstream PR: kubernetes/kubernetes#88192
PKG issue: knative/pkg#1199
  • Loading branch information
mattmoor committed Aug 7, 2020
1 parent f3e535f commit a1aadf7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
12 changes: 12 additions & 0 deletions hack/k8s-client-go.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go 2020-07-02 11:15:19.000000000 -0400
+++ b/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go 2020-07-06 15:51:35.000000000 -0400
@@ -301,7 +301,8 @@
return true
}
leaderElectionRecord := rl.LeaderElectionRecord{
- LeaderTransitions: le.observedRecord.LeaderTransitions,
+ LeaderTransitions: le.observedRecord.LeaderTransitions,
+ LeaseDurationSeconds: le.observedRecord.LeaseDurationSeconds,
}
if err := le.config.Lock.Update(leaderElectionRecord); err != nil {
klog.Errorf("Failed to release lock: %v", err)
4 changes: 4 additions & 0 deletions hack/update-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,7 @@ update_licenses third_party/VENDOR-LICENSE "./..."

echo "Removing broken symlinks"
remove_broken_symlinks ./vendor

# Patch k8s leader-election fixing graceful release
# More information: https://github.com/kubernetes/kubernetes/pull/91942
git apply ${ROOT_DIR}/hack/k8s-client-go.patch

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a1aadf7

Please sign in to comment.