Closed kaczyns closed 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?
PR was created to resolve the confusion of namespace in OperandRegistry https://github.com/IBM/operand-deployment-lifecycle-manager/pull/524
Thanks guys - I really appreciate the clarifications you've made here! I made one comment on the PR but feel free to disagree.
/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
ofopenshift-operators
, andscope
ofcluster
. Created an OperandConfig and OperandRequest. The requested operator was deployed in theopenshift-operators
namespace, but the operand was also deployed in theopenshift-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 thenamespace
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:
kubectl version
): v1.17.1+6af3663/etc/os-release
): ? I don't have access to the nodes, it's on ROKS