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 (#8565)
  • Loading branch information
dprotaso authored Jul 6, 2020
1 parent 63a2de1 commit 77c03f0
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 @@ -20,7 +20,7 @@ metadata:
labels:
serving.knative.dev/release: devel
annotations:
knative.dev/example-checksum: 83d5c126
knative.dev/example-checksum: b705abde
data:
_example: |
################################
Expand All @@ -38,23 +38,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 kubernetes controllers.
retryPeriod: "2s"
# enabledComponents is a comma-delimited list of component names for which
# leader election is enabled. Valid values are:
enabledComponents: "controller,contour-ingress-controller,hpaautoscaler,certcontroller,istiocontroller,net-http01,nscontroller,webhook"
1 change: 0 additions & 1 deletion pkg/leaderelection/config_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 77c03f0

Please sign in to comment.