operator-lifecycle-manager
operator-lifecycle-manager copied to clipboard
Support setting custom catalogsource sync time
I think it is possible to provide commandline flag or Env to setting the sync time of the catalogsource.
https://github.com/operator-framework/operator-lifecycle-manager/blob/c6cc1d7f706d355e34b1fc6523693bc13ceb4650/pkg/controller/operators/catalog/operator.go#L189-L195
10*time.Minute may be too long,Sometimes we need to upgrade the operator relatively quickly or refresh packmemifests quickly.
Hi @aiyijing, thanks for filing an issue!
The readyTimeout
parameter controls the amount of time we wait for a state change from the gRPC "ready" state. It only exists to keep us from blocking forever here, and doesn't affect how quickly (or slowly) operator upgrades occur; i.e. making these values configurable won't be particularly useful since changing them doesn't impact the speed of new content detection.
Additionally, the PackageManifest
resource is managed by another controller entirely and they are not used as a source of truth for upgrades.
If you're encountering an issue with the speed at which upgrades are detected, could you post the details? Otherwise, I'm inclined to close this out.
Sorry, maybe I didn't make it clear.
I viewd the code of packageserver. Actually packageserver to update the packagemanifest is triggered by catalogsource update event
"SourceStore" will regularly update the status of catalogsource. like this:
status:
connectionState:
address: xxxxx.xxx.com
lastConnect: "2022-01-07T02:48:56Z"
lastObservedState: READY
registryService:
createdAt: "2022-01-07T02:45:42Z"
protocol: grpc
Sometimes, In order to get the package manifest resources faster, I have to restart the packageserver pod or catalog-operator pod