@@ -12,12 +12,13 @@ import (
1212// ReservationSpec defines the desired state of Reservation
1313type ReservationSpec struct {
1414 Pools []corev1.LocalObjectReference `json:"pools"`
15- Resources corev1alpha1.ResourceList `json:"capabilities ,omitempty"`
15+ Resources corev1alpha1.ResourceList `json:"resources ,omitempty"`
1616}
1717
1818// ReservationStatus defines the observed state of Reservation
1919type ReservationStatus struct {
20- Pools []ReservationPoolStatus `json:"pools,omitempty"`
20+ Pools []ReservationPoolStatus `json:"pools,omitempty"`
21+ Conditions []ReservationCondition `json:"conditions,omitempty"`
2122}
2223
2324// ReservationState is the state of a Reservation.
@@ -33,6 +34,25 @@ const (
3334 ReservationStateRejected ReservationState = "Rejected"
3435)
3536
37+ // ReservationConditionType is a type a ReservationCondition can have.
38+ type ReservationConditionType string
39+
40+ // ReservationCondition is one of the conditions of a volume.
41+ type ReservationCondition struct {
42+ // Type is the type of the condition.
43+ Type ReservationConditionType `json:"type"`
44+ // Status is the status of the condition.
45+ Status corev1.ConditionStatus `json:"status"`
46+ // Reason is a machine-readable indication of why the condition is in a certain state.
47+ Reason string `json:"reason"`
48+ // Message is a human-readable explanation of why the condition has a certain reason / state.
49+ Message string `json:"message"`
50+ // ObservedGeneration represents the .metadata.generation that the condition was set based upon.
51+ ObservedGeneration int64 `json:"observedGeneration,omitempty"`
52+ // LastTransitionTime is the last time the status of a condition has transitioned from one state to another.
53+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
54+ }
55+
3656type ReservationPoolStatus struct {
3757 Name string `json:"ref,omitempty"`
3858 State ReservationState `json:"state,omitempty"`
0 commit comments