You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "ricardozanini (via GitHub)" <gi...@apache.org> on 2024/04/01 20:58:31 UTC
[PR] Introduce an Example to introduce a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
ricardozanini opened a new pull request, #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902
Many thanks for submitting your Pull Request :heart:!
Please make sure that your PR meets the following requirements:
**WARNING! Please make sure you are opening your PR against `main` branch!**
- [ ] You have read the [contributors guide](https://github.com/kiegroup/kogito-runtimes#contributing-to-kogito)
- [ ] Pull Request title is properly formatted: `KOGITO-XYZ Subject`
- [ ] Pull Request title contains the target branch if not targeting main: `[0.9.x] KOGITO-XYZ Subject`
- [ ] Pull Request contains link to the JIRA issue
- [ ] Pull Request contains link to any dependent or related Pull Request
- [ ] Pull Request contains description of the issue
- [ ] Pull Request does not include fixes for issues other than the main ticket
<details>
<summary>
How to replicate CI configuration locally?
</summary>
Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use [build-chain tool](https://github.com/kiegroup/github-action-build-chain) to handle cross repository builds and be sure that we always use latest version of the code for each repository.
[build-chain tool](https://github.com/kiegroup/github-action-build-chain) is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See [local execution](https://github.com/kiegroup/github-action-build-chain#local-execution) details to get more information about it.
</details>
<details>
<summary>
How to retest this PR or trigger a specific build:
</summary>
- for <b>pull request checks</b>
Please add comment: <b>Jenkins retest this</b>
- for a <b>specific pull request check</b>
Please add comment: <b>Jenkins (re)run [kogito-examples] tests</b>
- for <b>quarkus branch checks</b>
Run checks against Quarkus current used branch
Please add comment: <b>Jenkins run quarkus-branch</b>
- for a <b>quarkus branch specific check</b>
Run checks against Quarkus current used branch
Please add comment: <b>Jenkins (re)run [kogito-examples] quarkus-branch</b>
- for <b>quarkus main checks</b>
Run checks against Quarkus main branch
Please add comment: <b>Jenkins run quarkus-main</b>
- for a <b>specific quarkus main check</b>
Run checks against Quarkus main branch
Please add comment: <b>Jenkins (re)run [kogito-examples] quarkus-main</b>
- for <b>quarkus lts checks</b>
Run checks against Quarkus lts branch
Please add comment: <b>Jenkins run quarkus-lts</b>
- for a <b>specific quarkus lts check</b>
Run checks against Quarkus lts branch
Please add comment: <b>Jenkins (re)run [kogito-examples] quarkus-lts</b>
- for <b>native checks</b>
Run native checks
Please add comment: <b>Jenkins run native</b>
- for a <b>specific native check</b>
Run native checks
Please add comment: <b>Jenkins (re)run [kogito-examples] native</b>
- for <b>native lts checks</b>
Run native checks against quarkus lts branch
Please add comment: <b>Jenkins run native-lts</b>
- for a <b>specific native lts check</b>
Run native checks against quarkus lts branch
Please add comment: <b>Jenkins (re)run [kogito-examples] native-lts</b>
</details>
<details>
<summary>
How to backport a pull request to a different branch?
</summary>
In order to automatically create a **backporting pull request** please add one or more labels having the following format `backport-<branch-name>`, where `<branch-name>` is the name of the branch where the pull request must be backported to (e.g., `backport-7.67.x` to backport the original PR to the `7.67.x` branch).
> **NOTE**: **backporting** is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.
Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.
If something goes wrong, the author will be notified and at this point a manual backporting is needed.
> **NOTE**: this automated backporting is triggered whenever a pull request on `main` branch is labeled or closed, but both conditions must be satisfied to get the new PR created.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "tomasdavidorg (via GitHub)" <gi...@apache.org>.
tomasdavidorg commented on code in PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#discussion_r1559383262
##########
serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/greeting.sw.yaml:
##########
@@ -0,0 +1,55 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please check and fix the formatting and indentation of the whole file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "tomasdavidorg (via GitHub)" <gi...@apache.org>.
tomasdavidorg commented on PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#issuecomment-2049554447
> @tomasdavidorg have you successfully run the example?
Yes. I just add some small comments to the docs PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "tomasdavidorg (via GitHub)" <gi...@apache.org>.
tomasdavidorg commented on PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#issuecomment-2037115579
@ricardozanini Sorry 😅. I will review when it is ready. But thanks for sharing the draft, it is good material for a quick look. 🙂
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#issuecomment-2040574510
@tomasdavidorg @wmedvede feel free to try the example locally :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#issuecomment-2048043855
@tomasdavidorg thank you, I've rerun the formatter. I don't use RH's formatting but that should be fine now. One thing to keep an eye on is that these formatters usually remove the `\"` from the jq expressions. That might impact the image build. Let me know if you find any issues.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "tomasdavidorg (via GitHub)" <gi...@apache.org>.
tomasdavidorg commented on code in PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#discussion_r1559478603
##########
serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/02-keycloak.yaml:
##########
@@ -0,0 +1,87 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please check and fix the formatting and indentation of the whole file.
##########
serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/01-postgres.yaml:
##########
@@ -0,0 +1,86 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please check and fix the formatting and indentation of the whole file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "tomasdavidorg (via GitHub)" <gi...@apache.org>.
tomasdavidorg commented on code in PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#discussion_r1559397322
##########
serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/01-sonataflow-greeting.yaml:
##########
@@ -0,0 +1,58 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please fix formatting and indentation of the whole file.
##########
serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/kustomization.yaml:
##########
@@ -0,0 +1,37 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please fix formatting and indentation of the whole file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "tomasdavidorg (via GitHub)" <gi...@apache.org>.
tomasdavidorg commented on code in PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#discussion_r1551311638
##########
serverless-operator-examples/sonataflow-apisix-oidc/README.md:
##########
@@ -0,0 +1,124 @@
+# SonataFlow Authentication and Authorization with Keycloak and APISIX
+
+## Installing Keycloak
+
+Install Keycloak with PostgreSQL:
+
+```shell
+kubectl create ns keycloak
+kubectl kustomize manifests/bases | kubectl apply -f - -n keycloak
+```
+
+### Exposing Keycloak
+
+```shell
+# Let's use kubectl port-forward to equalize the Keycloak endpoint URI so APISIX and your local env access Keycloak using the same URL
+# This method works even in Windows/Darwin where Podman/Docker won't give access to the internal network
+# Hence, we must rely on tunnel/port-forward
+kubectl port-forward $(kubectl get pods -l app=myapp --output=jsonpath='{.items[*].metadata.name}') 8080:8080 -n keycloak
+```
+
+Edit your `/etc/hosts` file to access Keycloak using the same DNS name:
+
+```shell
+sudo vi /etc/hosts
+```
+
+Then add this line to the file:
+
+```127.0.0.1 keycloak.keycloak.svc.cluster.local```.
+
+Now, you can access the Keycloak application via [http://keycloak.keycloak.svc.cluster.local:8080](http://keycloak.keycloak.svc.cluster.local:8080)
+
+This is the same endpoint we will configure the APISIX Route. This is an important step since the token must be generated and validated by the same OIDC server and the host is part of the token validation.
+
+### Authenticating
+
+Using the above URL, you can try requesting a token using [Grant Type Password](https://www.keycloak.org/docs/23.0.7/securing_apps/#_resource_owner_password_credentials_flow).
+
+```shell
+curl \
+ -d "client_id=apisix-ingress" \
+ -d "client_secret=kDb8jS1asUOxYjDJb3bUaimzUen9PRD4" \
+ -d "username=zanini" \
+ -d "password=zanini" \
+ -d "grant_type=password" \
+ "http://keycloak.keycloak.svc.cluster.local:8080/realms/sonataflow/protocol/openid-connect/token
+```
+
+## Installing APISIX
Review Comment:
Shouldn't we also mention how to add the apisix repo?
```
helm repo add apisix https://charts.apiseven.com
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#issuecomment-2049549516
@tomasdavidorg have you successfully run the example?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "tomasdavidorg (via GitHub)" <gi...@apache.org>.
tomasdavidorg commented on code in PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#discussion_r1559393782
##########
serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/02-sonataflow-route.yaml:
##########
@@ -0,0 +1,40 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please check and fix the formatting and indentation of the whole file.
##########
serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/01-sonataflow-greeting.yaml:
##########
@@ -0,0 +1,58 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please check and fix the formatting and indentation of the whole file.
##########
serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/kustomization.yaml:
##########
@@ -0,0 +1,37 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please check and fix the formatting and indentation of the whole file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "tomasdavidorg (via GitHub)" <gi...@apache.org>.
tomasdavidorg commented on code in PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#discussion_r1559478603
##########
serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/02-keycloak.yaml:
##########
@@ -0,0 +1,87 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please fix formatting and indentation of the whole file.
##########
serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/01-postgres.yaml:
##########
@@ -0,0 +1,86 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please fix formatting and indentation of the whole file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini merged PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#issuecomment-2037078253
@tomasdavidorg also please wait for my guide to be online so you can review both at once and save some time!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "tomasdavidorg (via GitHub)" <gi...@apache.org>.
tomasdavidorg commented on code in PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#discussion_r1551274834
##########
serverless-operator-examples/sonataflow-apisix-oidc/README.md:
##########
@@ -0,0 +1,124 @@
+# SonataFlow Authentication and Authorization with Keycloak and APISIX
+
+## Installing Keycloak
+
+Install Keycloak with PostgreSQL:
+
+```shell
+kubectl create ns keycloak
+kubectl kustomize manifests/bases | kubectl apply -f - -n keycloak
+```
+
+### Exposing Keycloak
+
+```shell
+# Let's use kubectl port-forward to equalize the Keycloak endpoint URI so APISIX and your local env access Keycloak using the same URL
+# This method works even in Windows/Darwin where Podman/Docker won't give access to the internal network
+# Hence, we must rely on tunnel/port-forward
+kubectl port-forward $(kubectl get pods -l app=myapp --output=jsonpath='{.items[*].metadata.name}') 8080:8080 -n keycloak
+```
+
+Edit your `/etc/hosts` file to access Keycloak using the same DNS name:
+
+```shell
+sudo vi /etc/hosts
+```
+
+Then add this line to the file:
+
+```127.0.0.1 keycloak.keycloak.svc.cluster.local```.
+
+Now, you can access the Keycloak application via [http://keycloak.keycloak.svc.cluster.local:8080](http://keycloak.keycloak.svc.cluster.local:8080)
+
+This is the same endpoint we will configure the APISIX Route. This is an important step since the token must be generated and validated by the same OIDC server and the host is part of the token validation.
+
+### Authenticating
+
+Using the above URL, you can try requesting a token using [Grant Type Password](https://www.keycloak.org/docs/23.0.7/securing_apps/#_resource_owner_password_credentials_flow).
+
+```shell
Review Comment:
Shouldn't we also mention to create `sonataflow` realm, `apisix-ingress` client and a user and copy the `<CLIENT_SECRET>`, `<USER_NAME>` and `<USER_PASSWORD>` to the command?
##########
serverless-operator-examples/sonataflow-apisix-oidc/README.md:
##########
@@ -0,0 +1,124 @@
+# SonataFlow Authentication and Authorization with Keycloak and APISIX
+
+## Installing Keycloak
+
+Install Keycloak with PostgreSQL:
+
+```shell
+kubectl create ns keycloak
+kubectl kustomize manifests/bases | kubectl apply -f - -n keycloak
+```
+
+### Exposing Keycloak
+
+```shell
+# Let's use kubectl port-forward to equalize the Keycloak endpoint URI so APISIX and your local env access Keycloak using the same URL
+# This method works even in Windows/Darwin where Podman/Docker won't give access to the internal network
+# Hence, we must rely on tunnel/port-forward
+kubectl port-forward $(kubectl get pods -l app=myapp --output=jsonpath='{.items[*].metadata.name}') 8080:8080 -n keycloak
Review Comment:
There should be specified namespace and the app should be keycloak otherwise the command does not work for me:
```suggestion
kubectl port-forward $(kubectl get pods -n keycloak -l app=keycloak --output=jsonpath='{.items[*].metadata.name}') 8080:8080 -n keycloak
```
##########
serverless-operator-examples/sonataflow-apisix-oidc/README.md:
##########
@@ -0,0 +1,124 @@
+# SonataFlow Authentication and Authorization with Keycloak and APISIX
+
+## Installing Keycloak
+
+Install Keycloak with PostgreSQL:
+
+```shell
+kubectl create ns keycloak
+kubectl kustomize manifests/bases | kubectl apply -f - -n keycloak
+```
+
+### Exposing Keycloak
+
+```shell
+# Let's use kubectl port-forward to equalize the Keycloak endpoint URI so APISIX and your local env access Keycloak using the same URL
+# This method works even in Windows/Darwin where Podman/Docker won't give access to the internal network
+# Hence, we must rely on tunnel/port-forward
+kubectl port-forward $(kubectl get pods -l app=myapp --output=jsonpath='{.items[*].metadata.name}') 8080:8080 -n keycloak
+```
+
+Edit your `/etc/hosts` file to access Keycloak using the same DNS name:
+
+```shell
+sudo vi /etc/hosts
+```
+
+Then add this line to the file:
+
+```127.0.0.1 keycloak.keycloak.svc.cluster.local```.
+
+Now, you can access the Keycloak application via [http://keycloak.keycloak.svc.cluster.local:8080](http://keycloak.keycloak.svc.cluster.local:8080)
+
+This is the same endpoint we will configure the APISIX Route. This is an important step since the token must be generated and validated by the same OIDC server and the host is part of the token validation.
+
+### Authenticating
+
+Using the above URL, you can try requesting a token using [Grant Type Password](https://www.keycloak.org/docs/23.0.7/securing_apps/#_resource_owner_password_credentials_flow).
+
+```shell
+curl \
+ -d "client_id=apisix-ingress" \
+ -d "client_secret=kDb8jS1asUOxYjDJb3bUaimzUen9PRD4" \
+ -d "username=zanini" \
+ -d "password=zanini" \
+ -d "grant_type=password" \
+ "http://keycloak.keycloak.svc.cluster.local:8080/realms/sonataflow/protocol/openid-connect/token
+```
+
+## Installing APISIX
+
+```shell
+ADMIN_API_VERSION=v3
+
+helm install apisix apisix/apisix \
+ --set service.type=NodePort \
+ --set ingress-controller.enabled=true \
+ --create-namespace \
+ --namespace ingress-apisix \
+ --set ingress-controller.config.apisix.serviceNamespace=ingress-apisix \
+ --set ingress-controller.config.apisix.adminAPIVersion=$ADMIN_API_VERSION
+
+kubectl get service --namespace ingress-apisix
+```
+
+### Exposing APISIX Ingress on Minikube
+
+```shell
+minikube service apisix-gateway --url -n ingress-apisix
+```
+
+## Installing SonataFlow Operator
+
+Enable minikube registry:
+
+```shell
+minikube addons enable registry
+```
+
+Install the operator:
+
+```shell
+kubectl create -f https://raw.githubusercontent.com/apache/incubator-kie-kogito-serverless-operator/main/operator.yaml
+```
+
+### Deploy greeting workflow
+
+```shell
+kubectl create ns sonataflow
+kubectl apply -f manifests/workflow-app/sonataflow-greeting.yaml -n sonataflow
Review Comment:
```suggestion
kubectl apply -f manifests/workflow-app/01-sonataflow-greeting.yaml -n sonataflow
```
##########
serverless-operator-examples/sonataflow-apisix-oidc/README.md:
##########
@@ -0,0 +1,124 @@
+# SonataFlow Authentication and Authorization with Keycloak and APISIX
+
+## Installing Keycloak
+
+Install Keycloak with PostgreSQL:
+
+```shell
+kubectl create ns keycloak
+kubectl kustomize manifests/bases | kubectl apply -f - -n keycloak
+```
+
+### Exposing Keycloak
+
+```shell
+# Let's use kubectl port-forward to equalize the Keycloak endpoint URI so APISIX and your local env access Keycloak using the same URL
+# This method works even in Windows/Darwin where Podman/Docker won't give access to the internal network
+# Hence, we must rely on tunnel/port-forward
+kubectl port-forward $(kubectl get pods -l app=myapp --output=jsonpath='{.items[*].metadata.name}') 8080:8080 -n keycloak
+```
+
+Edit your `/etc/hosts` file to access Keycloak using the same DNS name:
+
+```shell
+sudo vi /etc/hosts
+```
+
+Then add this line to the file:
+
+```127.0.0.1 keycloak.keycloak.svc.cluster.local```.
+
+Now, you can access the Keycloak application via [http://keycloak.keycloak.svc.cluster.local:8080](http://keycloak.keycloak.svc.cluster.local:8080)
+
+This is the same endpoint we will configure the APISIX Route. This is an important step since the token must be generated and validated by the same OIDC server and the host is part of the token validation.
+
+### Authenticating
+
+Using the above URL, you can try requesting a token using [Grant Type Password](https://www.keycloak.org/docs/23.0.7/securing_apps/#_resource_owner_password_credentials_flow).
+
+```shell
+curl \
+ -d "client_id=apisix-ingress" \
+ -d "client_secret=kDb8jS1asUOxYjDJb3bUaimzUen9PRD4" \
+ -d "username=zanini" \
+ -d "password=zanini" \
+ -d "grant_type=password" \
+ "http://keycloak.keycloak.svc.cluster.local:8080/realms/sonataflow/protocol/openid-connect/token
+```
+
+## Installing APISIX
+
+```shell
+ADMIN_API_VERSION=v3
+
+helm install apisix apisix/apisix \
+ --set service.type=NodePort \
+ --set ingress-controller.enabled=true \
+ --create-namespace \
+ --namespace ingress-apisix \
+ --set ingress-controller.config.apisix.serviceNamespace=ingress-apisix \
+ --set ingress-controller.config.apisix.adminAPIVersion=$ADMIN_API_VERSION
+
+kubectl get service --namespace ingress-apisix
+```
+
+### Exposing APISIX Ingress on Minikube
+
+```shell
+minikube service apisix-gateway --url -n ingress-apisix
+```
+
+## Installing SonataFlow Operator
+
+Enable minikube registry:
+
+```shell
+minikube addons enable registry
+```
+
+Install the operator:
+
+```shell
+kubectl create -f https://raw.githubusercontent.com/apache/incubator-kie-kogito-serverless-operator/main/operator.yaml
+```
+
+### Deploy greeting workflow
+
+```shell
+kubectl create ns sonataflow
+kubectl apply -f manifests/workflow-app/sonataflow-greeting.yaml -n sonataflow
+```
+
+### Add the APISIX Route to protect the workflow application
+
+```shell
+kubectl apply -f manifests/workflow-app/sonataflow-route.yaml -n sonataflow
+```
+
+## Validating if the setup works
+
+First, try acquiring the token:
+
+```shell
+ACCESS_TOKEN=$(curl \
+ -d "client_id=apisix-ingress" \
+ -d "client_secret=<CLIENT_SECRET>" \
+ -d "username=<USER_NAME>" \
+ -d "password=<USER_PASSWORD>" \
+ -d "grant_type=password" \
+ "http://keycloak.keycloak.svc.cluster.local:8080/realms/sonataflow/protocol/openid-connect/token" | jq -r .access_token)
+```
+
+Then make a call to the SonataFlow Greeting workflow:
+
+```shell
+curl -v POST http://127.0.0.1:63031/greeting -H "Content-type: application/json" -H "Host: local.greeting.sonataflow.org" -H "Authorization: Bearer ${ACCESS_TOKEN}" --data '{ "name": "Zanini" }'
Review Comment:
```suggestion
curl -v POST <APISIX_GATEWAY_URL>/greeting -H "Content-type: application/json" -H "Host: local.greeting.sonataflow.org" -H "Authorization: Bearer ${ACCESS_TOKEN}" --data '{ "name": "Zanini" }'
```
##########
serverless-operator-examples/sonataflow-apisix-oidc/README.md:
##########
@@ -0,0 +1,124 @@
+# SonataFlow Authentication and Authorization with Keycloak and APISIX
+
+## Installing Keycloak
+
+Install Keycloak with PostgreSQL:
+
+```shell
+kubectl create ns keycloak
+kubectl kustomize manifests/bases | kubectl apply -f - -n keycloak
+```
+
+### Exposing Keycloak
+
+```shell
+# Let's use kubectl port-forward to equalize the Keycloak endpoint URI so APISIX and your local env access Keycloak using the same URL
+# This method works even in Windows/Darwin where Podman/Docker won't give access to the internal network
+# Hence, we must rely on tunnel/port-forward
+kubectl port-forward $(kubectl get pods -l app=myapp --output=jsonpath='{.items[*].metadata.name}') 8080:8080 -n keycloak
+```
+
+Edit your `/etc/hosts` file to access Keycloak using the same DNS name:
+
+```shell
+sudo vi /etc/hosts
+```
+
+Then add this line to the file:
+
+```127.0.0.1 keycloak.keycloak.svc.cluster.local```.
+
+Now, you can access the Keycloak application via [http://keycloak.keycloak.svc.cluster.local:8080](http://keycloak.keycloak.svc.cluster.local:8080)
+
+This is the same endpoint we will configure the APISIX Route. This is an important step since the token must be generated and validated by the same OIDC server and the host is part of the token validation.
+
+### Authenticating
+
+Using the above URL, you can try requesting a token using [Grant Type Password](https://www.keycloak.org/docs/23.0.7/securing_apps/#_resource_owner_password_credentials_flow).
+
+```shell
+curl \
+ -d "client_id=apisix-ingress" \
+ -d "client_secret=kDb8jS1asUOxYjDJb3bUaimzUen9PRD4" \
+ -d "username=zanini" \
+ -d "password=zanini" \
+ -d "grant_type=password" \
+ "http://keycloak.keycloak.svc.cluster.local:8080/realms/sonataflow/protocol/openid-connect/token
+```
+
+## Installing APISIX
Review Comment:
Shouldn't we mention how to add the apisix repo?
```
helm repo add apisix https://charts.apiseven.com
```
##########
serverless-operator-examples/sonataflow-apisix-oidc/manifests/workflow-app/kustomization.yaml:
##########
@@ -0,0 +1,13 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Is this file used in any way?
##########
serverless-operator-examples/sonataflow-apisix-oidc/README.md:
##########
@@ -0,0 +1,124 @@
+# SonataFlow Authentication and Authorization with Keycloak and APISIX
+
+## Installing Keycloak
+
+Install Keycloak with PostgreSQL:
+
+```shell
+kubectl create ns keycloak
+kubectl kustomize manifests/bases | kubectl apply -f - -n keycloak
+```
+
+### Exposing Keycloak
+
+```shell
+# Let's use kubectl port-forward to equalize the Keycloak endpoint URI so APISIX and your local env access Keycloak using the same URL
+# This method works even in Windows/Darwin where Podman/Docker won't give access to the internal network
+# Hence, we must rely on tunnel/port-forward
+kubectl port-forward $(kubectl get pods -l app=myapp --output=jsonpath='{.items[*].metadata.name}') 8080:8080 -n keycloak
+```
+
+Edit your `/etc/hosts` file to access Keycloak using the same DNS name:
+
+```shell
+sudo vi /etc/hosts
+```
+
+Then add this line to the file:
+
+```127.0.0.1 keycloak.keycloak.svc.cluster.local```.
Review Comment:
I would remove the dot and resize the code to the whole line otherwise it could happen that user can also copy it to the `/etc/hosts`
````suggestion
```
127.0.0.1 keycloak.keycloak.svc.cluster.local
```
````
##########
serverless-operator-examples/sonataflow-apisix-oidc/README.md:
##########
@@ -0,0 +1,124 @@
+# SonataFlow Authentication and Authorization with Keycloak and APISIX
+
+## Installing Keycloak
+
+Install Keycloak with PostgreSQL:
+
+```shell
+kubectl create ns keycloak
+kubectl kustomize manifests/bases | kubectl apply -f - -n keycloak
+```
+
+### Exposing Keycloak
+
+```shell
+# Let's use kubectl port-forward to equalize the Keycloak endpoint URI so APISIX and your local env access Keycloak using the same URL
+# This method works even in Windows/Darwin where Podman/Docker won't give access to the internal network
+# Hence, we must rely on tunnel/port-forward
+kubectl port-forward $(kubectl get pods -l app=myapp --output=jsonpath='{.items[*].metadata.name}') 8080:8080 -n keycloak
+```
+
+Edit your `/etc/hosts` file to access Keycloak using the same DNS name:
+
+```shell
+sudo vi /etc/hosts
+```
+
+Then add this line to the file:
+
+```127.0.0.1 keycloak.keycloak.svc.cluster.local```.
+
+Now, you can access the Keycloak application via [http://keycloak.keycloak.svc.cluster.local:8080](http://keycloak.keycloak.svc.cluster.local:8080)
+
+This is the same endpoint we will configure the APISIX Route. This is an important step since the token must be generated and validated by the same OIDC server and the host is part of the token validation.
+
+### Authenticating
+
+Using the above URL, you can try requesting a token using [Grant Type Password](https://www.keycloak.org/docs/23.0.7/securing_apps/#_resource_owner_password_credentials_flow).
+
+```shell
+curl \
+ -d "client_id=apisix-ingress" \
+ -d "client_secret=kDb8jS1asUOxYjDJb3bUaimzUen9PRD4" \
+ -d "username=zanini" \
+ -d "password=zanini" \
+ -d "grant_type=password" \
+ "http://keycloak.keycloak.svc.cluster.local:8080/realms/sonataflow/protocol/openid-connect/token
+```
+
+## Installing APISIX
+
+```shell
+ADMIN_API_VERSION=v3
+
+helm install apisix apisix/apisix \
Review Comment:
```suggestion
helm install apisix apisix/apisix \
```
##########
serverless-operator-examples/sonataflow-apisix-oidc/manifests/workflow-app/greeting.sw.yaml:
##########
@@ -0,0 +1,55 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Is this file used in any way? Is it here for presenting the Serverless workflow for a user to open it in a visual editor?
##########
serverless-operator-examples/sonataflow-apisix-oidc/README.md:
##########
@@ -0,0 +1,124 @@
+# SonataFlow Authentication and Authorization with Keycloak and APISIX
+
+## Installing Keycloak
+
+Install Keycloak with PostgreSQL:
+
+```shell
+kubectl create ns keycloak
+kubectl kustomize manifests/bases | kubectl apply -f - -n keycloak
+```
+
+### Exposing Keycloak
+
+```shell
+# Let's use kubectl port-forward to equalize the Keycloak endpoint URI so APISIX and your local env access Keycloak using the same URL
+# This method works even in Windows/Darwin where Podman/Docker won't give access to the internal network
+# Hence, we must rely on tunnel/port-forward
+kubectl port-forward $(kubectl get pods -l app=myapp --output=jsonpath='{.items[*].metadata.name}') 8080:8080 -n keycloak
+```
+
+Edit your `/etc/hosts` file to access Keycloak using the same DNS name:
+
+```shell
+sudo vi /etc/hosts
+```
+
+Then add this line to the file:
+
+```127.0.0.1 keycloak.keycloak.svc.cluster.local```.
+
+Now, you can access the Keycloak application via [http://keycloak.keycloak.svc.cluster.local:8080](http://keycloak.keycloak.svc.cluster.local:8080)
+
+This is the same endpoint we will configure the APISIX Route. This is an important step since the token must be generated and validated by the same OIDC server and the host is part of the token validation.
+
+### Authenticating
+
+Using the above URL, you can try requesting a token using [Grant Type Password](https://www.keycloak.org/docs/23.0.7/securing_apps/#_resource_owner_password_credentials_flow).
+
+```shell
+curl \
+ -d "client_id=apisix-ingress" \
+ -d "client_secret=kDb8jS1asUOxYjDJb3bUaimzUen9PRD4" \
+ -d "username=zanini" \
+ -d "password=zanini" \
Review Comment:
```suggestion
-d "client_secret=<CLIENT_SECRET>" \
-d "username=<USER_NAME>" \
-d "password=<USER_PASSWORD>" \
```
##########
serverless-operator-examples/sonataflow-apisix-oidc/README.md:
##########
@@ -0,0 +1,124 @@
+# SonataFlow Authentication and Authorization with Keycloak and APISIX
+
+## Installing Keycloak
+
+Install Keycloak with PostgreSQL:
+
+```shell
+kubectl create ns keycloak
+kubectl kustomize manifests/bases | kubectl apply -f - -n keycloak
+```
+
+### Exposing Keycloak
+
+```shell
+# Let's use kubectl port-forward to equalize the Keycloak endpoint URI so APISIX and your local env access Keycloak using the same URL
+# This method works even in Windows/Darwin where Podman/Docker won't give access to the internal network
+# Hence, we must rely on tunnel/port-forward
+kubectl port-forward $(kubectl get pods -l app=myapp --output=jsonpath='{.items[*].metadata.name}') 8080:8080 -n keycloak
+```
+
+Edit your `/etc/hosts` file to access Keycloak using the same DNS name:
+
+```shell
+sudo vi /etc/hosts
+```
+
+Then add this line to the file:
+
+```127.0.0.1 keycloak.keycloak.svc.cluster.local```.
+
+Now, you can access the Keycloak application via [http://keycloak.keycloak.svc.cluster.local:8080](http://keycloak.keycloak.svc.cluster.local:8080)
+
+This is the same endpoint we will configure the APISIX Route. This is an important step since the token must be generated and validated by the same OIDC server and the host is part of the token validation.
+
+### Authenticating
+
+Using the above URL, you can try requesting a token using [Grant Type Password](https://www.keycloak.org/docs/23.0.7/securing_apps/#_resource_owner_password_credentials_flow).
+
+```shell
+curl \
+ -d "client_id=apisix-ingress" \
+ -d "client_secret=kDb8jS1asUOxYjDJb3bUaimzUen9PRD4" \
+ -d "username=zanini" \
+ -d "password=zanini" \
+ -d "grant_type=password" \
+ "http://keycloak.keycloak.svc.cluster.local:8080/realms/sonataflow/protocol/openid-connect/token
+```
+
+## Installing APISIX
+
+```shell
+ADMIN_API_VERSION=v3
+
+helm install apisix apisix/apisix \
+ --set service.type=NodePort \
+ --set ingress-controller.enabled=true \
+ --create-namespace \
+ --namespace ingress-apisix \
+ --set ingress-controller.config.apisix.serviceNamespace=ingress-apisix \
+ --set ingress-controller.config.apisix.adminAPIVersion=$ADMIN_API_VERSION
+
+kubectl get service --namespace ingress-apisix
+```
+
+### Exposing APISIX Ingress on Minikube
+
+```shell
+minikube service apisix-gateway --url -n ingress-apisix
+```
+
+## Installing SonataFlow Operator
+
+Enable minikube registry:
+
+```shell
+minikube addons enable registry
+```
+
+Install the operator:
+
+```shell
+kubectl create -f https://raw.githubusercontent.com/apache/incubator-kie-kogito-serverless-operator/main/operator.yaml
+```
+
+### Deploy greeting workflow
+
+```shell
+kubectl create ns sonataflow
+kubectl apply -f manifests/workflow-app/sonataflow-greeting.yaml -n sonataflow
+```
+
+### Add the APISIX Route to protect the workflow application
+
+```shell
+kubectl apply -f manifests/workflow-app/sonataflow-route.yaml -n sonataflow
Review Comment:
Missing prefix + should't we mentioned that in the route file `<the_secret>` should be replaced by `<CLIENT_SECRET>`?
```suggestion
kubectl apply -f manifests/workflow-app/02-sonataflow-route.yaml -n sonataflow
```
##########
serverless-operator-examples/sonataflow-apisix-oidc/README.md:
##########
@@ -0,0 +1,124 @@
+# SonataFlow Authentication and Authorization with Keycloak and APISIX
+
+## Installing Keycloak
+
+Install Keycloak with PostgreSQL:
+
+```shell
+kubectl create ns keycloak
+kubectl kustomize manifests/bases | kubectl apply -f - -n keycloak
+```
+
+### Exposing Keycloak
+
+```shell
+# Let's use kubectl port-forward to equalize the Keycloak endpoint URI so APISIX and your local env access Keycloak using the same URL
+# This method works even in Windows/Darwin where Podman/Docker won't give access to the internal network
+# Hence, we must rely on tunnel/port-forward
+kubectl port-forward $(kubectl get pods -l app=myapp --output=jsonpath='{.items[*].metadata.name}') 8080:8080 -n keycloak
+```
+
+Edit your `/etc/hosts` file to access Keycloak using the same DNS name:
+
+```shell
+sudo vi /etc/hosts
+```
+
+Then add this line to the file:
+
+```127.0.0.1 keycloak.keycloak.svc.cluster.local```.
+
+Now, you can access the Keycloak application via [http://keycloak.keycloak.svc.cluster.local:8080](http://keycloak.keycloak.svc.cluster.local:8080)
+
+This is the same endpoint we will configure the APISIX Route. This is an important step since the token must be generated and validated by the same OIDC server and the host is part of the token validation.
+
+### Authenticating
+
+Using the above URL, you can try requesting a token using [Grant Type Password](https://www.keycloak.org/docs/23.0.7/securing_apps/#_resource_owner_password_credentials_flow).
+
+```shell
+curl \
+ -d "client_id=apisix-ingress" \
+ -d "client_secret=kDb8jS1asUOxYjDJb3bUaimzUen9PRD4" \
+ -d "username=zanini" \
+ -d "password=zanini" \
+ -d "grant_type=password" \
+ "http://keycloak.keycloak.svc.cluster.local:8080/realms/sonataflow/protocol/openid-connect/token
Review Comment:
```suggestion
"http://keycloak.keycloak.svc.cluster.local:8080/realms/sonataflow/protocol/openid-connect/token"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#issuecomment-2037075519
@tomasdavidorg this is still a draft. many of your comments have been addressed locally. Once I change to "ready for review" I give you guys a heads up. Thank you for preemptively reviewing it though. cc @domhanak
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] KIE-ISSUE #1056 - Introduce an Example to have a custom APISIX Ingress to SonataFlow deployments sec use cases [incubator-kie-kogito-examples]
Posted by "tomasdavidorg (via GitHub)" <gi...@apache.org>.
tomasdavidorg commented on code in PR #1902:
URL: https://github.com/apache/incubator-kie-kogito-examples/pull/1902#discussion_r1559362605
##########
serverless-operator-examples/sonataflow-apisix-oidc/README.md:
##########
@@ -0,0 +1,3 @@
+# SonataFlow Authentication and Authorization with Keycloak and APISIX
+
+This is an example directory to support the guide outlined here: [https://sonataflow.org/serverlessworkflow/latest/cloud/custom-ingress-authz.html](https://sonataflow.org/serverlessworkflow/latest/cloud/index.html). Please read it in order to understand how to use this example fully.
Review Comment:
Is it intentional to point to `index.html` or there should be `custom-ingress-authz.html`?
##########
serverless-operator-examples/sonataflow-apisix-oidc/README.md:
##########
@@ -0,0 +1,3 @@
+# SonataFlow Authentication and Authorization with Keycloak and APISIX
+
+This is an example directory to support the guide outlined here: [https://sonataflow.org/serverlessworkflow/latest/cloud/custom-ingress-authz.html](https://sonataflow.org/serverlessworkflow/latest/cloud/index.html). Please read it in order to understand how to use this example fully.
Review Comment:
```suggestion
This is an example directory to support the guide outlined here: [https://sonataflow.org/serverlessworkflow/latest/cloud/custom-ingress-authz.html](https://sonataflow.org/serverlessworkflow/latest/cloud/index.html). Please read it in order to fully understand how to use this example.
```
##########
serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/greeting.sw.yaml:
##########
@@ -0,0 +1,55 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please fix formatting and indentation.
##########
serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/greeting.sw.yaml:
##########
@@ -0,0 +1,55 @@
+# Copyright 2024 Apache Software Foundation (ASF)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+id: 'workflow_unique_identifier'
+version: '0.1'
+specVersion: '0.8'
+name: 'Workflow name'
+description: 'Workflow description'
+functions:
+ - name: greetFunction
+ type: custom
+ operation: sysout
+start: ChooseOnLanguage
+states:
+ - name: ChooseOnLanguage
+ type: switch
+ dataConditions:
+ - condition: "${ .language == \"English\" }"
+ transition: GreetInEnglish
+ - condition: "${ .language == \"Spanish\" }"
+ transition: GreetInSpanish
+ defaultCondition:
+ transition: GreetInEnglish
+ - name: GreetInEnglish
+ type: inject
+ data:
+ greeting: "Hello from JSON Workflow, "
+ transition: GreetPerson
+ - name: GreetInSpanish
+ type: inject
+ data:
+ greeting: "Saludos desde JSON Workflow, "
Review Comment:
```suggestion
greeting: "Saludos desde YAML Workflow, "
```
##########
serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/02-keycloak.yaml:
##########
@@ -0,0 +1,87 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please fix formatting and indentation.
##########
serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/kustomization.yaml:
##########
@@ -0,0 +1,37 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please fix formatting and indentation.
##########
serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/greeting.sw.yaml:
##########
@@ -0,0 +1,55 @@
+# Copyright 2024 Apache Software Foundation (ASF)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+id: 'workflow_unique_identifier'
+version: '0.1'
+specVersion: '0.8'
+name: 'Workflow name'
+description: 'Workflow description'
+functions:
+ - name: greetFunction
+ type: custom
+ operation: sysout
+start: ChooseOnLanguage
+states:
+ - name: ChooseOnLanguage
+ type: switch
+ dataConditions:
+ - condition: "${ .language == \"English\" }"
+ transition: GreetInEnglish
+ - condition: "${ .language == \"Spanish\" }"
+ transition: GreetInSpanish
+ defaultCondition:
+ transition: GreetInEnglish
+ - name: GreetInEnglish
+ type: inject
+ data:
+ greeting: "Hello from JSON Workflow, "
Review Comment:
```suggestion
greeting: "Hello from YAML Workflow, "
```
##########
serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/01-sonataflow-greeting.yaml:
##########
@@ -0,0 +1,58 @@
+# Copyright 2024 Apache Software Foundation (ASF)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+ name: greeting
+ annotations:
+ sonataflow.org/description: Greeting example on k8s!
+ sonataflow.org/version: 0.0.1
+spec:
+ flow:
+ start: ChooseOnLanguage
+ functions:
+ - name: greetFunction
+ type: custom
+ operation: sysout
+ states:
+ - name: ChooseOnLanguage
+ type: switch
+ dataConditions:
+ - condition: "${ .language == \"English\" }"
+ transition: GreetInEnglish
+ - condition: "${ .language == \"Spanish\" }"
+ transition: GreetInSpanish
+ defaultCondition: GreetInEnglish
+ - name: GreetInEnglish
+ type: inject
+ data:
+ greeting: "Hello from JSON Workflow, "
+ transition: GreetPerson
+ - name: GreetInSpanish
+ type: inject
+ data:
+ greeting: "Saludos desde JSON Workflow, "
Review Comment:
```suggestion
greeting: "Saludos desde YAML Workflow, "
```
##########
serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/01-sonataflow-greeting.yaml:
##########
@@ -0,0 +1,58 @@
+# Copyright 2024 Apache Software Foundation (ASF)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+ name: greeting
+ annotations:
+ sonataflow.org/description: Greeting example on k8s!
+ sonataflow.org/version: 0.0.1
+spec:
+ flow:
+ start: ChooseOnLanguage
+ functions:
+ - name: greetFunction
+ type: custom
+ operation: sysout
+ states:
+ - name: ChooseOnLanguage
+ type: switch
+ dataConditions:
+ - condition: "${ .language == \"English\" }"
+ transition: GreetInEnglish
+ - condition: "${ .language == \"Spanish\" }"
+ transition: GreetInSpanish
+ defaultCondition: GreetInEnglish
+ - name: GreetInEnglish
+ type: inject
+ data:
+ greeting: "Hello from JSON Workflow, "
Review Comment:
```suggestion
greeting: "Hello from YAML Workflow, "
```
##########
serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/02-sonataflow-route.yaml:
##########
@@ -0,0 +1,40 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please fix formatting and indentation.
##########
serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/01-postgres.yaml:
##########
@@ -0,0 +1,86 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please fix formatting and indentation.
##########
serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/01-sonataflow-greeting.yaml:
##########
@@ -0,0 +1,58 @@
+# Copyright 2024 Apache Software Foundation (ASF)
Review Comment:
Please fix formatting and indentation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org