-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Support for Multinamespace mode in Ansible operator #2361
Comments
Hi @aelbarkani, Shows that the behaviour faced is what is specified in your catalogue files ( CSV and OperatorGroup). Have you got a look in the steps described here? @estroz would you like to supplement this one? |
Hi @camilamacedo86. Yes, I've followed the steps described there. I've set the Multinamespace field to true in InstallModes (in the CSV). And indicated several namespaces in the targetNamespaces of the OperatorGroup:
OLM seems to be working fine. In my opinion it's rather an issue in operator-sdk. I've checked the documentation I've found this sentence here: |
Hi @aelbarkani, I checked it better and saw the error faced I understand that the OLM/CSV is not supported yet for Ansible operators. @estroz could you please double-check it as well? Also, do you think that any way we should keep it open in order to try to fix this scenario or close since is not supported yet? |
@aelbarkani @camilamacedo86 is correct, |
Bug ReportWhat did you do? Here are the steps I've followed:
What did you expect to see? What did you see instead? Under which circumstances?
Environment
0.15.1
1.13.6
Possible Solution Additional context |
@estroz I just added a comment with the bug report. I tested with the last version of operator sdk: 0.15.1 |
@estroz I am flagging it as a bug as part of "unable to setup ansible operators with OLM when they are using multiple namespaces". Please, feel free to review. Shows the problem is here. Also, we could check the helm impl for it which may can be facing the same. HI @aelbarkani, |
@camilamacedo86 sorry never coded in golang :( |
… to Ansible/Helm operators to handle [multinamespace caching] (#2522) **Motivation for the change:** - Integration with OLM: See that OLM allows and config the MultiNamespace via the option `targetNamespaces` via the OperatorGroup. We are also in the olm commands setting these values in the WATCH-NAMESPACE EnvVar. - Address the requirements requested in tasks such as #2494, #2078, (which are a very common scenario in the channels: I as an operator dev, would like to deploy the operator in the nsA and WATCH the resources in the nsB and do not all cluster ), Closes #2361
Feature Request
Is your feature request related to a problem? Please describe.
It seems that when WATCH_NAMESPACE is defined to multiple namespaces (separated by a comma) in an Ansible operator, the operator interprets it as a single namespace.
Here are the steps I've followed:
I expected the operator to watch the two namespaces I indicated in the operator group. However, the operator couldn't watch the two namespaces. In fact, the WATCH_NAMESPACE variable in the operator has been defined to "ns1,ns2", which the operator interprets as a single namespace.
Here is the error I'm getting:
E0103 12:12:47.436673 1 reflector.go:123] pkg/mod/k8s.io/client-go@v0.0.0-20191016111102-bec269661e48/tools/cache/reflector.go:96: Failed to list *unstructured.Unstructured: railsstacks.rails.onehq.com is forbidden: User "system:serviceaccount:marketplace:railsstack-operator" cannot list resource "railsstacks" in API group "rails.onehq.com" in the namespace "ns1,ns2
Describe the solution you'd like
When indicating multiple namespaces in WATCH_NAMESPACE separated by a comma (as injected by the OperatorGroup), the operator should interpret it as multiple namespaces and not as a single namespace.
The text was updated successfully, but these errors were encountered: