-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolver: Add support for excluding global catalogs from resolution #2788
resolver: Add support for excluding global catalogs from resolution #2788
Conversation
Skipping CI for Draft Pull Request. |
c995b5e
to
abfdd0f
Compare
abfdd0f
to
d90a5ad
Compare
I squashed everything down to one commit (made Per the co-author on it as well). The e2e test needs #2801 to go in first (that was originally part of this branch, but was broken out separately since its unrelated), then this can be rebased again, and it should be good after that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to make the error text in cache.go unspecific to catalogs? Maybe something like "failed to populate resolver cache from source %v: %w"?
That sounds good -- should make the error message more clear |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: exdx, perdasilva The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The resolver is currently configured to always consider resolving from global catalogs. In some cases, this may not be desirable, and the user would like to explicitly ignore global catalogs for the purposes of resolution. This change enables per-namespace exclusion from global catalog sources via an annotation on existing registry source provider. A queueinformer for OperatorGroups is added since they are now an input to resolution via the global catalog exclusion annotation. Namespace resolution will be triggered on changes to an OperatorGroup, in case the value provided on that annotation by the user changes. Updated the error message returned by the cache in case a source has an error to be more clear. Signed-off-by: Daniel Sover <[email protected]> Co-authored-by: perdasilva <[email protected]>
/lgtm |
[2788](operator-framework#2788) introduced the `OgSourceProvider` that allows for the exclusion of Catalogs in the global namespace. This `OgSourceProvider` was used by the resolver as the `SourceProvider` implementation. [3349](operator-framework#3349) modified the resolver, to list the CatalogSources in the cluster by itself on the basis of the annotation in the `OperatorGroup` in the resolving namespace, so that that information can be passed to the `RegistrySourceProvider`, which now list the CatalogSources using a client instead of reaching out to the registry-server cache. This PR removes the `OgSourceProvider`, since the feature is now being directly implemented in the resolver, and the `OgSourceProvider` implementation has become redundant. Note that the feature parity is still maintained, as attested by the successful execution of [these tests](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/test/e2e/catalog_exclusion_test.go) introduced in 2788.
[2788](#2788) introduced the `OgSourceProvider` that allows for the exclusion of Catalogs in the global namespace. This `OgSourceProvider` was used by the resolver as the `SourceProvider` implementation. [3349](#3349) modified the resolver, to list the CatalogSources in the cluster by itself on the basis of the annotation in the `OperatorGroup` in the resolving namespace, so that that information can be passed to the `RegistrySourceProvider`, which now list the CatalogSources using a client instead of reaching out to the registry-server cache. This PR removes the `OgSourceProvider`, since the feature is now being directly implemented in the resolver, and the `OgSourceProvider` implementation has become redundant. Note that the feature parity is still maintained, as attested by the successful execution of [these tests](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/test/e2e/catalog_exclusion_test.go) introduced in 2788.
[2788](operator-framework/operator-lifecycle-manager#2788) introduced the `OgSourceProvider` that allows for the exclusion of Catalogs in the global namespace. This `OgSourceProvider` was used by the resolver as the `SourceProvider` implementation. [3349](operator-framework/operator-lifecycle-manager#3349) modified the resolver, to list the CatalogSources in the cluster by itself on the basis of the annotation in the `OperatorGroup` in the resolving namespace, so that that information can be passed to the `RegistrySourceProvider`, which now list the CatalogSources using a client instead of reaching out to the registry-server cache. This PR removes the `OgSourceProvider`, since the feature is now being directly implemented in the resolver, and the `OgSourceProvider` implementation has become redundant. Note that the feature parity is still maintained, as attested by the successful execution of [these tests](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/test/e2e/catalog_exclusion_test.go) introduced in 2788. Upstream-repository: operator-lifecycle-manager Upstream-commit: 183a7f24c1cbb9a94e7c612ab62689519c001f7f
[2788](operator-framework/operator-lifecycle-manager#2788) introduced the `OgSourceProvider` that allows for the exclusion of Catalogs in the global namespace. This `OgSourceProvider` was used by the resolver as the `SourceProvider` implementation. [3349](operator-framework/operator-lifecycle-manager#3349) modified the resolver, to list the CatalogSources in the cluster by itself on the basis of the annotation in the `OperatorGroup` in the resolving namespace, so that that information can be passed to the `RegistrySourceProvider`, which now list the CatalogSources using a client instead of reaching out to the registry-server cache. This PR removes the `OgSourceProvider`, since the feature is now being directly implemented in the resolver, and the `OgSourceProvider` implementation has become redundant. Note that the feature parity is still maintained, as attested by the successful execution of [these tests](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/test/e2e/catalog_exclusion_test.go) introduced in 2788. Upstream-repository: operator-lifecycle-manager Upstream-commit: 183a7f24c1cbb9a94e7c612ab62689519c001f7f
[2788](operator-framework/operator-lifecycle-manager#2788) introduced the `OgSourceProvider` that allows for the exclusion of Catalogs in the global namespace. This `OgSourceProvider` was used by the resolver as the `SourceProvider` implementation. [3349](operator-framework/operator-lifecycle-manager#3349) modified the resolver, to list the CatalogSources in the cluster by itself on the basis of the annotation in the `OperatorGroup` in the resolving namespace, so that that information can be passed to the `RegistrySourceProvider`, which now list the CatalogSources using a client instead of reaching out to the registry-server cache. This PR removes the `OgSourceProvider`, since the feature is now being directly implemented in the resolver, and the `OgSourceProvider` implementation has become redundant. Note that the feature parity is still maintained, as attested by the successful execution of [these tests](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/test/e2e/catalog_exclusion_test.go) introduced in 2788. Upstream-repository: operator-lifecycle-manager Upstream-commit: 183a7f24c1cbb9a94e7c612ab62689519c001f7f
[2788](operator-framework/operator-lifecycle-manager#2788) introduced the `OgSourceProvider` that allows for the exclusion of Catalogs in the global namespace. This `OgSourceProvider` was used by the resolver as the `SourceProvider` implementation. [3349](operator-framework/operator-lifecycle-manager#3349) modified the resolver, to list the CatalogSources in the cluster by itself on the basis of the annotation in the `OperatorGroup` in the resolving namespace, so that that information can be passed to the `RegistrySourceProvider`, which now list the CatalogSources using a client instead of reaching out to the registry-server cache. This PR removes the `OgSourceProvider`, since the feature is now being directly implemented in the resolver, and the `OgSourceProvider` implementation has become redundant. Note that the feature parity is still maintained, as attested by the successful execution of [these tests](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/test/e2e/catalog_exclusion_test.go) introduced in 2788. Upstream-repository: operator-lifecycle-manager Upstream-commit: 183a7f24c1cbb9a94e7c612ab62689519c001f7f
[2788](operator-framework/operator-lifecycle-manager#2788) introduced the `OgSourceProvider` that allows for the exclusion of Catalogs in the global namespace. This `OgSourceProvider` was used by the resolver as the `SourceProvider` implementation. [3349](operator-framework/operator-lifecycle-manager#3349) modified the resolver, to list the CatalogSources in the cluster by itself on the basis of the annotation in the `OperatorGroup` in the resolving namespace, so that that information can be passed to the `RegistrySourceProvider`, which now list the CatalogSources using a client instead of reaching out to the registry-server cache. This PR removes the `OgSourceProvider`, since the feature is now being directly implemented in the resolver, and the `OgSourceProvider` implementation has become redundant. Note that the feature parity is still maintained, as attested by the successful execution of [these tests](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/test/e2e/catalog_exclusion_test.go) introduced in 2788. Upstream-repository: operator-lifecycle-manager Upstream-commit: 183a7f24c1cbb9a94e7c612ab62689519c001f7f
The resolver is currently configured to always consider resolving
from global catalogs. In some cases, this may not be
desirable, and the user would like to explicitly ignore global catalogs
for the purposes of resolution. This change enables per-namespace
exclusion from global catalog sources via an annotation on the
operatorgroup.
The operatorgroup annotation key is
olm.operatorframework.io/exclude-global-namespace-resolution
and setting the value to
"true"
will cause resolution to exclude global catalogs in that namespace.Signed-off-by: Daniel Sover [email protected]
Description of the change:
Motivation for the change:
Reviewer Checklist
/doc
[FLAKE]
are truly flaky[FLAKE]
tag are no longer flaky