Skip to content

Commit 2874ae2

Browse files
committed
simplify validation by removing redundant check
Signed-off-by: Nader Ziada <[email protected]>
1 parent f4b4467 commit 2874ae2

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

docs/operate.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ Optional variables
7474

7575
## Configuring the KEDA HTTP Add-on Operator
7676

77-
## Leader Election Timing
77+
### Leader Election Timing
7878

7979
When running multiple replicas of the operator for high availability, you can configure the leader election timing parameters:
8080

8181
- **`KEDA_HTTP_OPERATOR_LEADER_ELECTION_LEASE_DURATION`** - Duration that non-leader candidates will wait to force acquire leadership. Default: `15s` (Kubernetes default)
82-
- **`KEDA_HTTP_OPERATOR_LEADER_ELECTION_RENEW_DEADLINE`** - Duration that the acting leader will retry refreshing leadership before giving up. Default: `10s` (Kubernetes default)
82+
- **`KEDA_HTTP_OPERATOR_LEADER_ELECTION_RENEW_DEADLINE`** - Duration that the acting leader will retry renewing leadership before giving up. Default: `10s` (Kubernetes default)
8383
- **`KEDA_HTTP_OPERATOR_LEADER_ELECTION_RETRY_PERIOD`** - Duration the LeaderElector clients should wait between tries of actions. Default: `2s` (Kubernetes default)
8484

8585
Example usage in deployment:

pkg/util/env_resolver.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ func ValidateLeaderElectionConfig(leaseDuration, renewDeadline, retryPeriod *tim
101101
if renew <= retry {
102102
return fmt.Errorf("renew deadline (%v) must be greater than retry period (%v)", renew, retry)
103103
}
104-
if lease <= retry {
105-
return fmt.Errorf("lease duration (%v) must be greater than retry period (%v)", lease, retry)
106-
}
107104

108105
return nil
109106
}

0 commit comments

Comments
 (0)