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

UI: Set namespace when submitting ClusterWorkflowTemplate #10398

Open
igorcalabria opened this issue Jan 25, 2023 · 1 comment · May be fixed by #13596
Open

UI: Set namespace when submitting ClusterWorkflowTemplate #10398

igorcalabria opened this issue Jan 25, 2023 · 1 comment · May be fixed by #13596

Comments

@igorcalabria
Copy link

Summary

Currently, there's no way (or I haven't found one) to set the workflow namespace when submitting a ClusterWorkflowTemplate from the UI.

Use Cases

A template may be submitted in different namespaces depending on which team/access/whatever is needed for that template. This is equivalent of doing

argo submit --from clusterworkflowtemplate/my-template -n my-choosen-namespace

Current workaround is creating a WorkflowTemplate in each namespace, but that's really clunky.


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

@igorcalabria igorcalabria added the type/feature Feature request label Jan 25, 2023
@agilgur5 agilgur5 changed the title Allow setting namespace when submitting a ClusteWorkflowTemplate from the UI UI: Set namespace when submitting ClusterWorkflowTemplate Feb 14, 2024
@Joibel Joibel added the good first issue Good for newcomers label Feb 15, 2024
@sahil-sharma
Copy link
Contributor

sahil-sharma commented Jul 8, 2024

This could be useful when you a common workflow for different teams like regular data backup scripts where they have to simply select the service_name as namespace and the workflow would get executed in the selected service_namespace.
I tried something like this but everytime it is being deployed in default namespace.

apiVersion: argoproj.io/v1alpha1
kind: ClusterWorkflowTemplate
metadata:
  name: my-cluster-workflow-template
spec:
  entrypoint: my-job-template
  templates:
    - name: my-job-template
      inputs:
        parameters:
          - name: namespace
            description: "This is where the workflow will get executed."
            default: "backend"
            enum:
              - "serviceA"
              - "serviceB"
              - "serviceC"
            valueFrom:
              supplied: {}
          - name: message
            value: "Hello, World!"
      script:
        image: alpine:latest
        command: ["sh"]
        source: |
          "echo {{inputs.parameters.message}} from selected {{inputs.parameters.namespace}}."
      namespace: "demo-{{inputs.parameters.namespace}}"
ttlStrategy:
  secondsAfterCompletion: 300
podGC:
  strategy: OnPodCompletion

Can someone reproduce this? There is no specific ClusterRole(or RoleBindings) were created. Going with the default helm set-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

5 participants