-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix: Avoid controller crashes when running large number of workflows #9691
Conversation
Signed-off-by: Yuan Tang <[email protected]>
Signed-off-by: Yuan Tang <[email protected]>
Signed-off-by: Yuan Tang <[email protected]>
| `INDEX_WORKFLOW_SEMAPHORE_KEYS` | `bool` | `true` | Whether or not to index semaphores. | | ||
| `LEADER_ELECTION_IDENTITY` | `string` | Controller's `metadata.name` | The ID used for workflow controllers to elect a leader. | | ||
| `LEADER_ELECTION_DISABLE` | `bool` | `false` | Whether leader election should be disabled. | | ||
| `LEADER_ELECTION_LEASE_DURATION` | `time.Duration` | `15s` | The duration that non-leader candidates will wait to force acquire leadership. | | ||
| `LEADER_ELECTION_RENEW_DEADLINE` | `time.Duration` | `10s` | The duration that the acting master will retry refreshing leadership before giving up. | | ||
| `LEADER_ELECTION_RETRY_PERIOD` | `time.Duration` | `5s` | The duration that the leader election clients should wait between tries of actions. | | ||
| `LIST_LIMIT` | `int` | `200` | The maximum number of responses to return for a list call on workflows for workflow informer. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be removed, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditional approval after removal of LIST_LIMIT from documentation.
@@ -803,6 +803,7 @@ func (wfc *WorkflowController) tweakListOptions(options *metav1.ListOptions) { | |||
labelSelector := labels.NewSelector(). | |||
Add(util.InstanceIDRequirement(wfc.Config.InstanceID)) | |||
options.LabelSelector = labelSelector.String() | |||
options.Limit = int64(env.LookupEnvIntOr("LIST_LIMIT", 200)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this paginate properly? Or will it simply cut it off at 200
…rgoproj#9691) Signed-off-by: Yuan Tang <[email protected]> Signed-off-by: yangxue.chen <[email protected]>
…rgoproj#9691) Signed-off-by: Yuan Tang <[email protected]> Signed-off-by: yangxue.chen <[email protected]>
…rgoproj#9691) Signed-off-by: Yuan Tang <[email protected]> Signed-off-by: juchao <[email protected]>
Fixes #8275.
Signed-off-by: Yuan Tang [email protected]