'Argo Workflows Sharding

I'm following the sharding doc and having a little trouble understanding the setup. I have installed Workflows in the argo namespace -

kubectl create namespace argo
kubectl apply -n argo -f https://github.com/argoproj/argo-workflows/releases/download/v3.3.1/install.yaml

I then created two namespaces argo-1 and argo-2 as mentioned in the docs. Here's where I am having trouble following. The doc says, "Edit workflow-controller-configmap.yaml for each namespace to set an instance ID." Does that mean I have to install Workflows in those two namespaces as well? I tried that -

kubectl apply -n argo-1 -f https://github.com/argoproj/argo-workflows/releases/download/v3.3.1/install.yaml
kubectl apply -n argo-1 -f https://github.com/argoproj/argo-workflows/releases/download/v3.3.1/install.yaml

I then edited the workflow-controller-configmap for both the namespaces to set two instance IDs. But if I run the argo CLI with the --instanceid flag as shown in the docs, I still need to pass the -n flag otherwise it gets stuck in pending -

# Gets stuck in pending
argo submit --instanceid i2 --watch https://raw.githubusercontent.com/argoproj/argo-workflows/master/examples/hello-world.yaml

# Works
argo submit --instanceid i2 -n argo-2 --watch https://raw.githubusercontent.com/argoproj/argo-workflows/master/examples/hello-world.yaml 

What am I doing wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source