Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion workflows/list-users/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ quarkus.kubernetes-client.trust-certs=true
# Possible values: OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL.
# and see https://quarkus.io/guides/logging for documentation
quarkus.log.category."org.apache.http".level=INFO
quarkus.log.level=INFO
quarkus.log.level=INFO

# enable persistence
kie.flyway.enabled = true
26 changes: 26 additions & 0 deletions workflows/list-users/manifests/01-configmap_list-users-props.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: v1
data:
application.properties: |
quarkus.tls.trust-all=true
quarkus.kubernetes-client.trust-certs=true

# This property is used to select the log level, which controls the amount
# of information logged on HTTP requests based on the severity of the events.
# Possible values: OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL.
# and see https://quarkus.io/guides/logging for documentation
quarkus.log.category."org.apache.http".level=INFO
quarkus.log.level=INFO

# enable persistence
kie.flyway.enabled = true
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
app: list-users
app.kubernetes.io/component: serverless-workflow
app.kubernetes.io/managed-by: sonataflow-operator
app.kubernetes.io/name: list-users
sonataflow.org/workflow-app: list-users
sonataflow.org/workflow-namespace: ""
name: list-users-props
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: v1
data:
list-users.json: |-
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"selectUser": {
"type": "string",
"title": "Please select a user name from the list",
"ui:widget": "ActiveDropdown",
"ui:props": {
"fetch:url": "$${{backend.baseUrl}}/api/catalog/entities?fields=metadata.name,metadata.namespace,kind&filter=kind=user",
"fetch:response:value": "[$map($,function($v){$lowercase( $v.kind ) & ':' & $v.metadata.namespace & '/' & $v.metadata.name})]",
"fetch:response:label": "[$map($,function($v){$lowercase( $v.kind ) & ':' & $v.metadata.namespace & '/' & $v.metadata.name})]",
"fetch:method": "GET",
"fetch:headers": {
"Authorization": "Bearer $${{identityApi.token}}"
}
}
}
}
}
workflow-output-schema.json: |-
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "WorkflowResult",
"description": "Schema of workflow output",
"type": "object",
"properties": {
"result": {
"$ref": "../shared/schemas/workflow-result-schema.json",
"type": "object"
}
}
}
kind: ConfigMap
metadata:
creationTimestamp: null
name: 01-list-users-resources-schemas
64 changes: 64 additions & 0 deletions workflows/list-users/manifests/03-sonataflow_list-users.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
apiVersion: sonataflow.org/v1alpha08
kind: SonataFlow
metadata:
annotations:
sonataflow.org/description: list-users
sonataflow.org/expressionLang: jq
sonataflow.org/profile: gitops
sonataflow.org/version: "0.1"
creationTimestamp: null
labels:
app: list-users
app.kubernetes.io/component: serverless-workflow
app.kubernetes.io/managed-by: sonataflow-operator
app.kubernetes.io/name: list-users
sonataflow.org/workflow-app: list-users
sonataflow.org/workflow-namespace: ""
name: list-users
spec:
flow:
dataInputSchema:
failOnValidationErrors: true
schema: schemas/list-users.json
functions:
- name: successResult
operation: '{ "result": { "message": "Selected user is: " + .selectUser, "outputs":[], "nextWorkflows":[ ] } }'
type: expression
start:
stateName: Start
states:
- actionMode: sequential
actions:
- actionDataFilter:
useResults: true
functionRef:
invoke: sync
refName: successResult
name: successResult
end:
terminate: true
name: Start
type: operation
podTemplate:
container:
image: quay.io/orchestrator/serverless-workflows-list-users:1.6
resources: {}
resources:
configMaps:
- configMap:
name: 01-list-users-resources-schemas
workflowPath: schemas
persistence:
postgresql:
secretRef:
name: sonataflow-psql-postgresql
userKey: postgres-username
passwordKey: postgres-password
serviceRef:
name: sonataflow-psql-postgresql
port: 5432
databaseName: sonataflow
databaseSchema: list-users
status:
address: {}
lastTimeRecoverAttempt: null
5 changes: 4 additions & 1 deletion workflows/select-user/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ quarkus.kubernetes-client.trust-certs=true
# Possible values: OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL.
# and see https://quarkus.io/guides/logging for documentation
quarkus.log.category."org.apache.http".level=INFO
quarkus.log.level=INFO
quarkus.log.level=INFO

