diff --git a/api/v1alpha1/flowcollector_types.go b/api/v1alpha1/flowcollector_types.go index 5c71d186e..f797767cc 100644 --- a/api/v1alpha1/flowcollector_types.go +++ b/api/v1alpha1/flowcollector_types.go @@ -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 diff --git a/config/crd/bases/flows.netobserv.io_flowcollectors.yaml b/config/crd/bases/flows.netobserv.io_flowcollectors.yaml index 61ae02f95..aa4a141a9 100644 --- a/config/crd/bases/flows.netobserv.io_flowcollectors.yaml +++ b/config/crd/bases/flows.netobserv.io_flowcollectors.yaml @@ -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 diff --git a/config/samples/flows_v1alpha1_flowcollector.yaml b/config/samples/flows_v1alpha1_flowcollector.yaml index 768622f0c..febba5815 100644 --- a/config/samples/flows_v1alpha1_flowcollector.yaml +++ b/config/samples/flows_v1alpha1_flowcollector.yaml @@ -37,7 +37,6 @@ spec: minBackoff: 1s maxBackoff: 300s maxRetries: 10 - timestampLabel: TimeFlowEnd staticLabels: app: netobserv-flowcollector consolePlugin: diff --git a/controllers/flowlogspipeline/flp_objects.go b/controllers/flowlogspipeline/flp_objects.go index 55e4c5d12..527996a6f 100644 --- a/controllers/flowlogspipeline/flp_objects.go +++ b/controllers/flowlogspipeline/flp_objects.go @@ -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", diff --git a/docs/FlowCollector.md b/docs/FlowCollector.md index 497060f43..df558e2ac 100644 --- a/docs/FlowCollector.md +++ b/docs/FlowCollector.md @@ -2630,15 +2630,6 @@ Loki contains settings related to the loki client Default: 10s
false - - timestampLabel - string - - TimestampLabel is the label to use for time indexing in Loki. E.g. "TimeReceived", "TimeFlowStart", "TimeFlowEnd".
-
- Default: TimeFlowEnd
- - false url string