-
Notifications
You must be signed in to change notification settings - Fork 546
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
disambiguation of installMode
#1487
Comments
(1), where the operator is going to run, is unrelated to installMode. You can create a CSV or a Subscription in any namespace, and that is where the operator will install and run.
The one place where installModes can affect permissions is when:
Then - RBAC that would normally be generated at the namespace-level will be generated at the cluster level (as ClusterRoles), which seems correct given the scenario described above - the operator is configured to watch all namespaces, and has indicated a requirement to have certain permissions in any namespace it watches. With this explanation, do you still feel there is some ambiguity / conflation of ideas? Or have I missed what you were getting at? You raised some other good points:
That is true, but this simplification makes requested permissions easier to reason about, install, and configure. I don't think it will stay this way forever, we just want to have a good UX around it.
It's not officially deprecated, but there are enough caveats to using it that we don't surface it or advertise it. (For example, installing two MultiNamespace operators that share an CRD and deploy a ConversionWebhook will cause a problem for one of the two operators).
OwnNamespace is called out precisely because of the issues you mention (plus the additional issue that it will grant anyone with the ability to create workloads in the installation namespace the full permission of the operator). |
@ecordell thanks for your answer. it is clearer now. That's another area where it's confusing for me: the permissions an operator needs in the namespace it runs, are different than the permissions it needs on a namespace it needs to watch, which is different from the permissions a user needs to create/view the operator's CRs. Can you explain how all of that works? |
also following the reasoning that in general I realize this could be just a bug of that operator, but could you explain how all that process should work? @ecordell |
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. |
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. |
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. |
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. |
This issue is stale. Closed. Please feel free to reopen if needed. |
Feature Request
I think the installMode is conflating too many concepts:
I think #1 should be an installation time choice that has nothing to do with the rest. It can be a filed in the OLM UI, and I think in the new versions of the OLM UI, the user will be allowed to create the namespace on the fly.
#3 makes sense only if the operator watches namespaced resources, which can be deducted from the csv. Also it's not obvious to assume that if the operator watches multiple resources and they are namespaced, then the watched namespaces will be the same for all resources.
If the operator watches a mix of cluster and namespaced resources then the question #3 does not make much sense. The safest thing would be probably to ask the question for each of the namespaced resource.
It seems to be that the MultipleNamespace option is not supported and could probably be removed.
Also the OwnNamespace is a particular case of the SingleNamspace option and it's hard to see why it needs to be called out. However, it should be noted that letting an operator watch the same namespace in which the operator pod is installed is generally to be considered a bad practice if the operator sets a finalizer. In fact under this circumstance, an unavoidable race condition occurs in which when the namespace is deleted, if the operator pod is destroyed before all the finalizers had time to run, some CRs will be stuck and the namespace will not be successfully deleted.
I'd recommend removing the OwnNamespace option, and giving a warning to the customer if they try to set an operator to watch the same namespace in which it is installed using the SingleNamespace option.
The text was updated successfully, but these errors were encountered: