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

docs: Add Argo CD components architecture doc #13194

Merged
merged 9 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/assets/argocd-components.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
118 changes: 118 additions & 0 deletions docs/developer-guide/architecture/components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Component Architecture

Argo CD is designed with a component based architecture. The goal is
to separate the responsibility in different deployable units in order
to have the following benefits:

- **Modularity**: Provides great level of flexibility. Components
interact with each other via an interface. This means that as long
as the interface contract is respected, a given component can be
replaced without requiring the rest of the system to adapt. It is
also possible to run the system without certain components if a
specific group of functionality isn't desired.
- **Single responsibility**: Helps to determine where the different
types of functionality should be implemented which drives for
better system cohesiveness.
- **Reusability**: Clearly defined interfaces helps in functionality
discoverability which benefits reusability of services.

The default Argo CD installation is composed by different components
and different Kubernetes controllers. The controllers aren't
categorized as components as they have proprietary interfaces (CRDs)
and therefore, miss the modular nature. There are more resources
created while installing Argo CD (ConfigMaps, Services, etc), but for
simplicity we are covering just the ones directly related with the
componentized architecture.

## Dependencies

The diagram below has represented all dependencies between the
different components used by the default Argo CD installation:

![Components Diagram](../../assets/argocd-components.png)

There are 4 logical layers represented in the diagram:

- **UI**: This is the presentation layer. Users interact with Argo CD
mainly by components from this layer.
- **Application**: The capabilities required to support the components
from the UI layer.
- **Core**: The main Argo CD gitops functionality is implemented by
components and Kubernetes controllers from the Core layer.
- **Infra**: Represent the tools that Argo CD depends on as part of
its infrastructure.

The logical layers also help making the diagram easier to follow as
dependencies are represented in a top-down relationship. This means
that components from the top layers will be allowed to depend on any
component from any of the bottom layers. However components from the
bottom layers will never depend on any ones from upper layers.

## Responsibility

Below you can refer to a brief description of Argo CD components and
its main responsibilities.

### Webapp

Argo CD ships with a powerful web interface that allows managing
applications deployed in a given Kubernetes cluster.

### CLI

Argo CD provides a CLI that can be used by users to interact with Argo
CD API. The CLI can also be used for automation and scripting.

### API Server

Defines the proprietary API exposed by Argo CD that powers the Webapp
and the CLI functionalities.

### Application Controller

The Application Controller is responsible for reconciling the
Application resource in Kubernetes syncronizing the desired
application state (provided in Git) with the live state (in
Kubernetes). The Application Controller is also responsible for
reconciling the Project resource.

### ApplicationSet Controller

The ApplicationSet Controller is responsible for reconciling the
ApplicationSet resource.

### Repo Server

Repo Server plays an important role in Argo CD architecture as it is
responsible for interacting with the Git repository to generate the
desired state for all Kubernetes resources that belongs to a given
application.

### Redis

Redis is used by Argo CD to provide a cache layer reducing requests
sent to the Kube API as well as to the Git provider. It also supports
a few UI operations.

### Kube API

Argo CD controllers will connect to the Kubernetes API in order to run
the reconciliation loop.

### Git

As a gitops tool Argo CD requires that the desired state of the
Kubernetes resources to be provided in a Git repository.
leoluz marked this conversation as resolved.
Show resolved Hide resolved

We use "git" here to stand in for an actual git repo, a Helm repo,
or an OCI artifact repo. Argo CD supports all those options.

### Dex

Argo CD relies on Dex to provide authentication with external OIDC
providers. However other tools can be used instead of Dex. Check the
[user management
documentation](../../operator-manual/user-management/index.md) for
more details.


1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ nav:
- developer-guide/index.md
- Architecture:
- developer-guide/architecture/authz-authn.md
- developer-guide/architecture/components.md
- Code Contribution Guide: developer-guide/code-contributions.md
- Toolchain Guide: developer-guide/toolchain-guide.md
- developer-guide/contributors-quickstart.md
Expand Down