From 49ca24752c91eb942567d3dfbd5cc2016468ceff Mon Sep 17 00:00:00 2001 From: dhgautam99 <66953383+dhgautam99@users.noreply.github.com> Date: Fri, 10 May 2024 01:00:13 +0530 Subject: [PATCH] "drop" config should be an array When creating CLF with "drop" log record functionality: ~~~ cat clf.yaml apiVersion: logging.openshift.io/v1 kind: ClusterLogForwarder metadata: name: instance namespace: openshift-logging spec: filters: - name: important type: drop drop: test: - field: .kubernetes.namespace_name matches: "^open" test: - field: .log_type matches: "application" - field: .kubernetes.pod_name notMatches: "my-pod" pipelines: - name: test filterRefs: ["abc"] inputRefs: - application outputRefs: - default ~~~ $ oc create -f clf.yaml The ClusterLogForwarder "instance" is invalid: spec.filters[0].drop: Invalid value: "object": spec.filters[0].drop in body must be of type array: "object" "drop" should be an array and same is correct in the docs. --- modules/logging-content-filter-drop-records.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/logging-content-filter-drop-records.adoc b/modules/logging-content-filter-drop-records.adoc index 3dbd516902..d279c9789f 100644 --- a/modules/logging-content-filter-drop-records.adoc +++ b/modules/logging-content-filter-drop-records.adoc @@ -32,7 +32,7 @@ spec: - name: type: drop # <1> drop: # <2> - test: # <3> + - test: # <3> - field: .kubernetes.labels."foo-bar/baz" # <4> matches: .+ # <5> - field: .kubernetes.pod_name