jakubschwan commented on code in PR #623:
URL:
https://github.com/apache/incubator-kie-kogito-docs/pull/623#discussion_r1566929476
##########
serverlessworkflow/modules/ROOT/pages/cloud/operator/configuring-workflows.adoc:
##########
@@ -83,6 +85,61 @@ Other managed properties include:
If you try to change any of them, the operator will override them with the
default, but preserving your changes in other property keys.
+=== Defining Global Managed Properties
+
+It's possible to set custom global managed properties for your workflows by
defining them in the `SonataFlowPlatform` resource in the same namespace.
+
+Edit the `SonataFlowPlatform` instance and add the required properties to the
`.spec.properties.flow` attribute. For example:
+
+.Example of a SonataFlowPlatform with flow properties
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ properties:
+ flow: <1>
+ - name: quarkus.log.category <2>
+ value: INFO <3>
+----
+
+<1> Attribute to set the array of custom global managed properties
+<2> The property key
+<3> The property value
+
+Every workflow in this `SonataFlowPlatform` instance's namespace will have the
property `quarkus.log.category: INFO` added to its managed properties.
+
+[IMPORTANT]
+====
+You can't override the default managed properties set by the operator using
this feature.
+====
+
+You can add properties from other `ConfigMap` or `Secret` from the same
namespace. For example:
+
+.Example of a SonataFlowPlatform properties from ConfigMap and Secret
+[source,yaml,subs="attributes+"]
+----
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowPlatform
+metadata:
+ name: sonataflow-platform
+spec:
+ properties:
+ flow:
+ - name: my.petstore.auth.token
+ valueFrom:
+ secretKeyRef: petstore-credentials
+ keyName: AUTH_TOKEN
+ - name: my.petstore.url
+ valueFrom:
+ configMapRef: petstore-props
+ keyName: PETSTORE_URL
+----
+
+The `valueFrom` attribute derives from the link:{k8s_envvar_url}[EnvVar
Kubernetes API].
Review Comment:
Maybe it would be good to link the description into example so it is more
clear for what this sentence is. wdyt?
```suggestion
apiVersion: sonataflow.org/v1alpha08
kind: SonataFlowPlatform
metadata:
name: sonataflow-platform
spec:
properties:
flow:
- name: my.petstore.auth.token
valueFrom: <1>
secretKeyRef: petstore-credentials
keyName: AUTH_TOKEN
- name: my.petstore.url
valueFrom:
configMapRef: petstore-props
keyName: PETSTORE_URL
----
<1> The `valueFrom` attribute derives from the link:{k8s_envvar_url}[EnvVar
Kubernetes API].
```
--
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]