Skip to content

Commit b2def80

Browse files
authored
Merge pull request #12417 from sbueringer/pr-minimum
🌱 Set minimum=1 on ObservedGeneration and KubeadmConfig APIEndpoint bindPort
2 parents 5e5b506 + 5442777 commit b2def80

23 files changed

+29
-0
lines changed

api/addons/v1beta2/clusterresourceset_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ type ClusterResourceSetStatus struct {
129129

130130
// observedGeneration reflects the generation of the most recently observed ClusterResourceSet.
131131
// +optional
132+
// +kubebuilder:validation:Minimum=1
132133
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
133134

134135
// deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.

api/bootstrap/kubeadm/v1beta2/kubeadm_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ type APIEndpoint struct {
242242
// bindPort sets the secure port for the API Server to bind to.
243243
// Defaults to 6443.
244244
// +optional
245+
// +kubebuilder:validation:Minimum=1
245246
BindPort int32 `json:"bindPort,omitempty"`
246247
}
247248

api/bootstrap/kubeadm/v1beta2/kubeadmconfig_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ type KubeadmConfigStatus struct {
472472

473473
// observedGeneration is the latest generation observed by the controller.
474474
// +optional
475+
// +kubebuilder:validation:Minimum=1
475476
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
476477

477478
// deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.

api/controlplane/kubeadm/v1beta2/kubeadm_control_plane_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ type KubeadmControlPlaneStatus struct {
675675

676676
// observedGeneration is the latest generation observed by the controller.
677677
// +optional
678+
// +kubebuilder:validation:Minimum=1
678679
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
679680

680681
// lastRemediation stores info about last remediation performed.

api/core/v1beta2/cluster_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,7 @@ type ClusterStatus struct {
996996

997997
// observedGeneration is the latest generation observed by the controller.
998998
// +optional
999+
// +kubebuilder:validation:Minimum=1
9991000
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
10001001

10011002
// deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.

api/core/v1beta2/clusterclass_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,6 +1218,7 @@ type ClusterClassStatus struct {
12181218

12191219
// observedGeneration is the latest generation observed by the controller.
12201220
// +optional
1221+
// +kubebuilder:validation:Minimum=1
12211222
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
12221223

12231224
// deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.

api/core/v1beta2/machine_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ type MachineStatus struct {
544544

545545
// observedGeneration is the latest generation observed by the controller.
546546
// +optional
547+
// +kubebuilder:validation:Minimum=1
547548
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
548549

549550
// deletion contains information relating to removal of the Machine.

api/core/v1beta2/machinedeployment_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ type MachineDeploymentStatus struct {
430430

431431
// observedGeneration is the generation observed by the deployment controller.
432432
// +optional
433+
// +kubebuilder:validation:Minimum=1
433434
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
434435

435436
// selector is the same as the label selector but in the string format to avoid introspection

api/core/v1beta2/machinehealthcheck_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ type MachineHealthCheckStatus struct {
225225

226226
// observedGeneration is the latest generation observed by the controller.
227227
// +optional
228+
// +kubebuilder:validation:Minimum=1
228229
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
229230

230231
// targets shows the current list of machines the machine health check is watching

api/core/v1beta2/machinepool_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ type MachinePoolStatus struct {
147147

148148
// observedGeneration is the latest generation observed by the controller.
149149
// +optional
150+
// +kubebuilder:validation:Minimum=1
150151
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
151152

152153
// deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.

0 commit comments

Comments
 (0)