Skip to content

Commit 9fa061f

Browse files
committed
fix: linting require string pointer
Signed-off-by: Amit Mendelevitch <[email protected]>
1 parent 3902ba8 commit 9fa061f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

machine/v1beta1/types_gcpprovider.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,23 @@ const (
8383
type GCPReservationAffinity struct {
8484
// consumeReservationType indicates whether the instance should consume from any reservation or a specific reservation.
8585
// Valid values are "NO_RESERVATION", "ANY_RESERVATION" and "SPECIFIC_RESERVATION".
86+
// +required
8687
// +kubebuilder:validation:Enum=NO_RESERVATION;ANY_RESERVATION;SPECIFIC_RESERVATION
87-
ConsumeReservationType string `json:"consumeReservationType"`
88+
ConsumeReservationType string `json:"consumeReservationType,omitempty"`
8889
// key is the reservation key of the specific reservation to consume from.
90+
// The maximum length is 63 characters, and the name must conform to RFC1035.
8991
// Required if consumeReservationType is set to "SPECIFIC_RESERVATION".
92+
// When consumeReservationType is not "SPECIFIC_RESERVATION", this field must be empty.
9093
// +optional
91-
Key string `json:"key,omitempty"`
94+
// +kubebuilder:validation:MaxLength=63
95+
Key *string `json:"key,omitempty"`
9296
// values is the list of reservation values of the specific reservation to consume from.
97+
// Each value can have a maximum length of 63 characters, and the name must conform to RFC1035.
9398
// Required if consumeReservationType is set to "SPECIFIC_RESERVATION".
99+
// When consumeReservationType is not "SPECIFIC_RESERVATION", this field must be empty.
94100
// +optional
101+
// +kubebuilder:validation:items:MaxLength=63
102+
// +kubebuilder:validation:MaxItems=50
95103
Values []string `json:"values,omitempty"`
96104
}
97105

0 commit comments

Comments
 (0)