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

[Question] How the dependency feature suppose to work? #1010

Closed
ricardozanini opened this issue Aug 27, 2019 · 2 comments
Closed

[Question] How the dependency feature suppose to work? #1010

ricardozanini opened this issue Aug 27, 2019 · 2 comments

Comments

@ricardozanini
Copy link

I was looking for a feature to add two Operators as dependencies to a custom operator that I'm working on. I understand that the OLM dependency feature would perfectly fit for my use case.

After reading the docs (Dependency Resolution) and (Required CRDs), I updated my ClusterServiceVersion to add the required dependencies as follows:

customresourcedefinitions:
    required:
      - name: infinispans.infinispan.org
        version: v1
        kind: Infinispan
        displayName: Infinispan Cluster
        description: Represents a Infinispan cluster used internally by the Data Index Service
      - name: kafkas.kafka.strimzi.io
        version: v1beta1
        kind: Kafka
        displayName: Strimzi Kafka Cluster
        description: Represents a Kafka cluster used internally by the Data Index Service
    owned:
      - version: v1alpha1
        kind: MyKind
        description: My Kind Description
        displayName: MyKindDisplayName
        name: mykind.namespace.example.org

In this case, this operator will leverage from Infinispan and Kafka operators.

I deployed the application into Quay and pushed using operator-courier. Then created an entry into the OperatorHub:

apiVersion: operators.coreos.com/v1
kind: OperatorSource
metadata:
  name: dummy-operator
  namespace: openshift-marketplace
spec:
  type: appregistry
  endpoint: https://quay.io/cnr
  registryNamespace: ricardozanini
  displayName: "My Operator"

After that, I created a subscription to the operator into a new namespace. The operator wasn't installed, although the installed-custom-namespace-5767c568db-85ghx pod and the subscription were successfully created.

What features I was expecting:

  1. During the subscription, an interface hint about the required dependencies for this custom operator taken from the ClusterServiceVersion file (required.displayName and required.description)
  2. Those dependencies automatically installed together with my custom operator

After manually installing both dependencies, my custom operator was successfully deployed. This is nice since it's enforcing the dependencies, but from an user point of view I missed the mentioned expected features.

I suppose I did something wrong. I was hoping that you could help me figure this out. 😃

Many thanks!

@ecordell
Copy link
Member

Hi @ricardozanini - Your expectations are spot on.

Am I guessing correctly that you are using openshift 4.1.z? If so, there is an issue in 4.1.z that prevents OLM from doing automatic dependency resolution.

The easiest workaround is, as you suggest, to manually select the dependency to install. This issue is fixed in 4.2.

@ricardozanini
Copy link
Author

Hi @ecordell!

Yes, I'm on 4.1.z, that's the reason why I'm seeing this then. Many thanks for your explanation. Makes sense, I'll set the expectations of my team regarding this issue on 4.1.z.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants