argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.38k stars 5.28k forks source link

Add description and validation to `include` and `exclude` fields in Parameters tab of directory apps #10880

Open crenshaw-dev opened 1 year ago

crenshaw-dev commented 1 year ago

Summary

~Directory-type apps support include and exclude glob patterns. But those fields must be set in the manifest. There is no UI integration.~ DONE

Motivation

The include/exclude feature has proven confusing and difficult to discover. By adding fields to the UI, potentially with glob-pattern validation, we can help folks find and use the feature.

Proposal

~We should add an "Include" and an "Exclude" field to the Parameters tab of the App Details page for directory apps.~ DONE

The fields should be accompanied by some short description of how they work.

If possible, we should provide glob pattern validation or a link to the glob evaluator's documentation.

The code which needs to be edited is here: https://github.com/argoproj/argo-cd/blob/master/ui/src/app/applications/components/application-parameters/application-parameters.tsx#L281-L306

To test whether your changes work, you should be able to change tabs to the "Manifest" tab and see the exclude and include fields changing after you edit them in the "Parameters" tab.

screenshot of the App Details page in Argo CD, with the Parameters tab open - the only fields visible are 'directory recurse', 'top-level arguments' and 'external variables'
crenshaw-dev commented 1 year ago

I think this would be reasonably easy to implement, using Kustomize's built-in fields as a guide.

karengineering commented 1 year ago

I would like to work on this.

crenshaw-dev commented 1 year ago

@karengineering go for it! lmk if you need any help.

crenshaw-dev commented 1 year ago

UI support will be in 2.6. I'll leave this issue open to track glob pattern validation and docs-in-UI (tooltips or whatever to clarify how include/exclude works).

nsinghal12 commented 1 year ago

Hi @crenshaw-dev Can you please assign this to me. Thanks!