-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat(conditions): provide status information using conditions #336
Conversation
I think the |
I think the status/condition makes sense but agree that it's confusing - I think the naming/message is what is confusing, though. If the Cryostat CR is configured with 0 reports replicas, then the value that the Maybe |
Adding onto this, it might be helpful to add a reason or message when |
It appears that the Deployment |
I think that sounds okay... it seems like it would be encoding the same kind of information I was looking for in my last comment. I have no idea if this is standard practice or idiomatic for an operator/controller, though. |
There unfortunately seems to be very little standard practice for reporting status information of the operands. I have noticed some operators that include all conditions for the Deployment. There should be up to 3: Available, Progressing, and ReplicaFailure. The latter seems absent unless an error actually occurs. We could just include these, and if the reports deployment is disabled, skip those conditions. |
Okay, seems to make sense. |
I think that second approach makes a lot of sense and the extra bit about the |
The second approach being one table of Conditions for everything, right? The Status in the Cryostat CR list is okay for that one. All of the Conditions with status |
I've finished implementing the second approach where all Deployment conditions are merged into the single Conditions property, and reports deployment conditions are omitted when not enabled. How does the code look now? |
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 otherwise, just that one stylistic nitpick
I was trying to test out the PR yesterday but ran into a couple issues. During Secondly, it's been a while since I tested an -operator PR but in order to bring in your changes regarding Conditions, it's as simple as checking out the PR branch and deploying the Operator as usual? "Usual" means either using the bundle format or through manual install? For some reason, during the time CRC was working and I could interact properly with the cluster, my web console wasn't showing the Conditions you've added in the PR, even though I created a Cryostat CRD with reports enabled. Could you share the exact steps I should be following to properly deploy an Operator with the changes included? Again, I can share pictures after the team meeting. |
Logs: Degraded machine-config operator Operator deployment workflow ending in a server error (400 status) When attempting The errors can probably be resolved by reinstalling my CRC/Openshift setup but unfortunately, I wasn't able to get a screenshot of my Operator Conditions before the server error occurred. However, I'm assuming my web console will still show the incorrect Conditions like it did yesterday. Could you let me know where I'm going wrong? |
Thanks for mentioning this. I thought I had filed an issue for this problem but apparently not. I've done so now: #341. On CRC, you'll see some downtime in the Console and with OC while the oauth-openshift pod starts up. We'll have to see if there's anything we can do to improve this.
Sure, I've pushed a bundle image you can use to easily test this PR. |
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.
Conditions look good when I tested it with cluster-bot
Ah, okay that makes sense then. I kept restarting CRC but this time I waited and was prompted to re-login in order to obtain my OAuth API token.
Thanks for pushing the image for me. Out of curiosity, what steps did you follow to produce a bundle image out of your local file changes? Was it |
Good question. Here are the steps I took:
|
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.
Everything is working now and the Conditions look good.
This PR adds a conditions field to the Cryostat CRD Status. So far there are 3 types of conditions the operator will report on:
There are likely other things we can add here, but I think this is a good start. The standards doc says to consider the condition types as part of the API, so we should be careful about which types we add.
Examples in OpenShift Console:
Fixes: #203