Skip to content

Commit d1a4dbf

Browse files
📖 Adding OLM V1 architecture document (#1301)
* Adding OLM V1 architecture document The documentation contains description of the components and a diagram. Removed the components.md file as the architecture doc contains the same information Fixes : [#1124](#1124) Signed-off-by: Lalatendu Mohanty <[email protected]> * Update docs/drafts/architecture.md Co-authored-by: Per Goncalves da Silva <[email protected]> * Update docs/drafts/architecture.md Co-authored-by: Per Goncalves da Silva <[email protected]> * Update docs/drafts/architecture.md Co-authored-by: Per Goncalves da Silva <[email protected]> * Update docs/drafts/architecture.md Co-authored-by: Per Goncalves da Silva <[email protected]> * Addressing the review comments for the arch doc Signed-off-by: Lalatendu Mohanty <[email protected]> --------- Signed-off-by: Lalatendu Mohanty <[email protected]> Co-authored-by: Per Goncalves da Silva <[email protected]>
1 parent eea61cf commit d1a4dbf

File tree

2 files changed

+85
-5
lines changed

2 files changed

+85
-5
lines changed

docs/components.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/drafts/architecture.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
2+
## OLM V1 Architecture
3+
4+
This document describes the OLM v1 architecture. OLM v1 consists of two main components:
5+
6+
* [operator-controller](https://github.com/operator-framework/operator-controller)
7+
* [catalogD](https://github.com/operator-framework/catalogd)
8+
9+
The diagram below illustrates the OLM v1 architecture and its components, and the following sections describe each of the components in detail.
10+
11+
### Diagram
12+
13+
```mermaid
14+
flowchart TB
15+
A(bundle)
16+
B(registry repo)
17+
C(catalog author)
18+
D(bundle author)
19+
E(file based catalog)
20+
F(extension controller)
21+
G(bundle cache)
22+
H(catalog cache)
23+
I(resolver)
24+
J(catalog controller)
25+
K(catalog content cache)
26+
L(catalog http server)
27+
28+
subgraph Image-registry
29+
B
30+
end
31+
subgraph Cluster
32+
subgraph Operator-controller
33+
F-->G
34+
F-->I
35+
I-->H
36+
end
37+
subgraph Catalogd
38+
J-->K
39+
L<-->K
40+
end
41+
end
42+
43+
F-->L
44+
F-->B
45+
J-->B
46+
C -- creates --> E
47+
E -- pushed to --> B
48+
D -- creates --> A
49+
A -- pushed to --> B
50+
```
51+
52+
**Note**: The direction of the arrow indicates the active part of communication i.e. if arrow starts from A and points to B that means A consumes the information from B unless specifically mentioned.
53+
54+
### Operator-controller:
55+
56+
operator-controller is the central component of OLM v1. It is responsible:
57+
* managing a cache of catalog metadata provided by catalogd through its HTTP server
58+
* keeping the catalog metadata cache up-to-date with the current state of the catalogs
59+
* locating the right `registry+v1` bundle, if any, that meet the constraints expressed in the `ClusterExtension` resource, such as package name, version range, channel, etc. given the current state of the cluster
60+
* unpacking the bundle
61+
* applying the bundle manifests: installing or updating the content.
62+
63+
It has three main sub-components:
64+
* Cluster Extension Controller:
65+
* Queries the catalogd (catalogd HTTP Server) to get catalog information.
66+
* Once received the catalog information is saved to catalog-cache. The cache will be updated automatically if a Catalog is noticed to have a different resolved image reference.
67+
* Reaches out to the registry to download the bundle container images, saves it to the bundle cache, unpacks it and applies the bundle manifests to the cluster.
68+
* It is also Responsible for figuring out which bundle to upgrade
69+
* Resolver:
70+
* Helps the cluster extension controller to filter the bundle reference after applying the user restrictions (e.g. name, priority etc) and returns the bundle reference to the extension controller.
71+
* Bundle Cache:
72+
* Bundle cache returns the cache for the bundle. If a cache does not already exist, a new one will be created.
73+
74+
### Catalogd:
75+
76+
Catalogd unpacks [file-based catalog (FBC)](https://olm.operatorframework.io/docs/reference/file-based-catalogs/#docs) content that is packaged and shipped in container images, for consumption by clients on-clusters (unpacking from other sources, like git repos, OCI artifacts etc, are in the roadmap for catalogD). It serves the extension metadata, provided by the extension authors, found in the FBC, making it possible for on-cluster clients to discover installable content.
77+
78+
* Catalogd can be broken down in to three sub-components i.e. ClusterCatalog controller, catalogd http server, catalogd content cache.
79+
* Catalog controller is responsible for pulling FBC based catalog images from registry and unpacking them into the catalog content cache. It is also responsible for reconciling the latest changes in the cluster catalog.
80+
* Catalogd http server is responsible for serving catalog information to clients e.g. cluster extension controller.
81+
* Catalogd content cache is maintained by the catalog controller and used by the catalogd http server to answer queries from clients.
82+
83+
84+
85+

0 commit comments

Comments
 (0)