-
Notifications
You must be signed in to change notification settings - Fork 28
SRVKE-1419: Document Eventing mTLS with Service Mesh #95
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
Merged
pierDipi
merged 6 commits into
openshift-knative:master
from
pierDipi:SRVKE-1419_sm-docs-dev-preview
Jun 14, 2023
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fa1308b
SRVKE-1419: Document Eventing mTLS with Service Mesh
pierDipi 68d6a95
List all namespaces in important
pierDipi db44277
Use quay.io/openshift-knative/heartbeats
pierDipi d08321d
It's not a CRD
pierDipi c3f6aee
It's not a CRD
pierDipi fe86bad
It's not a CRD
pierDipi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
123 changes: 123 additions & 0 deletions
123
...rverless-eventing/pages/service-mesh/eventing-service-mesh-containersource.adoc
This file contains hidden or 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,123 @@ | ||
| = Using ContainerSource with {SMProductName} | ||
| :compat-mode!: | ||
| // Metadata: | ||
| :description: Using ContainerSource with {SMProductName} | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * You have followed the setup {SMProductShortName} with {ServerlessProductName} procedure | ||
|
|
||
| .Procedure | ||
|
|
||
| . Create a `Service` in a namespace that is member of the `ServiceMeshMemberRoll`: | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: serving.knative.dev/v1 | ||
| kind: Service | ||
| metadata: | ||
| name: event-display | ||
| namespace: <namespace> <1> | ||
| spec: | ||
| template: | ||
| metadata: | ||
| annotations: | ||
| sidecar.istio.io/inject: "true" <2> | ||
| sidecar.istio.io/rewriteAppHTTPProbers: "true" | ||
| spec: | ||
| containers: | ||
| - image: quay.io/openshift-knative/knative-eventing-sources-event-display:latest | ||
pierDipi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ---- | ||
| <1> A namespace that is member of the `ServiceMeshMemberRoll`. | ||
| <2> Injects {SMProductShortName} sidecars into the Knative service pods. | ||
|
|
||
| . Apply the `Service` resource: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc apply -f <filename> | ||
| ---- | ||
|
|
||
| . Create a `ContainerSource` in a namespace that is member of the `ServiceMeshMemberRoll` and sink set to the `event-display`: | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: sources.knative.dev/v1 | ||
| kind: ContainerSource | ||
| metadata: | ||
| name: test-heartbeats | ||
| namespace: <namespace> <1> | ||
| spec: | ||
| template: | ||
| metadata: <2> | ||
| annotations: | ||
| sidecar.istio.io/inject": "true" | ||
| sidecar.istio.io/rewriteAppHTTPProbers: "true" | ||
| spec: | ||
| containers: | ||
| # This corresponds to a heartbeats image URI that you have built and published | ||
| - image: quay.io/openshift-knative/heartbeats | ||
| name: heartbeats | ||
| args: | ||
| - --period=1s | ||
| env: | ||
| - name: POD_NAME | ||
| value: "example-pod" | ||
| - name: POD_NAMESPACE | ||
| value: "event-test" | ||
| sink: | ||
| ref: | ||
| apiVersion: serving.knative.dev/v1 | ||
| kind: Service | ||
| name: event-display-service | ||
| ---- | ||
| <1> A namespace that is part of the `ServiceMeshMemberRoll`. | ||
| <2> Enables {SMProductShortName} integration with a `ContainerSource` | ||
|
|
||
| . Apply the `ContainerSource` resource: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc apply -f <filename> | ||
| ---- | ||
|
|
||
| .Verification | ||
|
|
||
| You can verify that the events were sent to the Knative event sink by looking at the message dumper function logs. | ||
|
|
||
| . Enter the command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc get pods | ||
| ---- | ||
|
|
||
| . Enter the command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc logs $(oc get pod -o name | grep event-display) -c user-container | ||
| ---- | ||
| + | ||
| .Example output | ||
| [source,terminal] | ||
| ---- | ||
| ☁️ cloudevents.Event | ||
| Validation: valid | ||
| Context Attributes, | ||
| specversion: 1.0 | ||
| type: dev.knative.eventing.samples.heartbeat | ||
| source: https://knative.dev/eventing-contrib/cmd/heartbeats/#event-test/mypod | ||
| id: 2b72d7bf-c38f-4a98-a433-608fbcdd2596 | ||
| time: 2019-10-18T15:23:20.809775386Z | ||
| contenttype: application/json | ||
| Extensions, | ||
| beats: true | ||
| heart: yes | ||
| the: 42 | ||
| Data, | ||
| { | ||
| "id": 1, | ||
| "label": "" | ||
| } | ||
| ---- | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you wanna add some
<3>explanation here too?