Skip to content

Commit b4b5f05

Browse files
committed
feat: add polling doc
1 parent 1b5b4dd commit b4b5f05

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

doc/design/catalog-polling.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Catalog Polling
2+
3+
## Description
4+
It is possible to configure the catalog source to poll a source, such as an image registry, to check whether the
5+
catalog source pod should be updated. A common use case would be pushing new bundles to the same catalog source tag, and seeing
6+
updated operators from those bundles being installed in the cluster. Currently polling is only implemented for image-based catalogs
7+
that serve bundles over gRPC.
8+
9+
For example, say currently you have Operator X v1.0 installed in the cluster. It came from a catalog source `quay.io/my-catalogs/my-catalog:master`.
10+
This is the latest version of the X operator in the catalog source. Lets say Operator X is upgraded to v2.0. The catalog source image can be rebuilt
11+
to include the v2.0 version of the X operator and pushed to the same `master` tag. With catalog polling enabled, OLM will pull down the newer version
12+
of the catalog source image and route service traffic to the newer pod. The existing subscription will seamlessly create the v2.0 operator and remove the old v1.0 one.
13+
14+
## Example Spec
15+
Here is an example catalog source that polls `quay.io/my-catalogs/my-catalog:master` every 45 minutes to see if the image has been updated.
16+
17+
```yaml
18+
apiVersion: operators.coreos.com/v1alpha1
19+
kind: CatalogSource
20+
metadata:
21+
name: catsrc-test
22+
spec:
23+
displayName: CatalogSource Test
24+
sourceType: grpc
25+
image: quay.io/my-catalogs/my-catalog:master
26+
poll:
27+
interval: 45m
28+
```
29+
30+
It is required for the catalog source to be sourceType grpc and be backed by an image for polling to work.
31+
32+
## Caveats
33+
* The polling sequence is not instantaneous - it can take up to 15 minutes from each poll for the new catalog source pod to be deployed
34+
into the cluster. It may take longer for larger clusters.
35+
* Because OLM pulls down the image every poll interval and starts the pod, to see if its updated, the updated catalog pod must be able to be
36+
scheduled onto the cluster. If the cluster is at absolutely maximum capacity, without autoscaling enabled, this feature may not work.

0 commit comments

Comments
 (0)