I am trying to solve a scenario where argo-cd is installed cluster-wide, and we have to install the argo-workflows application within a separate namespace.
Let's say team-1 has a namespace team-one, and team-2 has a namespace called team-two. These team need to have there own setup of argo-workflows in respective namespaces.
Setup that I have completed is:
argocd
namespacemetadata:
name: team-one-apps
namespace: team-one
spec:
sourceRepo:
- repolink
sourceNamespaces:
- "team-one"
destination:
- namespace: "team-one"
server: <incluster k8's link>
clusterResourceWhitelist:
- group: "*"
kind: "*"
metadata:
name: team-one-parent-app
namespace: team-one
spec:
destination:
namespace: "team-one"
server: <incluster k8's link>
project: team-one-apps
|- templates
|-- argo-workflows.yaml
|- argo-workflows
|-- <the same chart folders from above link>
|- chart.yaml
|- values.yaml
workflowServiceAccount: team-two-sa
and namespace: team-two
, and successfully submitted and ran the workflow.My question is in #9, why was I able to submit the workflow successfully in team-two namespace, even when then controller.workflowNamespaces is set to team-one namespace.
I am unsure if I did something wrong, but in controller and server args I could not see --namespace or --managed-namespace. So, it was a clusterwide argowf managing. Hence I was able to submit workflows with team-two
namespace also.
I tried to disable Auto-Sync and then added --namespace
and --managed-namespace
then it worked fine. However, this is unable to achieve from Argoworkflows helm chart and values file option for controller.workflowNamespaces