Skip to content

Commit 32e620f

Browse files
authored
Replace yq outdated command with jsonpath (#286)
Co-authored-by: ammbra <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>
1 parent 638e6e4 commit 32e620f

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

documentation/modules/camelk/pages/_partials/invoke-service.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ kubectl::
1313
[.console-input]
1414
[source,bash,subs="+macros,+attributes"]
1515
----
16-
SVC_URL=`kubectl -n {tutorial-namespace} get ksvc {svc-name} -ojsonpath='{.status.domain}'`
16+
SVC_URL=`kubectl -n {tutorial-namespace} get ksvc {svc-name} -o jsonpath='{.status.domain}'`
1717
----
1818
--
1919
oc::
@@ -22,7 +22,7 @@ oc::
2222
[.console-input]
2323
[source,bash,subs="+macros,+attributes"]
2424
----
25-
SVC_URL=`oc -n {tutorial-namespace} get ksvc {svc-name} -ojsonpath='{.status.domain}'`
25+
SVC_URL=`oc -n {tutorial-namespace} get ksvc {svc-name} -o jsonpath='{.status.domain}'`
2626
----
2727
--
2828
====

documentation/modules/eventing/pages/_partials/invoke-service.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ copyToClipboard::{doc-sec}-{k8s-cli}-svc-call[]
2727
[#{doc-sec}-{k8s-env}-{k8s-cli}-svc-call]
2828
[source,bash,subs="+macros,+attributes"]
2929
----
30-
export SVC_URL=`oc get rt greeter -o yaml | yq read - 'status.url'` && \
30+
export SVC_URL=`oc get rt greeter -o jsonpath={.status.url} && \
3131
http $SVC_URL
3232
----
3333

@@ -40,7 +40,7 @@ copyToClipboard::{doc-sec}-{k8s-env}-{k8s-cli}-svc-call[]
4040
[#{doc-sec}-{k8s-cli}-svc-call-params]
4141
[source,bash,subs="+macros,+attributes"]
4242
----
43-
export SVC_URL=`oc get rt greeter -o yaml | yq read - 'status.url'` && \
43+
export SVC_URL=`oc get rt greeter -o jsonpath={.status.url} && \
4444
http $SVC_URL/{svc-params}
4545
----
4646

documentation/modules/serving/pages/_partials/invoke-service.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ http $(kn service describe greeter -o url)
2121
[.console-input]
2222
[source,bash,subs="+macros,+attributes"]
2323
----
24-
export SVC_URL=`{kubernetes-cli} get rt greeter -o yaml | yq read - 'status.url'` && \
24+
export SVC_URL=`{kubernetes-cli} get rt greeter -o jsonpath={.status.url} && \
2525
http $SVC_URL
2626
----
2727

@@ -32,7 +32,7 @@ http $SVC_URL
3232
[.console-input]
3333
[source,bash,subs="+macros,+attributes"]
3434
----
35-
export SVC_URL=`{kubernetes-cli} get rt greeter -o yaml | yq read - 'status.url'` && \
35+
export SVC_URL=`{kubernetes-cli} get rt greeter -o jsonpath={.status.url} && \
3636
http $SVC_URL/{svc-params}
3737
----
3838

0 commit comments

Comments
 (0)