wmedvede commented on code in PR #624:
URL: 
https://github.com/apache/incubator-kie-kogito-docs/pull/624#discussion_r1595041010


##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/customize-podspec.adoc:
##########
@@ -49,6 +52,51 @@ The `.spec.podTemplate` attribute has the majority of fields 
defined in the defa
 
 The `.spec.podTemplate.container` is a special attribute that you won't find 
in the default Kubernetes API. The reason is to avoid misconfiguration when 
users require to change the specific container where the workflow application 
is deployed.
 
+== Deployment Model
+
+By default, the {operator_name} deploys a `SonataFlow` instance in a regular 
Kubernetes Deployment object. Although it's possible to change this behavior 
and deploy the workflow instance as a 
link:{knative_serving_service_url}[Knative Serving Service] instead.
+
+To change the deployment to Knative, set the 
`.spec.podTemplate.deploymentModel` attribute to `knative`. For example:
+
+.Setting PodSpec Resources Limits example
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+  name: simple
+  annotations:
+    sonataflow.org/description: Simple example on k8s!
+    sonataflow.org/version: 0.0.1
+    sonataflow.org/version: preview  
+spec:
+  podTemplate: 
+    deploymentModel: knative <1>
+  flow:
+    start: HelloWorld
+    states:
+      - name: HelloWorld
+        type: inject
+        data:
+          message: Hello World
+        end: true
+----
+
+<1> The `deploymentModel` attribute
+
+After changing the deployment model to `knative`, the `SonataFlow` instance 
will be deployed as a Knative Serving Service.
+
+[IMPORTANT]
+====
+It's not possible to deploy a `SonataFlow` instance as a Knative Service in 
dev profile. In this profile, this attribute is ignored by the operator.
+====
+
+Note that not every use case leverage a Knative deployment. Long-running 
workflow instances, for example, that calls services that might take too long 
to respond, might not be an ideal deployment model. Opt to use Knative 
deployments for workflows that won't take too long to run. 
+
+The exception are workflows that have callback states. In this case, you must 
configure xref:cloud/operator/using-persistence.adoc[persistence]. This is 
required because once the workflow waits for the event to resume the execution, 
Knative will kill the pod. Since the workflow has persistence, it will resume 
the execution once it receives the callback event.
+
+Knative **does not support** 
link:{kubernetes_init_containers}[`initContainers`] by default. If your 
workflow requires it, you must first enable the extension in the Knative 
installation. See more information on the 
link:{knative_serving_initcontainer}[Knative documentation].

Review Comment:
   nice, didn't know that



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to