Skip to content

Commit

Permalink
Add maxItems to all condition fields
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Büringer [email protected]
  • Loading branch information
sbueringer committed Oct 4, 2024
1 parent 9569cd6 commit d11927c
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions config/crd/bases/cluster.x-k8s.io_machinepools.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions docs/proposals/20240916-improve-status-in-CAPI-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ type MachineStatus struct {
// +optional
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=32
Conditions []metav1.Condition `json:"conditions,omitempty"`

// Other fields...
Expand Down Expand Up @@ -488,6 +489,7 @@ type MachineSetStatus struct {
// +optional
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=32
Conditions []metav1.Condition `json:"conditions,omitempty"`

// Other fields...
Expand Down Expand Up @@ -616,6 +618,7 @@ type MachineDeploymentStatus struct {
// +optional
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=32
Conditions []metav1.Condition `json:"conditions,omitempty"`

// Other fields...
Expand Down Expand Up @@ -730,6 +733,7 @@ type ClusterStatus struct {
// +optional
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=32
Conditions []metav1.Condition `json:"conditions,omitempty"`

// ControlPlane groups all the observations about Cluster's ControlPlane current state.
Expand Down Expand Up @@ -981,6 +985,7 @@ type KubeadmControlPlaneStatus struct {
// +optional
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=32
Conditions []metav1.Condition `json:"conditions,omitempty"`

// Other fields...
Expand Down Expand Up @@ -1100,6 +1105,7 @@ type MachinePoolStatus struct {
// +optional
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=32
Conditions []metav1.Condition `json:"conditions,omitempty"`

// Other fields...
Expand Down
1 change: 1 addition & 0 deletions exp/addons/api/v1beta1/clusterresourceset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ type ClusterResourceSetV1Beta2Status struct {
// +optional
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=32
Conditions []metav1.Condition `json:"conditions,omitempty"`
}

Expand Down
1 change: 1 addition & 0 deletions exp/api/v1beta1/machinepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ type MachinePoolV1Beta2Status struct {
// +optional
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=32
Conditions []metav1.Condition `json:"conditions,omitempty"`

// readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when Machine's Ready condition is true.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ spec:
- status
- type
type: object
maxItems: 32
type: array
x-kubernetes-list-map-keys:
- type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ spec:
- status
- type
type: object
maxItems: 32
type: array
x-kubernetes-list-map-keys:
- type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ spec:
- status
- type
type: object
maxItems: 32
type: array
x-kubernetes-list-map-keys:
- type
Expand Down
3 changes: 3 additions & 0 deletions internal/test/builder/v1beta2_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ type Phase1ObjStatusV1Beta2 struct {
// +optional
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=32
Conditions []metav1.Condition `json:"conditions,omitempty"`
}

Expand Down Expand Up @@ -201,6 +202,7 @@ type Phase2ObjStatus struct {
// +optional
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=32
Conditions []metav1.Condition `json:"conditions,omitempty"`

// +optional
Expand Down Expand Up @@ -284,6 +286,7 @@ type Phase3ObjStatus struct {
// +optional
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=32
Conditions []metav1.Condition `json:"conditions,omitempty"`
}

Expand Down

0 comments on commit d11927c

Please sign in to comment.