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

operator: Add support for configuring HTTP server timeouts #9405

Merged
merged 35 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
70d3ea6
operator: Add LokiStack http server limits spec
periklis May 5, 2023
5932c37
Parse server config options from limits spec
periklis May 5, 2023
f5eb750
Add OpenShift route timeout annotation
periklis May 5, 2023
643fc08
Pass server options to loki config
periklis May 5, 2023
e9aaf56
Fix defaults
periklis May 5, 2023
c3a6557
Apply http server and upstream timeouts to the gateway
periklis May 5, 2023
268daaa
Add changelog entry
periklis May 5, 2023
d19eb9d
Add api docs
periklis May 5, 2023
89c7465
Merge branch 'main' into operator-fix-write-timeouts
periklis May 8, 2023
a37e1a2
Add operator-sdk API markers
periklis May 8, 2023
11c531e
Enhance error log message in lokistack handler
periklis May 8, 2023
1c661c5
Merge branch 'main' into operator-fix-write-timeouts
periklis May 8, 2023
08ae251
Merge branch 'main' into operator-fix-write-timeouts
periklis May 9, 2023
9079100
Apply code review suggestions
periklis May 15, 2023
2723949
Merge remote-tracking branch 'upstream' into operator-fix-write-timeouts
periklis May 15, 2023
146a034
Fix merge
periklis May 15, 2023
0bff0e9
Merge remote-tracking branch 'upstream' into operator-fix-write-timeouts
periklis May 17, 2023
10f668e
Regenerate
periklis May 17, 2023
d5e0bbb
Make defaults a global variable, remove pointer
xperimental May 17, 2023
d5d883d
Make defaults more visible in parse function
xperimental May 17, 2023
42e5b49
Unify defaults and simplify NewServerConfig
xperimental May 17, 2023
642dfba
Rename constants
xperimental May 17, 2023
094a59d
Use time.Duration in config template
xperimental May 17, 2023
cd9731d
Reduce indirection in config generator
xperimental May 17, 2023
a732ece
Separate config structs for Loki and gateway
xperimental May 17, 2023
9c4bb0b
Rename configuration struct
xperimental May 17, 2023
47d56cc
Merge remote-tracking branch 'upstream' into operator-fix-write-timeouts
periklis May 17, 2023
12e6080
Rename TestNewServerConfig to TestNewTimeoutConfig
periklis May 17, 2023
c441848
Raise error instead of using defaults
xperimental May 22, 2023
3382fac
Shorten gateway route timeout
xperimental May 22, 2023
4cb456c
Increase default query timeout to match existing default
xperimental May 22, 2023
11d0ebf
Regenerate docs
periklis May 22, 2023
43be4ef
Merge remote-tracking branch 'upstream' into operator-fix-write-timeouts
periklis May 22, 2023
38fc277
Fix failing tests
periklis May 22, 2023
7a2d0d2
Update import formatting to satisfy check
xperimental May 22, 2023
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
Prev Previous commit
Next Next commit
Regenerate
  • Loading branch information
periklis committed May 17, 2023
commit 10f668e9d877bc4d4c9246d9d6c4134d223ca95d
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ metadata:
categories: OpenShift Optional, Logging & Tracing
certified: "false"
containerImage: docker.io/grafana/loki-operator:main-ac1c1fd
createdAt: "2023-05-15T12:43:18Z"
createdAt: "2023-05-17T13:41:47Z"
description: The Community Loki Operator provides Kubernetes native deployment
and management of Loki and related logging components.
operators.operatorframework.io/builder: operator-sdk-unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ metadata:
categories: OpenShift Optional, Logging & Tracing
certified: "false"
containerImage: docker.io/grafana/loki-operator:main-ac1c1fd
createdAt: "2023-05-15T12:43:13Z"
createdAt: "2023-05-17T13:41:44Z"
description: The Community Loki Operator provides Kubernetes native deployment
and management of Loki and related logging components.
operators.operatorframework.io/builder: operator-sdk-unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ metadata:
categories: OpenShift Optional, Logging & Tracing
certified: "false"
containerImage: quay.io/openshift-logging/loki-operator:v0.1.0
createdAt: "2023-05-15T12:43:22Z"
createdAt: "2023-05-17T13:41:50Z"
description: |
The Loki Operator for OCP provides a means for configuring and managing a Loki stack for cluster logging.
## Prerequisites and Requirements
Expand Down
118 changes: 17 additions & 101 deletions operator/docs/operator/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1007,60 +1007,6 @@ MemberListSpec
</tr></tbody>
</table>

## HttpServerLimitsSpec { #loki-grafana-com-v1-HttpServerLimitsSpec }
<p>
(<em>Appears on:</em><a href="#loki-grafana-com-v1-ServerLimitsSpec">ServerLimitsSpec</a>)
</p>
<div>
<p>HttpServerLimitsSpec defines for Loki&rsquo;s http server timeouts for all components.</p>
</div>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>idleTimeout</code><br/>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>IdleTimeout defines the HTTP server-side idle timeout.</p>
</td>
</tr>
<tr>
<td>
<code>readTimeout</code><br/>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>ReadTimeout covers the time from when the connection is accepted to when the request body is fully read</p>
</td>
</tr>
<tr>
<td>
<code>writeTimeout</code><br/>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>WriteTimeout covers the time from the end of the request header read to the end of the response write</p>
</td>
</tr>
</tbody>
</table>

## IngestionLimitSpec { #loki-grafana-com-v1-IngestionLimitSpec }
<p>
(<em>Appears on:</em><a href="#loki-grafana-com-v1-LimitsTemplateSpec">LimitsTemplateSpec</a>)
Expand Down Expand Up @@ -1237,20 +1183,6 @@ map[string]github.com/grafana/loki/operator/apis/loki/v1.LimitsTemplateSpec
<p>Tenants defines the limits applied per tenant.</p>
</td>
</tr>
<tr>
<td>
<code>server</code><br/>
<em>
<a href="#loki-grafana-com-v1-ServerLimitsSpec">
ServerLimitsSpec
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Server defines the limits applied on all Loki server-side components.</p>
</td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -1370,6 +1302,21 @@ the component onto it.</p>
the component onto it.</p>
</td>
</tr>
<tr>
<td>
<code>podAntiAffinity</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#podantiaffinity-v1-core">
Kubernetes core/v1.PodAntiAffinity
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>PodAntiAffinity defines the pod anti affinity scheduling rules to schedule pods
of a component.</p>
</td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -3397,7 +3344,8 @@ int32
</td>
<td>
<em>(Optional)</em>
<p>Zones defines an array of ZoneSpec that the scheduler will try to satisfy.</p>
<p>Zones defines an array of ZoneSpec that the scheduler will try to satisfy.
IMPORTANT: Make sure that the replication factor defined is less than or equal to the number of available zones.</p>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -3872,38 +3820,6 @@ the same namespace as the LokiStack object is in is used.</p>
</tbody>
</table>

## ServerLimitsSpec { #loki-grafana-com-v1-ServerLimitsSpec }
<p>
(<em>Appears on:</em><a href="#loki-grafana-com-v1-LimitsSpec">LimitsSpec</a>)
</p>
<div>
<p>ServerLimitsSpec defines the Loki server-side limits for all components.</p>
</div>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>http</code><br/>
<em>
<a href="#loki-grafana-com-v1-HttpServerLimitsSpec">
HttpServerLimitsSpec
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>HTTP defines the HTTP server limits.</p>
</td>
</tr>
</tbody>
</table>

## StorageSchemaEffectiveDate { #loki-grafana-com-v1-StorageSchemaEffectiveDate }
(<code>string</code> alias)
<p>
Expand Down