-
Notifications
You must be signed in to change notification settings - Fork 307
Closed
Description
I'm using the CustomResourceDefinition template as shown in the examples, all code around crds is working well.
Recently I've attempted to get some status values from a clusterapi resource:
status:
<snip>
controlPlaneReady: true
infrastructureReady: true
observedGeneration: 2
phase: Provisioned
My Crd has code like so:
public class CrdCluster : CustomResourceDefinitions.CustomResource<CrdClusterSpec, CrdClusterStatus>
{
public override string ToString() { echo ""; }
}
public class CrdClusterSpec
{
[JsonPropertyName("asdf")]
public string asdf { get; set; }
}
public class CrdClusterStatus : V1Status
{
[JsonPropertyName("infrastructureReady")]
public bool infrastructureReady { get; set; }
[JsonPropertyName("controlPlaneReady")]
public bool controlPlaneReady { get; set; }
[JsonPropertyName("phase")]
public string phase { get; set; }
}
Yet, in my code when I have an instance of the crd, 'cluster.CStatus' is null.
What am I missing? The 'CStatus' is supposed to be the representation of the 'status' right?
update
I modified the CustomResourceDefinition.cs from having 'CStatus' to 'Status' and now everything is working as expected. So, why was it CStatus instead of Status?
Metadata
Metadata
Assignees
Labels
No labels