-
Notifications
You must be signed in to change notification settings - Fork 135
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
Report error in status if more than one DataScienceCluster installed #687
Conversation
Actually, should be revisited after issue #645 integration. |
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
ref: #644 |
do we want to add the same status update for DSCI as well? |
Good question. Probably it will not do any harm. Just IIUC it is more complicated for the user to encounter. Like install the operator twice. When deploying twice just the DataScienceCluster is much easier. Well, if there are no objections I'll add it as well. To both DSCI and DSC |
ok, lets do like this way. |
I'm ok with several patches in one PR. Just thought a bit about that. May be there should exist some sort of Webhook to prevent such configurations at the first place? |
The instance will be used to report failed status for > 1 case. Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
In case of > 1 dataclusters installed report error condition in the kubernetes status which previously was only reported in the operator logs. Add DuplicateDataScienceCluster string constant for that. Reuse `instance` variable for reportError. Fixes: opendatahub-io#644 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
849bdde
to
1e4b6f3
Compare
Repeat for DSCInitialization the same logic as for DataScienceCluster. The check is performed in both DSCInitialization and DataScienceCluster controllers. Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
1e4b6f3
to
d048f2a
Compare
i do not want to enforce git webhook (if this is the webhook you meant) or it will be a new commit everytime and difficult for reviewer, we do have squash-merge for PR so the committer (or reviewer) is responsibile to get a clean history for the PR before merge |
No, I meant kubernetes validating webhook, like https://book.kubebuilder.io/cronjob-tutorial/webhook-implementation |
ok, but then it is a totally different story which will add new webhook in api to validate fields etc. |
Sure, it's a further enhancement and it's good to get proper reporting first (I've updated the PR BTW and added phaseError set like in some other places)
Sounds great actually! |
create issue : #693 |
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 NOT APPROVED This pull-request has been approved by: zdtsw The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…pendatahub-io#687) * DSCc, DSCIc: move len > 1 check after getting first instance. In case of > 1 dataclusters installed report error condition in the kubernetes status which previously was only reported in the operator logs. Add DuplicateDataScienceCluster string constant for that. * DSCc, DSCIc: set status for > 1 DSCInitialization Repeat for DSCInitialization the same logic as for DataScienceCluster. The check is performed in both DSCInitialization and DataScienceCluster controllers. Fixes: opendatahub-io#644 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com> --------- Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com> (cherry picked from commit 4e95d43)
Report error in status if more than one DataScienceCluster installed
V2
phase
tophaseError
as wellDescription
How Has This Been Tested?
oc describe datasciencecluster.datasciencecluster.opendatahub.io/<NAME>
for both clustersBoth clusters report like
For DSCInitialization checked both DataScinceCluster:
and DSCIinitialization:
Merge criteria: