@@ -12,12 +12,13 @@ import (
12
12
// ReservationSpec defines the desired state of Reservation
13
13
type ReservationSpec struct {
14
14
Pools []corev1.LocalObjectReference `json:"pools"`
15
- Resources corev1alpha1.ResourceList `json:"capabilities ,omitempty"`
15
+ Resources corev1alpha1.ResourceList `json:"resources ,omitempty"`
16
16
}
17
17
18
18
// ReservationStatus defines the observed state of Reservation
19
19
type ReservationStatus struct {
20
- Pools []ReservationPoolStatus `json:"pools,omitempty"`
20
+ Pools []ReservationPoolStatus `json:"pools,omitempty"`
21
+ Conditions []ReservationCondition `json:"conditions,omitempty"`
21
22
}
22
23
23
24
// ReservationState is the state of a Reservation.
@@ -33,6 +34,25 @@ const (
33
34
ReservationStateRejected ReservationState = "Rejected"
34
35
)
35
36
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
+
36
56
type ReservationPoolStatus struct {
37
57
Name string `json:"ref,omitempty"`
38
58
State ReservationState `json:"state,omitempty"`
0 commit comments