You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2020/12/03 10:46:58 UTC

[camel-k] 02/08: chore(doc): Format jq queries over multiple command lines

This is an automated email from the ASF dual-hosted git repository.

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 46e81a56b05f6067f9e9c69feea6b4357ff9b699
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Wed Dec 2 11:14:26 2020 +0100

    chore(doc): Format jq queries over multiple command lines
---
 .../ROOT/pages/troubleshooting/operating.adoc      | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/docs/modules/ROOT/pages/troubleshooting/operating.adoc b/docs/modules/ROOT/pages/troubleshooting/operating.adoc
index e65db0e..57956c6 100644
--- a/docs/modules/ROOT/pages/troubleshooting/operating.adoc
+++ b/docs/modules/ROOT/pages/troubleshooting/operating.adoc
@@ -46,7 +46,9 @@ It's firing when some reconciliation requests have failed.
 +
 [source,sh]
 ----
-$ kubectl logs deployment/camel-k-operator --since=1h | jq -R 'fromjson? | select(.level == "error")'
+$ kubectl logs deployment/camel-k-operator --since=1h \
+| jq -R 'fromjson?
+| select(.level == "error")'
 ----
 Check the `error`, `errorVerbose` and `stacktrace` fields.
 
@@ -54,7 +56,14 @@ Check the `error`, `errorVerbose` and `stacktrace` fields.
 +
 [source,sh]
 ----
-$ kubectl logs deployment/camel-k-operator --since=1h | jq -rR 'fromjson? | select(.level == "error") | [{namespace, name, controller}] | unique | .[] | "-n \(.namespace) \(.controller | rtrimstr("-controller"))/\(.name)"' | xargs kubectl describe
+$ kubectl logs deployment/camel-k-operator --since=1h \
+| jq -rR 'fromjson?
+| select(.level == "error")
+| [{namespace, name, controller}]
+| unique
+| .[]
+| "-n \(.namespace) \(.controller | rtrimstr("-controller"))/\(.name)"' \
+| xargs kubectl describe
 ----
 Check the resource events.
 
@@ -73,7 +82,14 @@ It's firing when more than 1% of the successful builds have their duration above
 +
 [source,sh]
 ----
-$ kubectl get builds.camel.apache.org -o json | jq -r '.items[] | select(.status.phase == "Succeeded") | select(.status.duration | "01-Jan-1970 \(sub("(?<time>.*)\\..*"; "\(.time)s"))" | strptime("%d-%b-%Y %Mm%Ss")? // strptime("%d-%b-%Y %Ss") | mktime > 120) | "-n \(.metadata.namespace) builds.camel.apache.org/\(.metadata.name)"' | xargs kubectl describe
+$ kubectl get builds.camel.apache.org -o json \
+| jq -r '.items[]
+| select(.status.phase == "Succeeded")
+| select(.status.duration
+  | "01-Jan-1970 \(sub("(?<time>.*)\\..*"; "\(.time)s"))" | strptime("%d-%b-%Y %Mm%Ss")? // strptime("%d-%b-%Y %Ss")
+  | mktime > 120)
+| "-n \(.metadata.namespace) builds.camel.apache.org/\(.metadata.name)"' \
+| xargs kubectl describe
 ----
 Check the resource events.