ricardozanini commented on code in PR #530:
URL:
https://github.com/apache/incubator-kie-kogito-docs/pull/530#discussion_r1497601628
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/enabling-jobs-service.adoc:
##########
@@ -0,0 +1,170 @@
+= Managing Jobs Service with the Operator
+:compat-mode!:
+// Metadata:
+:description: Configure Jobs Service using the `SonataFlowPlatform` CR.
+:keywords: sonataflow, serverless, operator, kubernetes, jobs service
+
+
+This document describes how to configure the Jobs Service instance usimg the
SonataFlowPlarform CR.
Review Comment:
```suggestion
This document describes how to configure the Jobs Service instance using the
SonataFlowPlarform CR.
```
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/enabling-jobs-service.adoc:
##########
@@ -0,0 +1,170 @@
+= Managing Jobs Service with the Operator
+:compat-mode!:
+// Metadata:
+:description: Configure Jobs Service using the `SonataFlowPlatform` CR.
+:keywords: sonataflow, serverless, operator, kubernetes, jobs service
+
+
+This document describes how to configure the Jobs Service instance usimg the
SonataFlowPlarform CR.
+
+== Automate the Jobs Service instance management with the `SonataFlow` Operator
+
+While it is possible to deploy the Jobs Service manually, the Operator also
provides a convenient way to combine it with the
+namespace configuration via the `SonataFlowPlatform` CR. With this approach,
the Operator will take care of configuring the
+Jobs Service instance and ensure it is in sync with the specification in the
CR. When the operator manages the Jobs Service lifecycle,
+it will inject properties in `SonataFlow` workflows at creation time to enable
the workflows to communicate with the Jobs Service
+It is possible to deploy the Jobs Service manually, but the Operator also
provides a convenient way to combine it with the namespace configuration via
the `SonataFlowPlatform` CR. This approach allows the Operator to configure the
Jobs Service and make sure it is in line with the Specification in CR. When the
Operator manages the jobs service lifecycle, it injects properties at creation
time in the `SonataFlow` workflows to communicate with the Jobs Service during
execution, eliminating the need to include these properties in the workflow CR
instance of the `SonataFlow` workflow.
+
+== Configuring Jobs Service in the SonataFlowPlatformCR
+
+To enable the deployment of a Jobs Service instance, the `SonataFlowPlatform`
CRD exposes a set of fields that allow the user to
+configure the running instance.
+
+==== Ephemeral persistence
+The basic runtime is to deploy the Jobs Service with an ephemeral backend
running in the same container
+as the Jobs Service runtime.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ services:
+ jobService: {}
+---
+
+When executing this manifest, the operator will reconcile generating a pod
hosting the Jobs Service:
+
+[source,shell,subs="attributes+"]
+---
+$>kubectl get pod -n sonataflow
+NAME READY STATUS RESTARTS
AGE
+sonataflow-platform-jobs-service-cdf85d969-sbwkj 1/1 Running 0
108s
+---
+
+Keep in mind that this setup is not recommended for production environments,
especially because the data does not persist when the pod restarts.
+
+==== Using an existing postgreSQL service
+For robust environments, it is recommended to use a dedicated database service
and configure Jobs Service to make use of it. Currently, the Jobs Service
+only supports PostgreSQL database.
+
+Configuring Jobs Service to communicate with an existing PostgreSQL instance
is supported in two ways. In both cases it requires providing the persistence
+configuration, one by using the Jobs Service's persistence field and the other
one using the persistence field defined in the `SonataFlowPlatform` CR
+deployed in the same namespace.
+
+By default, the persistence specification defined in the `SonataFlow`
workflow's CR takes priority over the one in the `SonataFlowPlatform`
persistence specification.
+
+===== Using the persistence field defined in the `SonataFlowPlatform` CR
+Using the persistence configuration in the `SonataFlowPlatform` CR located in
the same namespace requires to have the `SonataFlow` CR persistence field
configured
+to have an empty `{}` value, signaling the Operator to derive the persistence
from the active `SonataFlowPlatform`, when available. If no persistence is
defined
+the operator will fallback to the ephemeral persistence previously described.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ persistence:
+ postgresql:
+ secretRef:
+ name: postgres-secrets
+ userKey: POSTGRES_USER
+ passwordKey: POSTGRES_PASSWORD
+ serviceRef:
+ name: postgres
+ port: 5432
+ databaseName: sonataflow
+---
+
+And the `SonataFlow` CR looks like this:
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+ name: callbackstatetimeouts
+ annotations:
+ sonataflow.org/description: Callback State Timeouts Example k8s
+ sonataflow.org/version: 0.0.1
+spec:
+ persistence: {}
+...
+---
+
+When using the `jdbcUrl` field instead of `serviceRef`, the user is
responsible for providing the correct JDBC URL connection value that does not
contain a `database schema`
+because the operator will use verbatim the contents of this field as the JDBC
connection in the Jobs Service pod, and if it provides a schema that has been
used or formatted
+by a different client, the pod will fail to run.
+
+===== Using the persistency field inside the service specification
+You can specify and define the persistence configuration directly in the Jobs
Service specification. The structure is the same as in the `SonataFlowPlatform`
CR and also
+consist of the credentials to access the PostgreSQL instance, and the
kubernetes service reference to generate the connectivity.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
Review Comment:
This should be a `SonataFlowPlatform`, no?
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/enabling-jobs-service.adoc:
##########
@@ -0,0 +1,170 @@
+= Managing Jobs Service with the Operator
+:compat-mode!:
+// Metadata:
+:description: Configure Jobs Service using the `SonataFlowPlatform` CR.
+:keywords: sonataflow, serverless, operator, kubernetes, jobs service
+
+
+This document describes how to configure the Jobs Service instance usimg the
SonataFlowPlarform CR.
+
+== Automate the Jobs Service instance management with the `SonataFlow` Operator
+
+While it is possible to deploy the Jobs Service manually, the Operator also
provides a convenient way to combine it with the
+namespace configuration via the `SonataFlowPlatform` CR. With this approach,
the Operator will take care of configuring the
+Jobs Service instance and ensure it is in sync with the specification in the
CR. When the operator manages the Jobs Service lifecycle,
+it will inject properties in `SonataFlow` workflows at creation time to enable
the workflows to communicate with the Jobs Service
+It is possible to deploy the Jobs Service manually, but the Operator also
provides a convenient way to combine it with the namespace configuration via
the `SonataFlowPlatform` CR. This approach allows the Operator to configure the
Jobs Service and make sure it is in line with the Specification in CR. When the
Operator manages the jobs service lifecycle, it injects properties at creation
time in the `SonataFlow` workflows to communicate with the Jobs Service during
execution, eliminating the need to include these properties in the workflow CR
instance of the `SonataFlow` workflow.
+
+== Configuring Jobs Service in the SonataFlowPlatformCR
+
+To enable the deployment of a Jobs Service instance, the `SonataFlowPlatform`
CRD exposes a set of fields that allow the user to
+configure the running instance.
+
+==== Ephemeral persistence
+The basic runtime is to deploy the Jobs Service with an ephemeral backend
running in the same container
+as the Jobs Service runtime.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ services:
+ jobService: {}
+---
+
+When executing this manifest, the operator will reconcile generating a pod
hosting the Jobs Service:
+
+[source,shell,subs="attributes+"]
+---
+$>kubectl get pod -n sonataflow
+NAME READY STATUS RESTARTS
AGE
+sonataflow-platform-jobs-service-cdf85d969-sbwkj 1/1 Running 0
108s
+---
+
+Keep in mind that this setup is not recommended for production environments,
especially because the data does not persist when the pod restarts.
+
+==== Using an existing postgreSQL service
Review Comment:
```suggestion
==== Using an existing PostgreSQL service
```
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/enabling-jobs-service.adoc:
##########
@@ -0,0 +1,170 @@
+= Managing Jobs Service with the Operator
+:compat-mode!:
+// Metadata:
+:description: Configure Jobs Service using the `SonataFlowPlatform` CR.
+:keywords: sonataflow, serverless, operator, kubernetes, jobs service
+
+
+This document describes how to configure the Jobs Service instance usimg the
SonataFlowPlarform CR.
+
+== Automate the Jobs Service instance management with the `SonataFlow` Operator
+
+While it is possible to deploy the Jobs Service manually, the Operator also
provides a convenient way to combine it with the
+namespace configuration via the `SonataFlowPlatform` CR. With this approach,
the Operator will take care of configuring the
+Jobs Service instance and ensure it is in sync with the specification in the
CR. When the operator manages the Jobs Service lifecycle,
+it will inject properties in `SonataFlow` workflows at creation time to enable
the workflows to communicate with the Jobs Service
+It is possible to deploy the Jobs Service manually, but the Operator also
provides a convenient way to combine it with the namespace configuration via
the `SonataFlowPlatform` CR. This approach allows the Operator to configure the
Jobs Service and make sure it is in line with the Specification in CR. When the
Operator manages the jobs service lifecycle, it injects properties at creation
time in the `SonataFlow` workflows to communicate with the Jobs Service during
execution, eliminating the need to include these properties in the workflow CR
instance of the `SonataFlow` workflow.
+
+== Configuring Jobs Service in the SonataFlowPlatformCR
+
+To enable the deployment of a Jobs Service instance, the `SonataFlowPlatform`
CRD exposes a set of fields that allow the user to
+configure the running instance.
+
+==== Ephemeral persistence
+The basic runtime is to deploy the Jobs Service with an ephemeral backend
running in the same container
+as the Jobs Service runtime.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ services:
+ jobService: {}
+---
+
+When executing this manifest, the operator will reconcile generating a pod
hosting the Jobs Service:
+
+[source,shell,subs="attributes+"]
+---
+$>kubectl get pod -n sonataflow
+NAME READY STATUS RESTARTS
AGE
+sonataflow-platform-jobs-service-cdf85d969-sbwkj 1/1 Running 0
108s
+---
+
+Keep in mind that this setup is not recommended for production environments,
especially because the data does not persist when the pod restarts.
+
+==== Using an existing postgreSQL service
+For robust environments, it is recommended to use a dedicated database service
and configure Jobs Service to make use of it. Currently, the Jobs Service
+only supports PostgreSQL database.
+
+Configuring Jobs Service to communicate with an existing PostgreSQL instance
is supported in two ways. In both cases it requires providing the persistence
+configuration, one by using the Jobs Service's persistence field and the other
one using the persistence field defined in the `SonataFlowPlatform` CR
+deployed in the same namespace.
+
+By default, the persistence specification defined in the `SonataFlow`
workflow's CR takes priority over the one in the `SonataFlowPlatform`
persistence specification.
+
+===== Using the persistence field defined in the `SonataFlowPlatform` CR
+Using the persistence configuration in the `SonataFlowPlatform` CR located in
the same namespace requires to have the `SonataFlow` CR persistence field
configured
+to have an empty `{}` value, signaling the Operator to derive the persistence
from the active `SonataFlowPlatform`, when available. If no persistence is
defined
+the operator will fallback to the ephemeral persistence previously described.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ persistence:
+ postgresql:
+ secretRef:
+ name: postgres-secrets
+ userKey: POSTGRES_USER
+ passwordKey: POSTGRES_PASSWORD
+ serviceRef:
+ name: postgres
+ port: 5432
+ databaseName: sonataflow
+---
+
+And the `SonataFlow` CR looks like this:
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlow
+metadata:
+ name: callbackstatetimeouts
+ annotations:
+ sonataflow.org/description: Callback State Timeouts Example k8s
+ sonataflow.org/version: 0.0.1
+spec:
+ persistence: {}
+...
+---
+
+When using the `jdbcUrl` field instead of `serviceRef`, the user is
responsible for providing the correct JDBC URL connection value that does not
contain a `database schema`
+because the operator will use verbatim the contents of this field as the JDBC
connection in the Jobs Service pod, and if it provides a schema that has been
used or formatted
+by a different client, the pod will fail to run.
+
+===== Using the persistency field inside the service specification
Review Comment:
```suggestion
===== Using the persistence field inside the service specification
```
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/enabling-jobs-service.adoc:
##########
@@ -0,0 +1,170 @@
+= Managing Jobs Service with the Operator
+:compat-mode!:
+// Metadata:
+:description: Configure Jobs Service using the `SonataFlowPlatform` CR.
+:keywords: sonataflow, serverless, operator, kubernetes, jobs service
+
+
+This document describes how to configure the Jobs Service instance usimg the
SonataFlowPlarform CR.
+
+== Automate the Jobs Service instance management with the `SonataFlow` Operator
+
+While it is possible to deploy the Jobs Service manually, the Operator also
provides a convenient way to combine it with the
+namespace configuration via the `SonataFlowPlatform` CR. With this approach,
the Operator will take care of configuring the
+Jobs Service instance and ensure it is in sync with the specification in the
CR. When the operator manages the Jobs Service lifecycle,
+it will inject properties in `SonataFlow` workflows at creation time to enable
the workflows to communicate with the Jobs Service
+It is possible to deploy the Jobs Service manually, but the Operator also
provides a convenient way to combine it with the namespace configuration via
the `SonataFlowPlatform` CR. This approach allows the Operator to configure the
Jobs Service and make sure it is in line with the Specification in CR. When the
Operator manages the jobs service lifecycle, it injects properties at creation
time in the `SonataFlow` workflows to communicate with the Jobs Service during
execution, eliminating the need to include these properties in the workflow CR
instance of the `SonataFlow` workflow.
+
+== Configuring Jobs Service in the SonataFlowPlatformCR
+
+To enable the deployment of a Jobs Service instance, the `SonataFlowPlatform`
CRD exposes a set of fields that allow the user to
+configure the running instance.
+
+==== Ephemeral persistence
+The basic runtime is to deploy the Jobs Service with an ephemeral backend
running in the same container
+as the Jobs Service runtime.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ services:
+ jobService: {}
+---
+
+When executing this manifest, the operator will reconcile generating a pod
hosting the Jobs Service:
+
+[source,shell,subs="attributes+"]
+---
+$>kubectl get pod -n sonataflow
+NAME READY STATUS RESTARTS
AGE
+sonataflow-platform-jobs-service-cdf85d969-sbwkj 1/1 Running 0
108s
+---
+
+Keep in mind that this setup is not recommended for production environments,
especially because the data does not persist when the pod restarts.
+
+==== Using an existing postgreSQL service
+For robust environments, it is recommended to use a dedicated database service
and configure Jobs Service to make use of it. Currently, the Jobs Service
+only supports PostgreSQL database.
+
+Configuring Jobs Service to communicate with an existing PostgreSQL instance
is supported in two ways. In both cases it requires providing the persistence
+configuration, one by using the Jobs Service's persistence field and the other
one using the persistence field defined in the `SonataFlowPlatform` CR
+deployed in the same namespace.
+
+By default, the persistence specification defined in the `SonataFlow`
workflow's CR takes priority over the one in the `SonataFlowPlatform`
persistence specification.
+
+===== Using the persistence field defined in the `SonataFlowPlatform` CR
Review Comment:
@jordigilh I believe this section should be moved to another guide
`workflow-persistence.adoc` within the operator section. WDYT?
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/enabling-jobs-service.adoc:
##########
@@ -0,0 +1,170 @@
+= Managing Jobs Service with the Operator
+:compat-mode!:
+// Metadata:
+:description: Configure Jobs Service using the `SonataFlowPlatform` CR.
+:keywords: sonataflow, serverless, operator, kubernetes, jobs service
+
+
+This document describes how to configure the Jobs Service instance usimg the
SonataFlowPlarform CR.
+
+== Automate the Jobs Service instance management with the `SonataFlow` Operator
+
+While it is possible to deploy the Jobs Service manually, the Operator also
provides a convenient way to combine it with the
+namespace configuration via the `SonataFlowPlatform` CR. With this approach,
the Operator will take care of configuring the
+Jobs Service instance and ensure it is in sync with the specification in the
CR. When the operator manages the Jobs Service lifecycle,
+it will inject properties in `SonataFlow` workflows at creation time to enable
the workflows to communicate with the Jobs Service
+It is possible to deploy the Jobs Service manually, but the Operator also
provides a convenient way to combine it with the namespace configuration via
the `SonataFlowPlatform` CR. This approach allows the Operator to configure the
Jobs Service and make sure it is in line with the Specification in CR. When the
Operator manages the jobs service lifecycle, it injects properties at creation
time in the `SonataFlow` workflows to communicate with the Jobs Service during
execution, eliminating the need to include these properties in the workflow CR
instance of the `SonataFlow` workflow.
Review Comment:
It seems to me that this paragraph is repeated here using other words.
@kaldesai can you take a look?
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/enabling-jobs-service.adoc:
##########
@@ -0,0 +1,170 @@
+= Managing Jobs Service with the Operator
+:compat-mode!:
+// Metadata:
+:description: Configure Jobs Service using the `SonataFlowPlatform` CR.
+:keywords: sonataflow, serverless, operator, kubernetes, jobs service
+
+
+This document describes how to configure the Jobs Service instance usimg the
SonataFlowPlarform CR.
+
+== Automate the Jobs Service instance management with the `SonataFlow` Operator
+
+While it is possible to deploy the Jobs Service manually, the Operator also
provides a convenient way to combine it with the
+namespace configuration via the `SonataFlowPlatform` CR. With this approach,
the Operator will take care of configuring the
+Jobs Service instance and ensure it is in sync with the specification in the
CR. When the operator manages the Jobs Service lifecycle,
+it will inject properties in `SonataFlow` workflows at creation time to enable
the workflows to communicate with the Jobs Service
+It is possible to deploy the Jobs Service manually, but the Operator also
provides a convenient way to combine it with the namespace configuration via
the `SonataFlowPlatform` CR. This approach allows the Operator to configure the
Jobs Service and make sure it is in line with the Specification in CR. When the
Operator manages the jobs service lifecycle, it injects properties at creation
time in the `SonataFlow` workflows to communicate with the Jobs Service during
execution, eliminating the need to include these properties in the workflow CR
instance of the `SonataFlow` workflow.
+
+== Configuring Jobs Service in the SonataFlowPlatformCR
Review Comment:
```suggestion
== Configuring Jobs Service in the SonataFlowPlatform CR
```
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/enabling-jobs-service.adoc:
##########
@@ -0,0 +1,170 @@
+= Managing Jobs Service with the Operator
+:compat-mode!:
+// Metadata:
+:description: Configure Jobs Service using the `SonataFlowPlatform` CR.
+:keywords: sonataflow, serverless, operator, kubernetes, jobs service
+
+
+This document describes how to configure the Jobs Service instance usimg the
SonataFlowPlarform CR.
+
+== Automate the Jobs Service instance management with the `SonataFlow` Operator
+
+While it is possible to deploy the Jobs Service manually, the Operator also
provides a convenient way to combine it with the
+namespace configuration via the `SonataFlowPlatform` CR. With this approach,
the Operator will take care of configuring the
+Jobs Service instance and ensure it is in sync with the specification in the
CR. When the operator manages the Jobs Service lifecycle,
+it will inject properties in `SonataFlow` workflows at creation time to enable
the workflows to communicate with the Jobs Service
+instance during their execution, removing the need to add these properties as
part of the `SonataFlow` workflow CR instance.
+
+== Configuring Jobs Service in the SonataFlowPlatformCR
+
+To enable the deployment of a Jobs Service instance, the `SonataFlowPlatform`
CRD exposes a set of fields that allow the user to
+configure the running instance.
+
+==== Ephemeral persistence
+The basic runtime is to deploy the Jobs Service with an ephemeral backend
running in the same container
+as the Jobs Service runtime.
+
+[source,yaml,subs="attributes+"]
+---
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ services:
+ jobService: {}
+---
+
+When executing this manifest, the operator will reconcile generating a pod
hosting the Jobs Service:
+
+[source,shell,subs="attributes+"]
+---
+$>kubectl get pod -n sonataflow
+NAME READY STATUS RESTARTS
AGE
+sonataflow-platform-jobs-service-cdf85d969-sbwkj 1/1 Running 0
108s
+---
+
+Keep in mind that this setup is not recommended for production environments,
chiefly because the data is not persisted when the pod restarts.
+
+==== Using an existing postgreSQL service
+For robust environments it is recommened to use an dedicated database service
and configure Jobs Service to make use of it. Currently, the Jobs Service
+only supports PostgreSQL database.
+
+Configuring Jobs Service to communicate with an existing PostgreSQL instance
is supported in two ways. In both cases it requires providing the persistence
Review Comment:
I'm not a native speaker, so I'd +1 @kaldesai changes. But indeed sounds
weird to me too.
--
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]