# enable persistence
kie.flyway.enabled = true
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: v1
data:
application.properties: |
quarkus.tls.trust-all=true
quarkus.kubernetes-client.trust-certs=true

# This property is used to select the log level, which controls the amount
# of information logged on HTTP requests based on the severity of the events.
# Possible values: OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL.
# and see https://quarkus.io/guides/logging for documentation
quarkus.log.category."org.apache.http".level=INFO
quarkus.log.level=INFO

# enable persistence
kie.flyway.enabled = true
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
app: select-user
app.kubernetes.io/component: serverless-workflow
app.kubernetes.io/managed-by: sonataflow-operator
app.kubernetes.io/name: select-user
sonataflow.org/workflow-app: select-user
sonataflow.org/workflow-namespace: ""
name: select-user-props
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: v1
data:
select-user.json: |-
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"selectUser": {
"type": "string",
"title": "Please enter user name. Start typing for autocompletion",
"ui:widget": "ActiveTextInput",
"ui:props": {
"fetch:url": "$${{backend.baseUrl}}/api/catalog/entities?fields=metadata.name,metadata.namespace,kind&filter=kind=user",
"fetch:response:value": "[$map($,function($v){$lowercase( $v.kind ) & ':' & $v.metadata.namespace & '/' & $v.metadata.name})][0]",
"fetch:response:autocomplete": "[$map($,function($v){$lowercase( $v.kind ) & ':' & $v.metadata.namespace & '/' & $v.metadata.name})]",
"fetch:method": "GET",
"fetch:headers": {
"Authorization": "Bearer $${{identityApi.token}}"
}
}
}
}
}
workflow-output-schema.json: |-
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "WorkflowResult",
"description": "Schema of workflow output",
"type": "object",
"properties": {
"result": {
"$ref": "../shared/schemas/workflow-result-schema.json",
"type": "object"
}
}
}
kind: ConfigMap
metadata:
creationTimestamp: null
name: 01-select-user-resources-schemas
64 changes: 64 additions & 0 deletions workflows/select-user/manifests/03-sonataflow_select-user.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
apiVersion: sonataflow.org/v1alpha08
kind: SonataFlow
metadata:
annotations:
sonataflow.org/description: select-user
sonataflow.org/expressionLang: jq
sonataflow.org/profile: gitops
sonataflow.org/version: "0.1"
creationTimestamp: null
labels:
app: select-user
app.kubernetes.io/component: serverless-workflow
app.kubernetes.io/managed-by: sonataflow-operator
app.kubernetes.io/name: select-user
sonataflow.org/workflow-app: select-user
sonataflow.org/workflow-namespace: ""
name: select-user
spec:
flow:
dataInputSchema:
failOnValidationErrors: true
schema: schemas/select-user.json
functions:
- name: successResult
operation: '{ "result": { "message": "Selected user is: " + .selectUser, "outputs":[], "nextWorkflows":[ ] } }'
type: expression
start:
stateName: Start
states:
- actionMode: sequential
actions:
- actionDataFilter:
useResults: true
functionRef:
invoke: sync
refName: successResult
name: successResult
end:
terminate: true
name: Start
type: operation
podTemplate:
container:
image: quay.io/orchestrator/serverless-workflows-select-user:1.6
resources: {}
resources:
configMaps:
- configMap:
name: 01-select-user-resources-schemas
workflowPath: schemas
persistence:
postgresql:
secretRef:
name: sonataflow-psql-postgresql
userKey: postgres-username
passwordKey: postgres-password
serviceRef:
name: sonataflow-psql-postgresql
port: 5432
databaseName: sonataflow
databaseSchema: select-user
status:
address: {}
lastTimeRecoverAttempt: null