operator-framework / operator-lifecycle-manager

A management framework for extending Kubernetes with Operators
https://olm.operatorframework.io
Apache License 2.0
1.72k stars 545 forks source link

OwnNamespace operator cannot depend on AllNamespaces operator #1393

Open gyliu513 opened 4 years ago

gyliu513 commented 4 years ago

Bug Report

What did you do?

I have two operators, operator1 is with OwnNamespace as true and operator2 is AllNamespaces is true.

installModes:
  - supported: true
    type: OwnNamespace
  - supported: false
    type: SingleNamespace
  - supported: false
    type: MultiNamespace
  - supported: false
    type: AllNamespaces
installModes:
  - supported: false
    type: OwnNamespace
  - supported: false
    type: SingleNamespace
  - supported: false
    type: MultiNamespace
  - supported: true
    type: AllNamespaces

operator1 require operator2, then when install operator1, it report the following error:

Failed: OwnNamespace InstallModeType not supported, cannot configure to watch own namespace

What did you expect to see? A clear and concise description of what you expected to happen (or insert a code snippet).

What did you see instead? Under which circumstances? A clear and concise description of what you expected to happen (or insert a code snippet).

Environment

Possible Solution

Additional context Add any other context about the problem here.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

dinhxuanvu commented 2 years ago

Unfortunately, OLM resolver doesn't take in account InstallModes into the dependency resolution. So it depends on the operator authors to ensure all involved operators and the namespace to be compatible with InstallModes.

VannTen commented 1 year ago

Hi,

If I read that correctly, we can't use OLM to handle the dependency on a global install of a cluster operator ?

For example, if I want to use a Prometheus CR, I can't use this

properties:
- type: olm.gvk.required
  value:
    group: monitoring.coreos.com
    kind: Prometheus
    version: v1
- type: olm.gvk.required
  value:
    group: monitoring.coreos.com
    kind: PrometheusRule
    version: v1

To communicate the intention: "I need a prometheus-operator available in cluster, otherwise my operator will not work" ?