Skip to content

OCPBUGS-47485: Only list CLO output urls when they exist #13150

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ ocil_clause: 'Logs are not forwarded outside the cluster using TLS'

ocil: |-
Run the following command:
<pre>{{{ ocil_oc_pipe_jq_filter('clusterlogforwarders', 'try [.items[].spec.outputs[][]|objects|.url] catch []', namespace="openshift-logging") }}}</pre>
<pre>{{{ ocil_oc_pipe_jq_filter('clusterlogforwarders', 'try [.items[].spec.outputs[][]|objects|selece(.url != null).url] catch []', namespace="openshift-logging") }}}</pre>
The output should return a list of URL entries with <pre>https://</pre> or <pre>tls://</pre> transport.

warnings:
- general: |-
{{{ openshift_cluster_setting() | indent(4) }}}
{{{ openshift_filtered_cluster_setting_suppressed({
"/apis/logging.openshift.io/v1/namespaces/openshift-logging/clusterlogforwarders/instance": 'try [.spec.outputs[].url] catch []',
"/apis/observability.openshift.io/v1/namespaces/openshift-logging/clusterlogforwarders": 'try [.items[].spec.outputs[][]|objects|.url] catch []',
"/apis/observability.openshift.io/v1/namespaces/openshift-logging/clusterlogforwarders": 'try [.items[].spec.outputs[][]|objects|select(.url != null).url] catch []',
}) | indent(4) }}}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ warnings:
- general: |-
{{{ openshift_cluster_setting() | indent(4) }}}
{{{ openshift_filtered_cluster_setting_suppressed({
"/apis/observability.openshift.io/v1/namespaces/openshift-logging/clusterlogforwarders": 'try [.items[].spec.outputs[][]|objects|.url] catch []',
"/apis/observability.openshift.io/v1/namespaces/openshift-logging/clusterlogforwarders": 'try [.items[].spec.outputs[][]|objects|(select(.url != null).url] catch []',
}) | indent(4) }}}

template:
Expand All @@ -50,7 +50,7 @@ template:
# The log forwarder outputs consist of an object and two strings (name and type).
# The url is part of the object and its name will vary depending on its type.
# By using the objects filter we ensure we are getting the object to query for its url.
filepath: "{{{ openshift_filtered_path('/apis/observability.openshift.io/v1/namespaces/openshift-logging/clusterlogforwarders', 'try [.items[].spec.outputs[][]|objects|.url] catch []') }}}"
filepath: "{{{ openshift_filtered_path('/apis/observability.openshift.io/v1/namespaces/openshift-logging/clusterlogforwarders', 'try [.items[].spec.outputs[][]|objects|select(.url != null).url] catch []') }}}"
yamlpath: "[:]"
entity_check: "all"
values:
Expand Down
Loading