Skip to content
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

Expose leader election leaseDuration and renewDeadline in helm chart #388

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions deploy/charts/trust-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,20 @@ The format of trust-manager logging. Accepted values are text or json.
> ```

The verbosity of trust-manager logging. This takes a value from 1-5, with the higher value being more verbose.
#### **app.leaderElection.leaseDuration** ~ `string`
> Default value:
> ```yaml
> 15s
> ```

The duration that non-leader candidates will wait to force acquire leadership. The default should be sufficient in a healthy cluster but can be slightly increased to prevent trust-manager from restart-looping when the API server is overloaded.
#### **app.leaderElection.renewDeadline** ~ `string`
> Default value:
> ```yaml
> 10s
> ```

The interval between attempts by the acting leader to renew a leadership slot before it stops leading. This MUST be less than or equal to the lease duration. The default should be sufficient in a healthy cluster but can be slightly increased to prevent trust-manager from restart-looping when the API server is overloaded.
#### **app.readinessProbe.port** ~ `number`
> Default value:
> ```yaml
Expand Down
2 changes: 2 additions & 0 deletions deploy/charts/trust-manager/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ spec:
- "--metrics-port={{.Values.app.metrics.port}}"
- "--readiness-probe-port={{.Values.app.readinessProbe.port}}"
- "--readiness-probe-path={{.Values.app.readinessProbe.path}}"
- "--leader-election-lease-duration={{.Values.app.leaderElection.leaseDuration}}"
- "--leader-election-renew-deadline={{.Values.app.leaderElection.renewDeadline}}"
# trust
- "--trust-namespace={{.Values.app.trust.namespace}}"
# webhook
Expand Down
25 changes: 25 additions & 0 deletions deploy/charts/trust-manager/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
"helm-values.app": {
"additionalProperties": false,
"properties": {
"leaderElection": {
"$ref": "#/$defs/helm-values.app.leaderElection"
},
"logFormat": {
"$ref": "#/$defs/helm-values.app.logFormat"
},
Expand Down Expand Up @@ -104,6 +107,28 @@
},
"type": "object"
},
"helm-values.app.leaderElection": {
"additionalProperties": false,
"properties": {
"leaseDuration": {
"$ref": "#/$defs/helm-values.app.leaderElection.leaseDuration"
},
"renewDeadline": {
"$ref": "#/$defs/helm-values.app.leaderElection.renewDeadline"
}
},
"type": "object"
},
"helm-values.app.leaderElection.leaseDuration": {
"default": "15s",
"description": "The duration that non-leader candidates will wait to force acquire leadership. The default should be sufficient in a healthy cluster but can be slightly increased to prevent trust-manager from restart-looping when the API server is overloaded.",
"type": "string"
},
"helm-values.app.leaderElection.renewDeadline": {
"default": "10s",
"description": "The interval between attempts by the acting leader to renew a leadership slot before it stops leading. This MUST be less than or equal to the lease duration. The default should be sufficient in a healthy cluster but can be slightly increased to prevent trust-manager from restart-looping when the API server is overloaded.",
"type": "string"
},
"helm-values.app.logFormat": {
"default": "text",
"description": "The format of trust-manager logging. Accepted values are text or json.",
Expand Down
10 changes: 10 additions & 0 deletions deploy/charts/trust-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,16 @@ app:
# The verbosity of trust-manager logging. This takes a value from 1-5, with the higher value being more verbose.
logLevel: 1

leaderElection:
# The duration that non-leader candidates will wait to force acquire leadership.
# The default should be sufficient in a healthy cluster but can be slightly increased to prevent trust-manager from restart-looping when the API server is overloaded.
leaseDuration: 15s

# The interval between attempts by the acting leader to renew a leadership slot before it stops leading.
# This MUST be less than or equal to the lease duration.
# The default should be sufficient in a healthy cluster but can be slightly increased to prevent trust-manager from restart-looping when the API server is overloaded.
renewDeadline: 10s

readinessProbe:
# The container port on which to expose the trust-manager HTTP readiness probe using the default network interface.
port: 6060
Expand Down