Skip to content
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

Allow running under OLM's AllNamespaces install mode #234

Merged
merged 1 commit into from May 31, 2022

Conversation

mrogers950
Copy link
Contributor

This is related to the "de-scoping" changes that OLM will see. It means that eventually OLM will only install operators using the AllNamespaces installModeType, which sets WATCH_NAMESPACE to empty, and assumes that the operator will watch for objects in all namespaces. This PR enables AllNamespaces as a supported type, and forces to Own/SingleNamespace mode when running.

Note, forcing the OwnNamespace mode might seem like a hack, but we can't safely fully de-scope (switch to watching all namespaces) until OLM is able to restrict an operator to a single namespace through its new API (tentatively called "FeatureBinding"). Also, fully-descoping is only critical for operators that have dependencies, or depended on by operators with multiple installModes, or singleton operators that are multi-tenant aware.

Ref: https://issues.redhat.com/browse/OLM-1579
Ref: https://issues.redhat.com/browse/CMP-1355

Eventually, OLM will only use the AllNamespaces mode (watching all namespaces
with WATCH_NAMESPACE="") for deploying. Because the operator is cluster-scoped
and _not_ multi-tenant, we have to maintain the OwnNamespace/SingleNamespace
mode even when using AllNamespaces.
@openshift-ci openshift-ci bot requested review from jhrozek and rhmdnd May 26, 2022 15:29
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 26, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrogers950

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 26, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 26, 2022

@mrogers950: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@rhmdnd
Copy link
Contributor

rhmdnd commented May 31, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 31, 2022
@mrogers950 mrogers950 merged commit b82ca7c into openshift:master May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants