-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Projects feature design
- RBAC: user selects one project for each application and then configure application access using projects instead of repository URLs.
- control where the application can be deployed:
- user defines list of clusters/namespaces which are available for project;
- controller deploys application only if target cluster/namespace is available in application project;
- projects provide a convenient filter on applications list page;
-
Projectis defined by new CRD (argoproj.io/v1alpha1 Project). The project has following fields:name,description,app_destinations. Theapp_destinationsfield contains a list of cluster/namespaces and defines where project applications can be deployed. For user convenience ArgoCD providesdefault project.Default projectis not stored in CRD; an application which belongs todefault projectcan be deployed into any cluster and any namespace. -
Applicationbelongs to a project. The relationship is stored in labelapplications.argoproj.io/project. Label is chosen since it allows to filter using Kubernetes API. Missing/empty/invalid labels means that application belongs todefaultproject.
- New CRUD APIs for project management:
GET, POST, DELETE, UPDATE /api/v1/projects/<id> - Application APIs allows to set application project:
POST /api/v1/applicationsandPUT /api/v1/applications/{id}now accept project field. - Application list API supports filtering by project:
GET /api/v1/applicationsacceptprojectsparameter which contains list of project names. Empty string in projects filter meansdefaultproject. - Session API changes - new APIs to get current user permissions. Required hide project management UI if project management is disabled.
- Project management UI - allows to create, delete, update projects. Should be available only to administrators. Availability is controlled by RBAC.
- Application creation wizard - user should be able to choose application project.
- New filter on applications list page.
-
Move to projectaction on application details page.
UI changes should be visible only if project management is enabled, otherwise, UI should looks the same.