-
Notifications
You must be signed in to change notification settings - Fork 667
Operator defined install namespace #3862
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
Conversation
spadgett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is still WIP, but wanted to get you feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
operatorframework.io/suggested-namespace
We should change the var name here since it's not really forced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const isOpenshiftNamespace = (ns: string): boolean => { | |
| const isOpenShiftNamespace = (ns: string): boolean => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid inline styles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd call this enableMonitoringCheckbox
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid inline styles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const newNamespace = { | |
| const newNamespace: K8sResourceCommon = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need an else here, otherwise we'll just use whatever the previous value was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use catch
| (err) => setError(err.message), | |
| .catch(({ message = 'Could not create namespace.' }) => setError(message), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use .then(...).catch(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should consider converting this to async/await, which would simplify things
...d/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-subscribe.tsx
Outdated
Show resolved
Hide resolved
|
Based on https://github.com/openshift/enhancements/blob/master/enhancements/olm/olm-managed-operator-metrics.md#fulfilling-namespace-and-rbac-requirements, it doesn't sound like we need the checkbox.
I'm not sure it should be the console's responsibility to update RBAC for the service account. @shawn-hurley @bparees ? |
Disregard, I see this is discussed here in openshift/openshift-origin-design#307 (comment) |
|
the "own namespace" cases where you are using an existing namespace do not offer the "enable monitoring" checkbox. I think we should be offering that checkbox for any operator that requests monitoring, regardless of whether you are installing to its chosen namespace, or another one. Though it is a bit tricky in the case that you are picking a namespace that can't be monitored (isn't openshift-*) (you can still label it for monitoring but nothing will happen). i'd also like @s-urbaniak and @lilic to review the "warning text" that goes with the enable monitoring checkbox. I'm not sure it's sufficiently cautionary in its current form. |
|
Just wanted to mention that the UX design always has a separate radio option for selecting the targetNamespace, regardless if it is being created at this point or not: openshift/openshift-origin-design#307 Just noticed that wasn't what was being conveyed in the initial comment's screenshots, though Jakub and I were working out this design basically simultaneously when this PR was opened. |
lilic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left suggestion for the note.
Just a side note, we should not merge the PR until the e2e tests that were agreed with the OLM team are in place in origin. Not sure there is a PR or work on that for that already @shawn-hurley @awgreene?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in the other PR openshift/openshift-origin-design#307 (comment) we really want to warn the user that if they install a non redhat operator into an openshift namespace with enabled monitoring, that this voids user support. We should be clear on that, as that is the potential consequence of this action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I underline the severity of enabling monitoring in this case too. It voids user support as @lilic mentioned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I underline the severity of enabling monitoring in this case too. It voids user support
@lilic @s-urbaniak @bparees in that case are we sure we want to give the user and way how to fiddle with the monitoring? Seeing all the comments (here and in the design PR) I wonder if we won't shoot ourselves into the leg with this single checkbox, since the variety of all the use-cases is just and potential damages is just too big.
Thinking if it wont be for the best to leave it out for now and just aim for the suggested-namespace.
Thoughts ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lilic @s-urbaniak @bparees in that case are we sure we want to give the user and way how to fiddle with the monitoring?
yes because we want to make the install story for redhat operators better than it currently is. that's the primary purpose of this feature.
46e067d to
4d4a0a5
Compare
benjaminapetersen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: benjaminapetersen, jhadvig The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/refresh |
Story: https://issues.redhat.com/browse/CONSOLE-1670
If the operator has defined a recommended namespace where it should be installed, it should be shown to the user upon the install process, so user can either honor the operator recommendation or pick an available namespace based on the install mode.
In case the operator is recommending an install namespace, there are also two cases:
or user can pick

openshift-operatorsnamespace
or pick any available namespaceIn case the operator is not recommending an install namespace, there are also two cases:
openshift-operatorsnamespace will be available in the disabled namespace dropdownWorked the design out with @itsptk
Still working on the PR.
/assign @spadgett
@benjaminapetersen fyi