You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works, except that operator-framework/api defines a Subcription resource like this:
type Subscription struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec *SubscriptionSpec `json:"spec"`
// +optional
Status SubscriptionStatus `json:"status"`
}
Which means that the serialized output always includes a status element with a null status.lastUpdated field. Submitting the serialized manifest fails with:
error: error validating "STDIN": error validating data: ValidationError(Subscription.status): missing required field "lastUpdated" in com.coreos.operators.v1alpha1.Subscription.status; if you choose to ignore these errors, turn validation off with --validate=false
Is there a canonical method for serializing these resources without including the status field? Is there a reason that the Subscription type isn't defined like:
type Subscription struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec *SubscriptionSpec `json:"spec"`
// +optional
Status *SubscriptionStatus `json:"status,omitempty"`
}
If the Status field were nil-able, it would be easy to get the desired output.
The text was updated successfully, but these errors were encountered:
I would like to serialize a Subscription resource to YAML using code like this:
This works, except that
operator-framework/api
defines aSubcription
resource like this:Which means that the serialized output always includes a
status
element with a nullstatus.lastUpdated
field. Submitting the serialized manifest fails with:Is there a canonical method for serializing these resources without including the
status
field? Is there a reason that theSubscription
type isn't defined like:If the
Status
field were nil-able, it would be easy to get the desired output.The text was updated successfully, but these errors were encountered: