https://rancher.com/ logo
Title
b

big-judge-33880

05/26/2023, 3:45 PM
What exactly does the State field in the rancher GUI pick up on? I have some custom resources that are ostensibly fine, but Rancher displays them as “Error” state
The resource has a fairly complex status: {} structure - I’m wondering if maybe rancher is picking up on status.conditions [ - lastTransitionTime: “2023-05-02T17:35:40.388252Z” reason: ClusterRequiresUpgrade status: “True” type: PendingUpgrade ]
b

billions-vase-14972

05/26/2023, 5:01 PM
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

big-judge-33880

05/26/2023, 7:21 PM
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
state": {
"error": true,
"message": "",
"name": "error",
"transitioning": false
}