This message was deleted.
# general
a
This message was deleted.
b
The resource has a fairly complex status: {} structure - I’m wondering if maybe rancher is picking up on status.conditions [ - lastTransitionTime: “2023-05-02T173540.388252Z” reason: ClusterRequiresUpgrade status: “True” type: PendingUpgrade ]
b
By default the state is referencing the
metadata.state
object of a resource - which is returned by the Rancher API. You can see more information from the api itself on a particular resource by navigating to
<rancher_instance>/v1/my.custom.resource.definition
b
Can I do that for downstream cluster resources too?
ah I see rancher adds the metadata.state, but is there some sort of condition the custom resource needs to have for rancher to not add an error state to the object within its own API?
I get error: true with no message, but my resource exposes no current active error condition
Copy code
state": {
"error": true,
"message": "",
"name": "error",
"transitioning": false
}
b
The way I understand it is that the metadata.state will only become Active when all of the status conditions are met. I found this blog post which may shed some light on how this is accomplished
❤️ 1
b
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties seems to indicate this is not a valid interpretation of object conditions though, but I guess that’s best discussed in an issue: • For some conditions,
True
represents normal operation, and for some conditions,
False
represents normal operation. (“Normal-true” conditions are sometimes said to have “positive polarity”, and “normal-false” conditions are said to have “negative polarity”.) Without further knowledge of the conditions, it is not possible to compute a generic summary of the conditions on a resource.
b
That's a good point! This would be a good question to bring up, would you mind opening an issue on the main Rancher repo?
b
glitch crab 1