Skip to content

install: improve detection for desired install mode when creating operator group #54

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

Conversation

joelanford
Copy link
Member

See #50 (comment)

We basically need a set intersection of:

  • The install modes supported by operator (note we only know the supported install modes of the channel heads)
  • The install modes compatible with the namespaces from the --watch flag.
  • The install modes compatible with the namespaces watched by the existing OperatorGroup, if it exists.

After the result of that set intersection, we could use a precedence order of:

  1. AllNamespaces
  2. OwnNamespace
  3. SingleNamespace
  4. MultiNamespaces

Note that in reality, the only time we'll actually have more than one choice is if:

  • the operator supports at least AllNamespaces and OwnNamespace
  • the watch flag is unset
  • there is no existing operator group

In that case, we would choose AllNamespaces.

SingleNamespace is only an option when --watch is explicitly set to single namespace that is different than the install namespace or an existing OperatorGroup specifies a different namespace.

MultiNamespaces is only an option when --watch is explicitly set to multiple namespaces or an existing OperatorGroup specifies multiples namespaces.

Signed-off-by: Joe Lanford [email protected]

@openshift-ci
Copy link

openshift-ci bot commented Aug 26, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joelanford

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 Aug 26, 2021
@joelanford joelanford force-pushed the better-install-mode-defaults branch from 5e18158 to 34c36ab Compare September 3, 2021 16:00
@perdasilva
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 16, 2021
@openshift-merge-robot openshift-merge-robot merged commit 7e2e2de into operator-framework:main Dec 16, 2021
@joelanford joelanford deleted the better-install-mode-defaults branch April 17, 2024 12:06
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.

3 participants