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

Fix loki manual params doc #485

Merged
merged 2 commits into from
Nov 7, 2023
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
13 changes: 6 additions & 7 deletions api/v1beta2/flowcollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,16 +521,15 @@ type LokiManualParams struct {
// https://loki-gateway-http.netobserv.svc:8080/api/logs/v1/network.
IngesterURL string `json:"ingesterUrl,omitempty"`

//+kubebuilder:validation:optional
// `querierURL` specifies the address of the Loki querier service, in case it is different from the
// Loki ingester URL. If empty, the URL value is used (assuming that the Loki ingester
// and querier are in the same server). When using the Loki Operator, do not set it, since
// ingestion and queries use the Loki gateway.
//+kubebuilder:default:="http://loki:3100/"
// `querierUrl` specifies the address of the Loki querier service.
// When using the Loki Operator, set it to the Loki gateway service with the `network` tenant set in path, for example
// https://loki-gateway-http.netobserv.svc:8080/api/logs/v1/network.
Comment on lines +526 to +527
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we still mention loki operator in manual since we introduced LokiStack mode ?

Copy link
Member Author

@jotak jotak Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first I removed them, then I thought perhaps there will be cases where people use loki operator but for some reason need to use manual params (e.g. using an old version or on the contrary a newer version which requires changes in our lokistack mode handling) .. so perhaps it's doesn't hurt to keep this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure 👍

QuerierURL string `json:"querierUrl,omitempty"`

//+kubebuilder:validation:optional
// `statusURL` specifies the address of the Loki `/ready`, `/metrics` and `/config` endpoints, in case it is different from the
// Loki querier URL. If empty, the `querierURL` value is used.
// `statusUrl` specifies the address of the Loki `/ready`, `/metrics` and `/config` endpoints, in case it is different from the
// Loki querier URL. If empty, the `querierUrl` value is used.
// This is useful to show error messages and some context in the frontend.
// When using the Loki Operator, set it to the Loki HTTP query frontend service, for example
// https://loki-query-frontend-http.netobserv.svc:3100/.
Expand Down
15 changes: 7 additions & 8 deletions bundle/manifests/flows.netobserv.io_flowcollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6566,12 +6566,11 @@ spec:
`network` tenant set in path, for example https://loki-gateway-http.netobserv.svc:8080/api/logs/v1/network.'
type: string
querierUrl:
description: '`querierURL` specifies the address of the Loki
querier service, in case it is different from the Loki ingester
URL. If empty, the URL value is used (assuming that the
Loki ingester and querier are in the same server). When
using the Loki Operator, do not set it, since ingestion
and queries use the Loki gateway.'
default: http://loki:3100/
description: '`querierUrl` specifies the address of the Loki
querier service. When using the Loki Operator, set it to
the Loki gateway service with the `network` tenant set in
path, for example https://loki-gateway-http.netobserv.svc:8080/api/logs/v1/network.'
type: string
statusTls:
description: TLS client configuration for Loki status URL.
Expand Down Expand Up @@ -6657,9 +6656,9 @@ spec:
type: object
type: object
statusUrl:
description: '`statusURL` specifies the address of the Loki
description: '`statusUrl` specifies the address of the Loki
`/ready`, `/metrics` and `/config` endpoints, in case it
is different from the Loki querier URL. If empty, the `querierURL`
is different from the Loki querier URL. If empty, the `querierUrl`
value is used. This is useful to show error messages and
some context in the frontend. When using the Loki Operator,
set it to the Loki HTTP query frontend service, for example
Expand Down
15 changes: 7 additions & 8 deletions config/crd/bases/flows.netobserv.io_flowcollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6552,12 +6552,11 @@ spec:
`network` tenant set in path, for example https://loki-gateway-http.netobserv.svc:8080/api/logs/v1/network.'
type: string
querierUrl:
description: '`querierURL` specifies the address of the Loki
querier service, in case it is different from the Loki ingester
URL. If empty, the URL value is used (assuming that the
Loki ingester and querier are in the same server). When
using the Loki Operator, do not set it, since ingestion
and queries use the Loki gateway.'
default: http://loki:3100/
description: '`querierUrl` specifies the address of the Loki
querier service. When using the Loki Operator, set it to
the Loki gateway service with the `network` tenant set in
path, for example https://loki-gateway-http.netobserv.svc:8080/api/logs/v1/network.'
type: string
statusTls:
description: TLS client configuration for Loki status URL.
Expand Down Expand Up @@ -6643,9 +6642,9 @@ spec:
type: object
type: object
statusUrl:
description: '`statusURL` specifies the address of the Loki
description: '`statusUrl` specifies the address of the Loki
`/ready`, `/metrics` and `/config` endpoints, in case it
is different from the Loki querier URL. If empty, the `querierURL`
is different from the Loki querier URL. If empty, the `querierUrl`
value is used. This is useful to show error messages and
some context in the frontend. When using the Loki Operator,
set it to the Loki HTTP query frontend service, for example
Expand Down
2 changes: 1 addition & 1 deletion controllers/flowcollector_controller_iso_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func flowCollectorIsoSpecs() {
Mode: flowslatest.LokiModeManual,
Manual: flowslatest.LokiManualParams{
IngesterURL: "http://loki",
QuerierURL: "",
QuerierURL: "http://loki",
StatusURL: "",
TenantID: "test",
AuthToken: "DISABLED",
Expand Down
6 changes: 4 additions & 2 deletions docs/FlowCollector.md
Original file line number Diff line number Diff line change
Expand Up @@ -11720,7 +11720,9 @@ Loki configuration for "Manual" mode. This is the most flexible configuration. I
<td><b>querierUrl</b></td>
<td>string</td>
<td>
`querierURL` specifies the address of the Loki querier service, in case it is different from the Loki ingester URL. If empty, the URL value is used (assuming that the Loki ingester and querier are in the same server). When using the Loki Operator, do not set it, since ingestion and queries use the Loki gateway.<br/>
`querierUrl` specifies the address of the Loki querier service. When using the Loki Operator, set it to the Loki gateway service with the `network` tenant set in path, for example https://loki-gateway-http.netobserv.svc:8080/api/logs/v1/network.<br/>
<br/>
<i>Default</i>: http://loki:3100/<br/>
</td>
<td>false</td>
</tr><tr>
Expand All @@ -11734,7 +11736,7 @@ Loki configuration for "Manual" mode. This is the most flexible configuration. I
<td><b>statusUrl</b></td>
<td>string</td>
<td>
`statusURL` specifies the address of the Loki `/ready`, `/metrics` and `/config` endpoints, in case it is different from the Loki querier URL. If empty, the `querierURL` value is used. This is useful to show error messages and some context in the frontend. When using the Loki Operator, set it to the Loki HTTP query frontend service, for example https://loki-query-frontend-http.netobserv.svc:3100/. `statusTLS` configuration is used when `statusUrl` is set.<br/>
`statusUrl` specifies the address of the Loki `/ready`, `/metrics` and `/config` endpoints, in case it is different from the Loki querier URL. If empty, the `querierUrl` value is used. This is useful to show error messages and some context in the frontend. When using the Loki Operator, set it to the Loki HTTP query frontend service, for example https://loki-query-frontend-http.netobserv.svc:3100/. `statusTLS` configuration is used when `statusUrl` is set.<br/>
</td>
<td>false</td>
</tr><tr>
Expand Down
5 changes: 3 additions & 2 deletions hack/cloned.flows.netobserv.io_flowcollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4560,7 +4560,8 @@ spec:
description: '`ingesterUrl` is the address of an existing Loki ingester service to push the flows to. When using the Loki Operator, set it to the Loki gateway service with the `network` tenant set in path, for example https://loki-gateway-http.netobserv.svc:8080/api/logs/v1/network.'
type: string
querierUrl:
description: '`querierURL` specifies the address of the Loki querier service, in case it is different from the Loki ingester URL. If empty, the URL value is used (assuming that the Loki ingester and querier are in the same server). When using the Loki Operator, do not set it, since ingestion and queries use the Loki gateway.'
default: http://loki:3100/
description: '`querierUrl` specifies the address of the Loki querier service. When using the Loki Operator, set it to the Loki gateway service with the `network` tenant set in path, for example https://loki-gateway-http.netobserv.svc:8080/api/logs/v1/network.'
type: string
statusTls:
description: TLS client configuration for Loki status URL.
Expand Down Expand Up @@ -4621,7 +4622,7 @@ spec:
type: object
type: object
statusUrl:
description: '`statusURL` specifies the address of the Loki `/ready`, `/metrics` and `/config` endpoints, in case it is different from the Loki querier URL. If empty, the `querierURL` value is used. This is useful to show error messages and some context in the frontend. When using the Loki Operator, set it to the Loki HTTP query frontend service, for example https://loki-query-frontend-http.netobserv.svc:3100/. `statusTLS` configuration is used when `statusUrl` is set.'
description: '`statusUrl` specifies the address of the Loki `/ready`, `/metrics` and `/config` endpoints, in case it is different from the Loki querier URL. If empty, the `querierUrl` value is used. This is useful to show error messages and some context in the frontend. When using the Loki Operator, set it to the Loki HTTP query frontend service, for example https://loki-query-frontend-http.netobserv.svc:3100/. `statusTLS` configuration is used when `statusUrl` is set.'
type: string
tenantID:
default: netobserv
Expand Down