Skip to content

Commit 5deff4b

Browse files
committed
Review feedback
1 parent ffc87ea commit 5deff4b

File tree

11 files changed

+341
-12
lines changed

11 files changed

+341
-12
lines changed

api/compute/v1alpha1/machinereservation_types.go

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ import (
1212
// ReservationSpec defines the desired state of Reservation
1313
type 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
1919
type 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+
3656
type ReservationPoolStatus struct {
3757
Name string `json:"ref,omitempty"`
3858
State ReservationState `json:"state,omitempty"`

api/compute/v1alpha1/zz_generated.deepcopy.go

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/applyconfigurations/compute/v1alpha1/reservationcondition.go

Lines changed: 77 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/applyconfigurations/compute/v1alpha1/reservationspec.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/applyconfigurations/compute/v1alpha1/reservationstatus.go

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/applyconfigurations/internal/internal.go

Lines changed: 36 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/applyconfigurations/utils.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/openapi/zz_generated.openapi.go

Lines changed: 77 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)