argoproj / argo-cd

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

Adding watch functionality to AppSet #15695

Open reggie-k opened 1 year ago

reggie-k commented 1 year ago

Summary

Add watch functionality for AppSet, similar to watch for Application, to enable AppSet support in the UI, like this:

https://github.com/argoproj/argo-cd/blob/3557ec57dc87b2570cf9beaaf8b07bb419883a45/server/application/application.go#L1060

The watch function for AppSets should be in this file: https://github.com/argoproj/argo-cd/blob/master/server/applicationset/applicationset.go

The API stream endpoint for apps is here: https://github.com/argoproj/argo-cd/blob/3557ec57dc87b2570cf9beaaf8b07bb419883a45/server/application/application.proto#L322

Here is where the API stream endpoint for AppSet should probably be:

https://github.com/argoproj/argo-cd/blob/3557ec57dc87b2570cf9beaaf8b07bb419883a45/server/applicationset/applicationset.proto

Motivation

To invoke stream API for AppSets, which would be used for the UI.

Proposal

This would need changes in the API and maybe the cli as well. The ui changes are addressed in a separate PR. This is the URL that is invoked from the UI for Apications:

https://github.com/argoproj/argo-cd/blob/3557ec57dc87b2570cf9beaaf8b07bb419883a45/ui/src/app/shared/services/applications-service.ts#L183

A similar URL should exist on the API for stream/applicationsets

reggie-k commented 1 year ago

For Application, there is also a watch for the ResourceTree implemented - I wonder whether we need it the same way for AppSet in the backend ?

reggie-k commented 11 months ago

@crenshaw-dev Is anyone working on this issue?

reggie-k commented 10 months ago

WIP by @alexymantha