-
Notifications
You must be signed in to change notification settings - Fork 116
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
Adding ObservedGeneration in the CRD #650
Comments
Hey @Shashankft9 , @RavinaChidambaram - can you elaborate a little on your broader use case? What sort of changes/states are you trying to monitor, that are tough to track with the existing 'status'? |
hello @gerlowskija, we use status of In this case, without |
I guess this is the bit I'm particularly curious about. The main thing I can think of that wouldn't appear in the status would be pod or statefulset-level settings like env-vars, resources, etc - is that representative of the sort of things you don't have a good way to poll for? Or is there another common example? My worry I guess is that the observedGeneration/lastTransitionTime approach doesn't give enough granularity to be useful in practice. It wouldn't give any way to distinguish between multiple resource changes made in quick succession. Or between a truly substantive "status" update and a (e.g.) pod-readiness blip (which also impacts SolrCloudStatus afaict). Even for a substantive update, many spec changes require multiple steps and update "status" multiple times throughout - so in practice there can be a big gap between "the status changed" and "the user-requested change is complete". It feels like observedGeneration might send a wrong (or at least incomplete?) signal to your provisioner/UI much of the time. Have you thought much about those scenarios? Is there maybe something I'm missing? I'm not against the approach btw - I just want to make sure it'll work before we build. |
I hear your concern, maybe I can give some examples of status in other CRs that can help explain where I am coming from. Example 1:
now the idea is that this Example 2:
now looking at this status, I know the knative controllers worked on the last cr spec change, because the I may not be able to articulate it well, but I recently saw a good talk on a kubernetes CRD status design, just the first few mins where scott is covering the tldr might help - https://youtu.be/iNp-fsffIgQ?t=70
we wanted to make "ack-to-provisioner" process event driven instead of polling, because if we go the polling route, we will have to write custom logic for each operator based service, versus implementing something at CR status level, which will save us from lot of code maintenance since most of the other operators already follow this pattern I think.
Yes, we have thought about this, and to handle this, we have a check where we only send the ack for success scenarios right now, specifically when a condition like this becomes true: Apologies if I have gone south of what you actually asked. |
Not at all - I appreciate the very detailed response @Shashankft9! The YT link was especially helpful; it made a good starting point for me. Thanks for your patience while I read up on this stuff! I think I was initially under the misapprehension that 'observedGeneration' was "just" a counter that would increase at each "status" update. Having it driven by the It's also clearly a best practice, given that it's in StatefulSet and other native resource types. I'm +1 to the approach around |
Currently, its hard to tell if solr cloud deployment has changed from "x" to "y" state, or if it has changed at all after I have done some changes in the CR.
Perhaps if we can add Observed Generator field and/or something like "LastTransitionTime", the CR could tell more about the current state of the solr cloud? This could be a good basis for a requirement we have, where we are tracking the transition of solr from "x" to "y".
Expected status:
The text was updated successfully, but these errors were encountered: