Skip to content

Commit

Permalink
drop use of unsupported resource locks from the leaderelection exampl…
Browse files Browse the repository at this point in the history
…e config (#3514)
  • Loading branch information
dprotaso authored Jul 6, 2020
1 parent 4912b7e commit f4b9e5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
13 changes: 4 additions & 9 deletions config/core/configmaps/leader-election.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ metadata:
eventing.knative.dev/release: devel
knative.dev/example-checksum: "43edfe90"
annotations:
knative.dev/example-checksum: 882dea41
knative.dev/example-checksum: f7320456
data:
_example: |
################################
Expand All @@ -39,23 +39,18 @@ data:
# this example block and unindented to be in the data block
# to actually change the configuration.
# resourceLock controls which API resource is used as the basis for the
# leader election lock. Valid values are:
#
# - leases -> use the coordination API
# - configmaps -> use configmaps
# - endpoints -> use endpoints
resourceLock: "leases"
# leaseDuration is how long non-leaders will wait to try to acquire the
# lock; 15 seconds is the value used by core kubernetes controllers.
leaseDuration: "15s"
# renewDeadline is how long a leader will try to renew the lease before
# giving up; 10 seconds is the value used by core kubernetes controllers.
renewDeadline: "10s"
# retryPeriod is how long the leader election client waits between tries of
# actions; 2 seconds is the value used by core kuberntes controllers.
retryPeriod: "2s"
# enabledComponents is a comma-delimited list of component names for which
# leader election is enabled. Valid values are:
#
Expand Down
1 change: 0 additions & 1 deletion pkg/leaderelection/leader_election_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ func okConfig() *kle.Config {

func okData() map[string]string {
return map[string]string{
"resourceLock": "leases",
// values in this data come from the defaults suggested in the
// code:
// https://github.com/kubernetes/client-go/blob/kubernetes-1.16.0/tools/leaderelection/leaderelection.go
Expand Down

0 comments on commit f4b9e5a

Please sign in to comment.