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

NETOBSERV-265 and NETOBSERV-348 timestamp indexing #101

Merged
merged 1 commit into from
May 12, 2022
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
4 changes: 0 additions & 4 deletions api/v1alpha1/flowcollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,6 @@ type FlowCollectorLoki struct {
//+kubebuilder:default:={"app":"netobserv-flowcollector"}
// StaticLabels is a map of common labels to set on each flow
StaticLabels map[string]string `json:"staticLabels,omitempty"`

//+kubebuilder:default:="TimeFlowEnd"
// TimestampLabel is the label to use for time indexing in Loki. E.g. "TimeReceived", "TimeFlowStart", "TimeFlowEnd".
TimestampLabel string `json:"timestampLabel,omitempty"`
}

// FlowCollectorConsolePlugin defines the desired ConsolePlugin state of FlowCollector
Expand Down
5 changes: 0 additions & 5 deletions config/crd/bases/flows.netobserv.io_flowcollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1501,11 +1501,6 @@ spec:
description: Timeout is the maximum time connection / request
limit A Timeout of zero means no timeout.
type: string
timestampLabel:
default: TimeFlowEnd
description: TimestampLabel is the label to use for time indexing
in Loki. E.g. "TimeReceived", "TimeFlowStart", "TimeFlowEnd".
type: string
url:
default: http://loki:3100/
description: URL is the address of an existing Loki service to
Expand Down
1 change: 0 additions & 1 deletion config/samples/flows_v1alpha1_flowcollector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ spec:
minBackoff: 1s
maxBackoff: 300s
maxRetries: 10
timestampLabel: TimeFlowEnd
staticLabels:
app: netobserv-flowcollector
consolePlugin:
Expand Down
3 changes: 2 additions & 1 deletion controllers/flowlogspipeline/flp_objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ func (b *builder) configMap() (*corev1.ConfigMap, string) {
lokiWrite["staticLabels"] = b.desiredLoki.StaticLabels
lokiWrite["timeout"] = b.desiredLoki.Timeout.ToUnstructured()
lokiWrite["url"] = b.desiredLoki.URL
lokiWrite["timestampLabel"] = b.desiredLoki.TimestampLabel
lokiWrite["timestampLabel"] = "TimeFlowEndMs"
lokiWrite["timestampScale"] = "1ms"
}

loki = map[string]interface{}{"name": "loki",
Expand Down
9 changes: 0 additions & 9 deletions docs/FlowCollector.md
Original file line number Diff line number Diff line change
Expand Up @@ -2630,15 +2630,6 @@ Loki contains settings related to the loki client
<i>Default</i>: 10s<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>timestampLabel</b></td>
<td>string</td>
<td>
TimestampLabel is the label to use for time indexing in Loki. E.g. "TimeReceived", "TimeFlowStart", "TimeFlowEnd".<br/>
<br/>
<i>Default</i>: TimeFlowEnd<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>url</b></td>
<td>string</td>
Expand Down