-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from rgolangh/autopr-3425
Automatic manifests generation from
- Loading branch information
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
charts/workflows/charts/greeting/templates/01-configmap_01-greeting-resources.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: v1 | ||
data: | ||
greeting.sw.input-schema.json: |- | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"properties": { | ||
"language": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
kind: ConfigMap | ||
metadata: | ||
creationTimestamp: null | ||
name: 01-greeting-resources | ||
namespace: default |
74 changes: 74 additions & 0 deletions
74
charts/workflows/charts/greeting/templates/01-sonataflow_greeting.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
apiVersion: sonataflow.org/v1alpha08 | ||
kind: SonataFlow | ||
metadata: | ||
annotations: | ||
sonataflow.org/description: YAML based greeting workflow | ||
sonataflow.org/expressionLang: jsonpath | ||
sonataflow.org/version: "1.0" | ||
creationTimestamp: null | ||
labels: | ||
app: greeting | ||
sonataflow.org/workflow-app: greeting | ||
name: greeting | ||
namespace: default | ||
spec: | ||
flow: | ||
dataInputSchema: | ||
failOnValidationErrors: true | ||
schema: specs/greeting.sw.input-schema.json | ||
functions: | ||
- name: greetFunction | ||
operation: sysout | ||
type: custom | ||
start: | ||
stateName: ChooseOnLanguage | ||
states: | ||
- dataConditions: | ||
- condition: ${$.[?(@.language == 'English')]} | ||
transition: | ||
nextState: GreetInEnglish | ||
- condition: ${$.[?(@.language == 'Spanish')]} | ||
transition: | ||
nextState: GreetInSpanish | ||
defaultCondition: | ||
transition: | ||
nextState: GreetInEnglish | ||
name: ChooseOnLanguage | ||
type: switch | ||
- data: | ||
greeting: 'Hello from YAML Workflow, ' | ||
name: GreetInEnglish | ||
transition: | ||
nextState: GreetPerson | ||
type: inject | ||
- data: | ||
greeting: 'Saludos desde YAML Workflow, ' | ||
name: GreetInSpanish | ||
transition: | ||
nextState: GreetPerson | ||
type: inject | ||
- actionMode: sequential | ||
actions: | ||
- actionDataFilter: | ||
useResults: true | ||
functionRef: | ||
arguments: | ||
message: $.greeting $.name | ||
invoke: sync | ||
refName: greetFunction | ||
name: greetAction | ||
end: | ||
terminate: true | ||
name: GreetPerson | ||
type: operation | ||
resources: | ||
configMaps: | ||
- configMap: | ||
name: 01-greeting-resources | ||
workflowPath: specs | ||
podTemplate: | ||
container: | ||
image: quay.io/orchestrator/serverless-workflow-greeting:8dc7224f47325e380e72ac4555f4b2aa1d129e8a | ||
status: | ||
address: {} | ||
lastTimeRecoverAttempt: null |