We want to auto sync the workflow templates that are in Git which is our source of truth to Argo Workflow similar to ArgoCD.
We are using Argo Workflow version 2.9.4
I have a predefined set of workflows which are loaded using the Argo API into the Work and runs perfectly fine when ever there is an event that gets triggered which in turn calls the workflow to execute. Also the sensor (this has definition of workflow steps) templates are committed to git as source of truth.
Question: If I make any changes to the existing sensor (this has definition of workflow steps) templates that are in git, how do I automatically sync the updated templated into ArgoWorkflow?
(Is there some concept similar to AppOfApp that help in auto sync if enabled in ArgoCD)
Try Argo CD?
We are already using ArgoCD for our CD flow and there we have enabled the auto sync so any change that we commit in git to the argo application templates it gets sync automatically (using AppOfApp)
Can we use the same for workflow templates to be loaded into Argo Workflow?
@simster7
@simster7 @alexec We tried ArgoCD to sync argo workflows templates. When we choose ArgoCD helm deploy, helm variables getting conflict argo workflow variables.
example:
"{{workflow.parameters.appName}}"
error:
rpc error: code = Unknown desc =helm2 template . --name test-abc --namespace argocd --kube-version 1.16 --api-versions v1 --api-versions apiregistration.k8s.io/v1 --api-versions apiregistration.k8s.io/v1beta1 --api-versions extensions/v1beta1 --api-versions apps/v1 --api-versions events.k8s.io/v1beta1 --api-versions authentication.k8s.io/v1 --api-versions authentication.k8s.io/v1beta1 --api-versions authorization.k8s.io/v1 --api-versions authorization.k8s.io/v1beta1 --api-versions autoscaling/v1 --api-versions autoscaling/v2beta1 --api-versions autoscaling/v2beta2 --api-versions batch/v1 --api-versions batch/v1beta1 --api-versions batch/v2alpha1 --api-versions certificates.k8s.io/v1beta1 --api-versions networking.k8s.io/v1 --api-versions networking.k8s.io/v1beta1 --api-versions policy/v1beta1 --api-versions rbac.authorization.k8s.io/v1 --api-versions rbac.authorization.k8s.io/v1beta1 --api-versions storage.k8s.io/v1 --api-versions storage.k8s.io/v1beta1 --api-versions admissionregistration.k8s.io/v1 --api-versions admissionregistration.k8s.io/v1beta1 --api-versions apiextensions.k8s.io/v1 --api-versions apiextensions.k8s.io/v1beta1 --api-versions scheduling.k8s.io/v1 --api-versions scheduling.k8s.io/v1beta1 --api-versions coordination.k8s.io/v1 --api-versions coordination.k8s.io/v1beta1 --api-versions kubernetes-client.io/v1 --api-versions monitoring.coreos.com/v1 --api-versions operators.coreos.com/v1 --api-versions operators.coreos.com/v1alpha1 --api-versions argoproj.io/v1alpha1 --api-versions metrics.k8s.io/v1beta1failed exit status 1: Error: parse error in " test-abc/templates/sensors/myapp.yaml": template: test-abc/templates/sensors/myapp.yaml:89: function "workflow" not defined
Found one alternative to fix above issue. Using below example we are able to deploy workflows using ArgoCD. Now Helm is not throwing any error.
{{ printf "{{workflow.parameters.appName}}" }}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Found one alternative to fix above issue. Using below example we are able to deploy workflows using ArgoCD. Now Helm is not throwing any error.
{{ printf "{{workflow.parameters.appName}}" }}