You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/design/architecture.md
+29-14Lines changed: 29 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Architecture
2
2
3
-
OLM is composed of two Operators: the OLM Operator and the Catalog Operator.
3
+
OLM is composed of two Operators: the OLM Operator and the Catalog Operator. There is also the Package Server, an optional veneer API, that is deployed by default.
4
4
5
5
Each of these Operators is responsible for managing the CRDs that are the basis for the OLM framework:
6
6
@@ -11,17 +11,19 @@ Each of these Operators is responsible for managing the CRDs that are the basis
11
11
| CatalogSource | catsrc | Catalog | a repository of CSVs, CRDs, and packages that define an application |
12
12
| Subscription | sub | Catalog | used to keep CSVs up to date by tracking a channel in a package |
13
13
| OperatorGroup | og | OLM | used to group multiple namespaces and prepare for use by an operator |
14
+
| PackageManifest || PackageServer | provides the user with an api presentation of the data a CatalogSource provides |
14
15
15
16
Each of these Operators are also responsible for creating resources:
16
17
17
-
| Operator | Creatable Resources |
18
-
|----------|----------------------------|
19
-
| OLM | Deployment |
20
-
| OLM | Service Account |
21
-
| OLM | (Cluster)Roles |
22
-
| OLM | (Cluster)RoleBindings |
23
-
| Catalog | Custom Resource Definition |
24
-
| Catalog | ClusterServiceVersion |
18
+
| Component | Creatable Resources |
19
+
|-----------|----------------------------|
20
+
| OLM | Deployment |
21
+
| Catalog | Service Account |
22
+
| Catalog | (Cluster)Roles |
23
+
| Catalog | (Cluster)RoleBindings |
24
+
| Catalog | Custom Resource Definition |
25
+
| Catalog | ClusterServiceVersion |
26
+
| Package Server | PackageManifest |
25
27
26
28
## What is a ClusterServiceVersion
27
29
@@ -45,7 +47,9 @@ ClusterServiceVersion:
45
47
## OLM Operator
46
48
47
49
The OLM Operator is responsible for installing applications defined by ClusterServiceVersion resources once the required resources specified in the ClusterServiceVersion are present in the cluster.
48
-
The OLM Operator is not concerned with the creation of the required resources; users can choose to manually create these resources using `kubectl` or users can choose to create these resources using the Catalog Operator.
50
+
51
+
The OLM Operator is not concerned with the creation of the required resources; users can choose to manually create these resources using `kubectl` or users can choose to create these resources using the Catalog Operator, such as through a Subscription.
52
+
49
53
This separation of concern enables users incremental buy-in in terms of how much of the OLM framework they choose to leverage for their application.
50
54
51
55
While the OLM Operator is often configured to watch all namespaces, it can also be operated alongside other OLM Operators so long as they all manage separate namespaces.
@@ -82,10 +86,13 @@ Replacing --> Deleting
82
86
83
87
## Catalog Operator
84
88
85
-
The Catalog Operator is responsible for resolving ClusterServiceVersions and the required resources they specify. It is also responsible for watching catalog sources for updates to packages in channels, and upgrading them (optionally automatically) to the latest available versions.
86
-
A user that wishes to track a package in a channel creates a Subscription resource configuring the desired package, channel, and the catalog source from which to pull updates. When updates are found, an appropriate InstallPlan is written into the namespace on behalf of the user.
87
-
Users can also create an InstallPlan resource directly, containing the names of the desired ClusterServiceVersions and an approval strategy and the Catalog Operator will create an execution plan for the creation of all of the required resources.
88
-
Once approved, the Catalog Operator will create all of the resources in an InstallPlan; this should then independently satisfy the OLM Operator, which will proceed to install the ClusterServiceVersions.
89
+
The Catalog Operator is responsible for resolving ClusterServiceVersions and the required resources they specify. It is also responsible for watching CatalogSources. It updates to packages in channels, and upgrading them (optionally automatically) to the latest available versions. It also starts and maintains pods required to provide the grpc endpoints from container images those CatalogSources identify.
90
+
91
+
The process works this way. A user that wishes to track a package in a channel creates a Subscription resource configuring the desired package, channel, and the catalog source from which to pull updates. When updates are found, an appropriate InstallPlan is written into the namespace on behalf of the user. Users can also create their own InstallPlan resource directly, containing the names of the desired ClusterServiceVersions and an approval strategy. The Catalog Operator will then create an execution plan for the creation of all of the required resources and update the InstallPlan with that information.
92
+
93
+
If manual approval is required, the Catalog Operator now waits for the InstallPlan to be marked `approved`. Otherwise, it moves on to the next step.
94
+
95
+
Then Catalog Operator will create all of the resources in an InstallPlan; this should independently satisfy the OLM Operator, which will complete the operator deployment.
| UpgradePending |`InstallPlan` has been created (referenced in `status.installplan`) to install a new CSV |
121
128
| AtLatestKnown |`status.installedCSV` matches the latest available CSV in catalog |
122
129
130
+
## Package Server
131
+
132
+
The Package Server provides a veneer API over the CatalogSource resources and the information they provide to ease user interaction.
133
+
134
+
It is not neccessary to run this for OLM to function, but enhances the user experience by providing the information needed for Subscription generation to the user. In a Production scenario where no discovery work is needed and all Subscriptions are predefined, this may be removed.
135
+
136
+
OpenShift/OKD GUIs will use this API extention to present operator package information such as CSVs, packages and CRDs found in the CatalogSource to users. Additionally, `kubectl` and `oc` users are able to issue commands like `kubectl get PackageManifests` to list out available Operators and then run `kubectl describe` on those resources to find the appropriate data to build a Subscription to it.
137
+
123
138
## Catalog (Registry) Design
124
139
125
140
The Catalog Registry stores CSVs and CRDs for creation in a cluster, and stores metadata about packages and channels.
0 commit comments