IBM / operand-deployment-lifecycle-manager

Managing the lifecycle for a group of operands
Apache License 2.0
32 stars 46 forks source link

OperandRequest documentation for namespace is not working as described #520

Closed kaczyns closed 4 years ago

kaczyns commented 4 years ago

/kind bug

What steps did you take and what happened: Install ODLM at cluster scope on OCP 4.4 (ROKS). Created an OperandRegistry with a namespace of openshift-operators, and scope of cluster. Created an OperandConfig and OperandRequest. The requested operator was deployed in the openshift-operators namespace, but the operand was also deployed in the openshift-operators namespace.

What did you expect to happen: Based on the documentation, I expected the operand to be deployed in the namespace where the OperandRequest was created.

Anything else you would like to add: The documentation here: https://github.com/IBM/operand-deployment-lifecycle-manager/blob/master/docs/design/operand-deployment-lifecycle-manager.md#operandregistry-spec in [4] says that the namespace is the namespace where the operator will be deployed.

The API documentation here: https://github.com/IBM/operand-deployment-lifecycle-manager/blob/fe9cd5fab224cdfa6061c537e6fe160020ef99b1/api/v1alpha1/operandregistry_types.go#L41 says that the namespace is where the operator's operand will be deployed.

It appears that the latter is correct, and the former is incorrect, based on my experience. However I don't know what was intended so I'm hoping that someone can help me sort out the correct behavior, and fix whichever documentation is incorrect.

Environment:

horis233 commented 4 years ago

@kaczyns Thanks for pointing it out.

For the single namespaced operator, (install mode is namespace or empty), operator subscription and operator CR will be deployed in namespace set in the OperandRegistry. https://github.com/IBM/operand-deployment-lifecycle-manager/blob/master/api/v1alpha1/operandregistry_types.go#L43

When setting the install mode to cluster, the ODLM will deploy the operator into openshift-operators namespace and deploy the operator CR into the namespace set in the OperandRegistry. https://github.com/IBM/operand-deployment-lifecycle-manager/blob/master/api/v1alpha1/operandregistry_types.go#L43.

This is the reason why you see the operator and operands are both deployed in openshift-operators namespace.

For your suggestion I expected the operand to be deployed in the namespace where the OperandRequest was created., we have a task to implement this function in the future release. https://github.com/IBM/operand-deployment-lifecycle-manager/issues/519.

We will open PRs to update the document and API document to clarify the confusion.

@Daniel-Fan Could you help to update the document @kaczyns mentioned above?

Daniel-Fan commented 4 years ago

PR was created to resolve the confusion of namespace in OperandRegistry https://github.com/IBM/operand-deployment-lifecycle-manager/pull/524

kaczyns commented 4 years ago

Thanks guys - I really appreciate the clarifications you've made here! I made one comment on the PR but feel free to disagree.