Skip to content

Commit 0861341

Browse files
authored
Clarify roles and adds info about Package Server
Clarify roles of the two Operators and adds info about Package Server's place in all of this, while making clear it is not a required component.
1 parent a5ddd3c commit 0861341

File tree

1 file changed

+29
-14
lines changed

1 file changed

+29
-14
lines changed

doc/design/architecture.md

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Architecture
22

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.
44

55
Each of these Operators is responsible for managing the CRDs that are the basis for the OLM framework:
66

@@ -11,17 +11,19 @@ Each of these Operators is responsible for managing the CRDs that are the basis
1111
| CatalogSource | catsrc | Catalog | a repository of CSVs, CRDs, and packages that define an application |
1212
| Subscription | sub | Catalog | used to keep CSVs up to date by tracking a channel in a package |
1313
| 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 |
1415

1516
Each of these Operators are also responsible for creating resources:
1617

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 |
2527

2628
## What is a ClusterServiceVersion
2729

@@ -45,7 +47,9 @@ ClusterServiceVersion:
4547
## OLM Operator
4648

4749
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+
4953
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.
5054

5155
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
8286
8387
## Catalog Operator
8488

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.
8996

9097
### InstallPlan Control Loop
9198

@@ -120,6 +127,14 @@ None --> UpgradeAvailable --> UpgradePending --> AtLatestKnown -+
120127
| UpgradePending | `InstallPlan` has been created (referenced in `status.installplan`) to install a new CSV |
121128
| AtLatestKnown | `status.installedCSV` matches the latest available CSV in catalog |
122129

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+
123138
## Catalog (Registry) Design
124139

125140
The Catalog Registry stores CSVs and CRDs for creation in a cluster, and stores metadata about packages and channels.

0 commit comments

Comments
 (0)