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

Optional field to hide WorkflowTemplate in UI #11822

Open
SachinChauhan1302 opened this issue Sep 15, 2023 · 5 comments
Open

Optional field to hide WorkflowTemplate in UI #11822

SachinChauhan1302 opened this issue Sep 15, 2023 · 5 comments
Labels

Comments

@SachinChauhan1302
Copy link

Summary

Sometimes we need a main workflow that calls many others sub workflow templates under the hood.
Currently the Argo workflow UI shows all of the WorkflowTemplate definitions in the UI.
Is there a possibility as a feature to annotate in the definition or an optional field that dictates this behaviour for Argo UI.
This helps to keep the UI uncluttered.

Use Cases

Generally application developers don't create workflows in big organizations and Workflow templates are created by other DevOps/Ops teams for app developers to consume. It would help to only expose top level workflows in the UI for the App Developers to consume.


Message from the maintainers:

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

@SachinChauhan1302 SachinChauhan1302 added the type/feature Feature request label Sep 15, 2023
@SachinChauhan1302
Copy link
Author

SachinChauhan1302 commented Sep 16, 2023

An example annotation can be as follows while defining the WorkflowTemplate CRD, which Argo UI server can read to manage display of workflow templates or any feature on similar lines.

kind: WorkflowTemplate
metadata:
  annotations:
      argoproj.io/visible-in-ui: False

@agilgur5
Copy link
Member

So there is a label filter available already that you can use. You can also use the custom links feature to provide a button directly for that query.

Implementing the feature as you propose would not be very difficult, but as with all UI-specific limitations, a really important note is that users could still use those WorkflowTemplates via the API. A UI filter like this would make them "not visible", but if the user has RBAC to access those, they will still be able to access them through the API.

You may be able to limit your users with the existing k8s RBAC right now, for instance, via a resourceNames allowlist. Otherwise a more granular RBAC approach would require something like Casbin #6490.

@SachinChauhan1302
Copy link
Author

yes , its fine to have user submit them through APIs etc. if required and the templates residing in the namespaces where users have read access etc.

The use case becomes more important when we package many workflows as part of a Helm Chart where we expect the user to run only a top main parent workflow which in turn calls the child workflow templates generally in case of DAG templates.

One solution is to have inline templates but that is an anti-modular approach for large workflows and enlarges the parent template size increasing the maintenance complexity as well.

If we can hide the child workflows in some way in the UI in these cases , that can be beneficial.

@agilgur5
Copy link
Member

Question: would you want this filter in the CLI as well? Or a separate label/annotation for the CLI?
As ideally we keep the UI and CLI UX similar (it tends to be confusing when they function differently)

Also mentioned this in a related Argo CD thread on Slack today.

@SachinChauhan1302
Copy link
Author

Although main aim is to unclutter the UI space, It is good to have a feature parity.
argo template list can have a flag like --show-all to show all workflows irrespective of the annotations and inline with the kubectl get WorkflowTemplates

@agilgur5 agilgur5 changed the title Optional field to hide a Workflow Template from being shown in the User Interface Optional field to hide WorkflowTemplate in UI Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants