Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-namespace workflows #2063

Open
naor2013 opened this issue Jan 25, 2020 · 13 comments
Open

Multi-namespace workflows #2063

naor2013 opened this issue Jan 25, 2020 · 13 comments
Labels
area/multi-cluster solution/workaround There's a workaround, might not be great, but exists type/feature Feature request type/security Security related

Comments

@naor2013
Copy link

Summary

How do you suggest handling multiple namespaces that run Argo workflows in the new version?
The ways I’m thinking about right now are either:
a) workflow controller for each namespace and an Argo server for each namespace.
b) workflow controller for each namespace and a “managing” namespace which has a Argo server for each namespace with the “managed-namespace” patameter.

Is there a better way? Do you think it will be a good idea for you to implement an option to have one Argo server with multiple managed-namespaces for it?

Motivation

We are the MLOps team and we want every DS team to have their own namespace with their own resource limitations and only show in the Argo UI their own workflows.

@maryoush
Copy link
Contributor

Hi
what with the case for multi tenant spanned workflow ?
#2042

@stale

This comment was marked as resolved.

@stale stale bot added the wontfix label Jul 1, 2020
@stale stale bot closed this as completed Jul 9, 2020
@luozhaoyu
Copy link

I have similar issue: different team may want to create pods in different namespaces - their individual namespace would have different pods to interact with.
Currently --managed-namespace is a single string: https://github.com/argoproj/argo/blob/69179e72c0872cde9131cc9d68192d5c472d64c9/cmd/argo/commands/server.go#L35

@alexec alexec reopened this Dec 4, 2020
@stale stale bot removed the wontfix label Dec 4, 2020
@alexec alexec added type/feature Feature request and removed question labels Dec 4, 2020
@alexec alexec changed the title Managing multiple namespaces with the new version Multi-namespace workflows Dec 4, 2020
@alexec
Copy link
Contributor

alexec commented Jan 14, 2021

See #3523

@dudicoco
Copy link

dudicoco commented Feb 10, 2021

I was able to achieve this by using the following workaround:

  1. Run workflow-controller and argo-server without the --namespaced flag
  2. Create a cluster role for workflow-controller with read only permissions:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: argo-workflows-controller
rules:
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - configmaps
  verbs:
  - get
  - watch
  - list
- apiGroups:
  - argoproj.io
  resources:
  - workflows
  - workflows/finalizers
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - argoproj.io
  resources:
  - workflowtemplates
  - workflowtemplates/finalizers
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - argoproj.io
  resources:
  - cronworkflows
  - cronworkflows/finalizers
  verbs:
  - get
  - list
  - watch
  1. Bind the cluster role to the workflow-controller service account.
  2. Provide write access to specific namespaces by creating a role with the appropriate permissions in that namespace and binding it to the workflow-controller service account.

@syu-lk4b
Copy link

syu-lk4b commented Jun 23, 2021

I tried the above steps, been able to create the job in a different namesapce, however the job stucks in pending status forever, any idea

argo list                                                       
NAME                STATUS    AGE   DURATION   PRIORITY
sumc-cct-job7s7t9   Pending   15m   0s         0
sumc-cct-job9mphx   Pending   17m   0s         0
sumc-cct-jobbg7xr   Pending   19m   0s         0
sumc-cct-job29btn   Pending   26m   0s         0
sumc-cct-jobzlgpl   Pending   28m   0s         0
sumc-cct-jobdg2np   Pending   28m   0s         0
sumc-cct-jobjvh57   Pending   28m   0s         0
sumc-cct-jobbm6w7   Pending   33m   0s         0
sumc-cct-job9292s   Pending   49m   0s         0
sumc-cct-jobmvpkk   Pending   1h    0s         0

@alexec
Copy link
Contributor

alexec commented Sep 1, 2021

You may now test using #6587

JPZ13 pushed a commit to JPZ13/argo-workflows that referenced this issue Sep 26, 2021
…rgoproj#3523, argoproj#2063

Signed-off-by: Alex Collins <alex_collins@intuit.com>

mre

Signed-off-by: Alex Collins <alex_collins@intuit.com>

bits

Signed-off-by: Alex Collins <alex_collins@intuit.com>

