Handle conditions without a type of "Ready" #2837
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2796
In adding display of a lot more objects in #2765, we noticed that
computeReady
andcomputeMessage
weren't working as expected in some of the new object kinds (the most visible example was in CRDs in theReconciledObjectsTable
).What was happening here is that we were specifically looking for conditions with a
type
ofReady
orAvailable
, and assigningNotReady
to the status when that type didn't exist. It turns out that CRDs don't have a conditions object with a type of Ready, but that doesn't mean that they are failing.What made the most sense to me for now was to add a little extra handling for when Ready isn't there - if ANY conditions object has a status of "False", we assign
NotReady
and display that conditions message, otherwise, we assign "Ready" and display the message of the first conditions object in the list.The problems with this are:
normal
state is actuallyFalse
. There's no standard for indicating this.I found this which is a.....semi-recent discussion on setting some new standards for conditions
kubernetes/community#4521
Here's what the guidelines say right now:
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Here's a screenshot of the ReconciledObjectsTable after my changes: