diff --git a/api/v1alpha1/gateway_types.go b/api/v1alpha1/gateway_types.go index 3e59f67688..6468c7281d 100644 --- a/api/v1alpha1/gateway_types.go +++ b/api/v1alpha1/gateway_types.go @@ -269,18 +269,22 @@ const ( // GatewayCondition is an error status for a given route. type GatewayCondition struct { // Type indicates the type of condition. + // +required Type GatewayConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=GatewayConditionType"` // Status describes the current state of this condition. Can be "True", // "False", or "Unknown". + // +required Status core.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` // Message is a human-understandable message describing the condition. - // +optional + // This field may be empty. + // +required Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` // Reason indicates why the condition is in this state. - // +optional + // This field must not be empty. + // +required Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` // LastTransitionTime indicates the last time this condition changed. - // +optional + // +required LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,5,opt,name=lastTransitionTime"` } @@ -321,18 +325,22 @@ const ( // ListenerCondition is an error status for a given listener. type ListenerCondition struct { // Type indicates the type of condition. + // +required Type ListenerConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ListenerConditionType"` // Status describes the current state of this condition. Can be "True", // "False", or "Unknown". + // +required Status core.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` // Message is a human-understandable message describing the condition. - // +optional + // This field may be empty. + // +required Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` // Reason indicates why the condition is in this state. - // +optional + // This field must not be empty. + // +required Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` // LastTransitionTime indicates the last time this condition changed. - // +optional + // +required LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,5,opt,name=lastTransitionTime"` } diff --git a/api/v1alpha1/gatewayclass_types.go b/api/v1alpha1/gatewayclass_types.go index 92722eda40..014b222a2a 100644 --- a/api/v1alpha1/gatewayclass_types.go +++ b/api/v1alpha1/gatewayclass_types.go @@ -148,8 +148,10 @@ type GatewayClassStatus struct { // Support: Core, unless otherwise specified. type GatewayClassCondition struct { // Type of this condition. + // +required Type GatewayClassConditionType `json:"type" protobuf:"bytes,1,opt,name=type"` // Status of this condition. + // +required Status GatewayClassConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"` // Reason is a machine consumable string for the last @@ -157,17 +159,19 @@ type GatewayClassCondition struct { // string. Reason will be defined by the controller. // // Support: Custom; values will be controller-specific. + // This field must not be empty. // - // +optional - Reason *string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` + // +required + Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` // Message is a human readable reason for last transition. + // This field may be empty. // - // +optional - Message *string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"` + // +required + Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"` // LastTransitionTime is the time of the last change to this condition. // - // +optional - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,5,opt,name=lastTransitionTime"` + // +required + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,5,opt,name=lastTransitionTime"` } // +kubebuilder:object:root=true