-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add poll enrich eip module and upgrade knative to v0.4.0
- added new module to demonstrate pollEnrich EIP with - organized redundant instructions into partials - upgraded instructions to setup Knative v0.4.0 fixes #42, #35
- Loading branch information
1 parent
0474364
commit 5601991
Showing
13 changed files
with
278 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 16 additions & 3 deletions
19
documentation/modules/ROOT/pages/_partials/watching-logs.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,28 @@ | ||
[kube-ns='knativetutorial'] | ||
[kube-svc=''] | ||
|
||
Since it is a Cron job source, it would have started to emit events every minute. We can watch the logs of the service to see the messages delivered. | ||
|
||
The logs could be watched using the command: | ||
|
||
[source,bash,subs="+macros,+attributes"] | ||
---- | ||
kubectl logs -n knativetutorial -f <pod-name> -c user-container | ||
kubectl logs -n {kube-ns} -f <pod-name> -c user-container | ||
---- | ||
|
||
.(OR) | ||
|
||
[source,bash,subs="+macros,+attributes"] | ||
---- | ||
oc logs -n knativetutorial -f <pod-name> -c user-container | ||
---- | ||
oc logs -n {kube-ns} -f <pod-name> -c user-container | ||
---- | ||
|
||
[TIP] | ||
==== | ||
* Using stern with the command `stern -n {kube-ns} {kube-svc}`, to filter the logs further add `-c user-container` to the stern command. | ||
[source,bash,subs="+macros,+attributes"] | ||
---- | ||
stern -n {kube-ns} -c user-container {kube-svc} | ||
---- | ||
==== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
documentation/modules/camelk/pages/_partials/invoke-service.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[svc-name=''] | ||
[file-name=''] | ||
|
||
#tag::set-svc-url[] | ||
[source,bash,subs="+macros,+attributes"] | ||
---- | ||
SVC_URL=`kubectl -n knativetutorial get ksvc {svc-name} -ojsonpath='{.status.domain}'` | ||
---- | ||
|
||
.(OR) | ||
|
||
[source,bash,subs="+macros,+attributes"] | ||
---- | ||
SVC_URL=`oc -n knativetutorial get ksvc {svc-name} -ojsonpath='{.status.domain}'` | ||
---- | ||
#end::set-svc-url[] | ||
|
||
#tag::invoke-svc[] | ||
|
||
[source,bash,subs="+macros,+attributes"] | ||
---- | ||
curl -v -H pass:["Host:${SVC_URL}"] -H 'fileName: {file-name}' $IP_ADDRESS | ||
---- | ||
|
||
.(OR) | ||
|
||
[source,bash,subs="+macros,+attributes"] | ||
---- | ||
http pass:[$IP_ADDRESS "Host:${SVC_URL}"] 'fileName: {file-name}' | ||
---- | ||
#end::invoke-svc[] |
32 changes: 29 additions & 3 deletions
32
documentation/modules/camelk/pages/_partials/wait-for-pods.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,39 @@ | ||
[kube-ns=''] | ||
|
||
#tag::wait-with-kubectl[] | ||
|
||
[NOTE] | ||
==== | ||
It may take few minutes for pods to come up, you can watch the status of the pods as shown below. | ||
You can use kbd:[CTRL + c ] to terminate the watch | ||
==== | ||
|
||
[source,bash,subs="+macros,+attributes"] | ||
---- | ||
kubectl -n {kube-ns} get pods -w | ||
---- | ||
.(OR) | ||
[source,bash,subs="+macros,+attributes"] | ||
---- | ||
oc -n {kube-ns} get pods -w | ||
---- | ||
|
||
#end::wait-with-kubectl[] | ||
|
||
#tag::wait-with-timeout[] | ||
|
||
Wait for the pods to be running: | ||
|
||
[source,bash,subs="+macros,+attributes"] | ||
---- | ||
timeout 300 "kubectl get pods -n knativetutorial 2>&1 | grep -v -E '(Running|Completed|STATUS)'" | ||
timeout 300 "kubectl get pods -n {kube-ns} 2>&1 | grep -v -E '(Running|Completed|STATUS)'" | ||
---- | ||
|
||
.(OR) | ||
|
||
[source,bash,subs="+macros,+attributes"] | ||
---- | ||
timeout 300 "oc get pods -n knativetutorial 2>&1 | grep -v -E '(Running|Completed|STATUS)'" | ||
---- | ||
timeout 300 "oc get pods -n {kube-ns} 2>&1 | grep -v -E '(Running|Completed|STATUS)'" | ||
---- | ||
#end::wait-with-timeout[] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.