Skip to content

Commit 4395c44

Browse files
author
bowenislandsong
committed
[doc] catsrc priority
This commit adds a description for catsrc priority for the dependency resolution.
1 parent da4200d commit 4395c44

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "Dependency Resolution"
3+
weight: 1
4+
---
5+
6+
The dependency resolution concept explains OLM's strategies for fulfilling dependencies from installing or updating operators using available packages from existing catalogs on cluster.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: "CatalogSource Priority"
3+
weight: 2
4+
---
5+
6+
As part of the dependency resolver, OLM can choose from a wide range of catalogs to resolve dependencies including the ones in the same namespace as a Subscription plus any CatalogSources in the configurable global namespace. CatalogSource is a CR that defines where the catalog comes from and, therefore, can infer the amount of confidence cluster administrators or operator subscribers would want to rely on certain catalogs. OLM would like to explicitly sort catalogs for the dependency resolver so that certain catalogs can be prioritized.
7+
8+
```yaml
9+
apiVersion: operators.coreos.com/v1alpha1
10+
kind: CatalogSource
11+
metadata:
12+
name: operatorhubio-catalog
13+
namespace: olm
14+
spec:
15+
priority: 0
16+
sourceType: grpc
17+
image: quay.io/operatorhubio/catalog:latest
18+
displayName: Community Operators
19+
publisher: OperatorHub.io
20+
```
21+
22+
Priority field, if specified, is used to rank CatalogSources that contain operators to supply dependencies and prioritize certain catalogs based on their rankings. The CatalogSource Priority for supplying dependencies has the following properties:
23+
- The higher the value, the higher the priority.
24+
- The range of the priority value can go from positive to negative in the range of int32.
25+
- The default value to a CatalogSource with unassigned priority would be 0. This means custom CatalogSource without assigning a priority will be prioritized before the default catalogs.
26+
- The CatalogSources are sorted deterministically with the following rules in their order:
27+
1. The CatalogSource of the installing operator.
28+
2. The CatalogSource carrying a higher `priority` integer value.
29+
3. The CatalogSource in the same namespace as the installing operator.
30+
4. Increasing lexicographic order of the CatalogSource name.
31+

0 commit comments

Comments
 (0)