-
Bug
-
Resolution: Done
-
Critical
-
None
-
False
-
None
-
False
-
-
We were mistakenly generating the CRs in an order that could spam two pods when deploying from kn workflow cli
{{}}
Given a workflow that uses schemas and resources, when we execute
kn deploy --namespace cli
We can see that the CLI produces the following command executions:
đź› Deploying your SonataFlow project in namespace cli
configmap/01-multiplication-wf-resources created
1)Â - âś… Manifest 01-configmap_01-multiplication-wf-resources.yaml successfully deployed in namespace cli
sonataflow.sonataflow.org/multiplication-wf created GOOD
2)Â - âś… Manifest 01-sonataflow_multiplication-wf.yaml successfully deployed in namespace cli
configmap/02-multiplication-wf-resources created NOT GOOD
3)Â - âś… Manifest 02-configmap_02-multiplication-wf-resources.yaml successfully deployed in namespace cli
configmap/multiplication-wf-props configured NOT GOOD
4) - ✅ Manifest 03-configmap_multiplication-wf-props.yaml successfully deployed in namespace cli NOT GOOD
The workflow is deployed and works, however, in the k8s management console we can see that two pods are created with their corresponding ReplicaSet.
After investigation, we can see that the workflow is being deployed before, some of the required resources. In particular, note that 03-configmap_multiplication-wf-props.yaml, which defines the workflow user properties is deployed last. Not good.
See explanation in the attached image.
The fix consists of applying the same resources, but, first all the config maps, and lastly the workflow.
note:Â the wf is undeployed, we must do in the reverse order, wf first, and configmaps after.
For the record, the issue can be reproduced if you generate the manifests, executing
kn gen-manifest --namespace cli
Â
{{}}