fix(executor): Disambiguate PNS executor initialization log (argoproj#6582)

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

ci: Disable builds on forks (argoproj#6589)

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

fix!: Enable authentication by default on Argo Server `/metrics` endpoint. Fixes argoproj#6592 (argoproj#6595)

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

chore: Upgrade cobra to v1.2.1  (argoproj#6597)

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

docs: Document auth rate limiting. Fixes argoproj#5217

docs: Document IP address logging. Fixes argoproj#5216

fix: Fix `gosec` warnings, disable pprof by default. Fixes argoproj#6594 (argoproj#6596)

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

fix tests

Signed-off-by: Alex Collins <alex_collins@intuit.com>

fix/skip tests

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

o

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

docs: Fix template-defaults duplicated in docs and add missing whitespace in h1 (argoproj#6601)

Signed-off-by: Michael Pöllath <mpoellath.dev@gmail.com>

docs: fix continue on failure dag example (argoproj#6609)

Signed-off-by: Siebren Zwerver <siebren@siebjee.nl>

fix: manifests/quick-start/sso for running locally PROFILE=sso (argoproj#6503)

Signed-off-by: Tetsuya Shiota <tetsuya.shiota.1231@gmail.com>

chore: Run `make codegen`

Signed-off-by: Alex Collins <alex_collins@intuit.com>

build: disable UI by default for `make start`

docs: Document argoproj#6297 breaking change (argoproj#6616)

docs: Remove sym-links from docs (argoproj#6617)

Signed-off-by: Alex Collins <alex_collins@intuit.com>

upgrade to v0.0.9

Signed-off-by: Alex Collins <alex_collins@intuit.com>

fix test

Signed-off-by: Alex Collins <alex_collins@intuit.com>

fix tests

Signed-off-by: Alex Collins <alex_collins@intuit.com>

add missing label selector

Signed-off-by: Alex Collins <alex_collins@intuit.com>

add transport wrappers

Signed-off-by: Alex Collins <alex_collins@intuit.com>

fix clean-up keys

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

fix: quay.io stuffs

Signed-off-by: Alex Collins <alex_collins@intuit.com>

fix: support in-cluster correctly

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

fix(controller): Initialize throttler during starting workflow-controller. Fixes: argoproj#6599 (argoproj#6608)

Signed-off-by: smile-luobin <smile.luobin@gmail.com>

 docs: Add slack exit handler example. Resolves argoproj#4152  (argoproj#6612)

Signed-off-by: J.P. Zivalich <j.p.zivalich@gmail.com>

fix: Argo Workflow specs link to not go to raw content (argoproj#6624)

Signed-off-by: Andrey Melnikov <vafilor@gmail.com>

ci: Build Docker manifest with complete dep list (argoproj#6621)

Signed-off-by: Curtis Vogt <curtis.vogt@gmail.com>

fix: Upgrade Dataflow to v0.0.96 (argoproj#6622)

Signed-off-by: Alex Collins <alex_collins@intuit.com>

ok

Signed-off-by: Alex Collins <alex_collins@intuit.com>

docs: Fix incorrect link to examples (argoproj#6630)

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

fix: Fixed typo in clusterrole (argoproj#6626)

Signed-off-by: Saravanan Balasubramanian <sarabala1979@gmail.com>

build: Fix repository prefix (argoproj#6636)

Signed-off-by: Alex Collins <alex_collins@intuit.com>

feat: Upgrade dataflow to v0.0.98 (argoproj#6637)

Signed-off-by: Alex Collins <alex_collins@intuit.com>

docs: correct https://bit.ly/book-30m-with-argo-team URL

feat(controller): Add a shared index informer for ConfigMaps (argoproj#6644)

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>

Fix duplicated import

Signed-off-by: J.P. Zivalich <j.p.zivalich@gmail.com>
@tachyus-ryan
Copy link

@dudicoco could you elaborate a bit more? I am trying to set this up, but the workflows are not starting. I think I also need to replace, not just add, the cluster role you suggest above.

@dudicoco
Copy link

@tachyus-ryan we are no longer using argo-workflows after our initial POC so I don't really remember the entire configuration.

However, if you post your yaml manifests here perhaps I could help you troubleshoot the problem.

@alexec
Copy link
Contributor

alexec commented Apr 6, 2022

@vitalyrychkov

This comment was marked as off-topic.

@agilgur5

This comment was marked as resolved.

@agilgur5
Copy link
Member

To make multi-namespace Workflows properly support the k8s security model, we'd probably need a ClusterWorkflow CR. A Workflow CR does not suffice as it is namespace-scoped.
Although you can certainly workaround this by using the Workflows of Workflows pattern with sufficient RBAC to create workflows in other namespaces.

@agilgur5 agilgur5 added type/security Security related solution/workaround There's a workaround, might not be great, but exists labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/multi-cluster solution/workaround There's a workaround, might not be great, but exists type/feature Feature request type/security Security related
Projects
None yet
9 participants