Skip to content

Commit 53bc234

Browse files
generation min value to 1
1 parent 0db77b1 commit 53bc234

13 files changed

+52
-52
lines changed

machineconfiguration/v1/types_machineconfignode.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ type MachineConfigNodeStatus struct {
114114
// observedGeneration represents the generation of the MachineConfigNode object observed by the Machine Config Operator's controller.
115115
// This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.
116116
// +kubebuilder:validation:XValidation:rule="self >= oldSelf", message="observedGeneration must not decrease"
117-
// +kubebuilder:validation:Minimum=0
117+
// +kubebuilder:validation:Minimum=1
118118
// +optional
119119
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
120120
// configVersion describes the current and desired machine config version for this node.
@@ -143,17 +143,17 @@ type MachineConfigNodeStatusPinnedImageSet struct {
143143
Name string `json:"name"`
144144
// currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node.
145145
// +kubebuilder:validation:XValidation:rule="self >= oldSelf", message="currentGeneration must not decrease"
146-
// +kubebuilder:validation:Minimum=0
146+
// +kubebuilder:validation:Minimum=1
147147
// +optional
148148
CurrentGeneration int32 `json:"currentGeneration,omitempty"`
149149
// desiredGeneration is the generation of the pinned image set that is targeted to be pulled and pinned on this node.
150150
// +kubebuilder:validation:XValidation:rule="self >= oldSelf", message="desiredGeneration must not decrease"
151-
// +kubebuilder:validation:Minimum=0
151+
// +kubebuilder:validation:Minimum=1
152152
// +optional
153153
DesiredGeneration int32 `json:"desiredGeneration,omitempty"`
154154
// lastFailedGeneration is the generation of the most recent pinned image set that failed to be pulled and pinned on this node.
155155
// +kubebuilder:validation:XValidation:rule="self >= oldSelf", message="lastFailedGeneration must not decrease"
156-
// +kubebuilder:validation:Minimum=0
156+
// +kubebuilder:validation:Minimum=1
157157
// +optional
158158
LastFailedGeneration int32 `json:"lastFailedGeneration,omitempty"`
159159
// lastFailedGenerationError is the error explaining why the desired images failed to be pulled and pinned.

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ spec:
283283
observedGeneration represents the generation of the MachineConfigNode object observed by the Machine Config Operator's controller.
284284
This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.
285285
format: int64
286-
minimum: 0
286+
minimum: 1
287287
type: integer
288288
x-kubernetes-validations:
289289
- message: observedGeneration must not decrease
@@ -301,7 +301,7 @@ spec:
301301
image set that has most recently been successfully pulled
302302
and pinned on this node.
303303
format: int32
304-
minimum: 0
304+
minimum: 1
305305
type: integer
306306
x-kubernetes-validations:
307307
- message: currentGeneration must not decrease
@@ -311,7 +311,7 @@ spec:
311311
image set that is targeted to be pulled and pinned on this
312312
node.
313313
format: int32
314-
minimum: 0
314+
minimum: 1
315315
type: integer
316316
x-kubernetes-validations:
317317
- message: desiredGeneration must not decrease
@@ -321,7 +321,7 @@ spec:
321321
recent pinned image set that failed to be pulled and pinned
322322
on this node.
323323
format: int32
324-
minimum: 0
324+
minimum: 1
325325
type: integer
326326
x-kubernetes-validations:
327327
- message: lastFailedGeneration must not decrease

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ spec:
283283
observedGeneration represents the generation of the MachineConfigNode object observed by the Machine Config Operator's controller.
284284
This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.
285285
format: int64
286-
minimum: 0
286+
minimum: 1
287287
type: integer
288288
x-kubernetes-validations:
289289
- message: observedGeneration must not decrease
@@ -301,7 +301,7 @@ spec:
301301
image set that has most recently been successfully pulled
302302
and pinned on this node.
303303
format: int32
304-
minimum: 0
304+
minimum: 1
305305
type: integer
306306
x-kubernetes-validations:
307307
- message: currentGeneration must not decrease
@@ -311,7 +311,7 @@ spec:
311311
image set that is targeted to be pulled and pinned on this
312312
node.
313313
format: int32
314-
minimum: 0
314+
minimum: 1
315315
type: integer
316316
x-kubernetes-validations:
317317
- message: desiredGeneration must not decrease
@@ -321,7 +321,7 @@ spec:
321321
recent pinned image set that failed to be pulled and pinned
322322
on this node.
323323
format: int32
324-
minimum: 0
324+
minimum: 1
325325
type: integer
326326
x-kubernetes-validations:
327327
- message: lastFailedGeneration must not decrease

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ spec:
283283
observedGeneration represents the generation of the MachineConfigNode object observed by the Machine Config Operator's controller.
284284
This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.
285285
format: int64
286-
minimum: 0
286+
minimum: 1
287287
type: integer
288288
x-kubernetes-validations:
289289
- message: observedGeneration must not decrease
@@ -301,7 +301,7 @@ spec:
301301
image set that has most recently been successfully pulled
302302
and pinned on this node.
303303
format: int32
304-
minimum: 0
304+
minimum: 1
305305
type: integer
306306
x-kubernetes-validations:
307307
- message: currentGeneration must not decrease
@@ -311,7 +311,7 @@ spec:
311311
image set that is targeted to be pulled and pinned on this
312312
node.
313313
format: int32
314-
minimum: 0
314+
minimum: 1
315315
type: integer
316316
x-kubernetes-validations:
317317
- message: desiredGeneration must not decrease
@@ -321,7 +321,7 @@ spec:
321321
recent pinned image set that failed to be pulled and pinned
322322
on this node.
323323
format: int32
324-
minimum: 0
324+
minimum: 1
325325
type: integer
326326
x-kubernetes-validations:
327327
- message: lastFailedGeneration must not decrease

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/MachineConfigNodes.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ spec:
283283
observedGeneration represents the generation of the MachineConfigNode object observed by the Machine Config Operator's controller.
284284
This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.
285285
format: int64
286-
minimum: 0
286+
minimum: 1
287287
type: integer
288288
x-kubernetes-validations:
289289
- message: observedGeneration must not decrease
@@ -301,7 +301,7 @@ spec:
301301
image set that has most recently been successfully pulled
302302
and pinned on this node.
303303
format: int32
304-
minimum: 0
304+
minimum: 1
305305
type: integer
306306
x-kubernetes-validations:
307307
- message: currentGeneration must not decrease
@@ -311,7 +311,7 @@ spec:
311311
image set that is targeted to be pulled and pinned on this
312312
node.
313313
format: int32
314-
minimum: 0
314+
minimum: 1
315315
type: integer
316316
x-kubernetes-validations:
317317
- message: desiredGeneration must not decrease
@@ -321,7 +321,7 @@ spec:
321321
recent pinned image set that failed to be pulled and pinned
322322
on this node.
323323
format: int32
324-
minimum: 0
324+
minimum: 1
325325
type: integer
326326
x-kubernetes-validations:
327327
- message: lastFailedGeneration must not decrease

machineconfiguration/v1alpha1/types_machineconfignode.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ type MachineConfigNodeStatus struct {
121121
// observedGeneration represents the generation of the MachineConfigNode object observed by the Machine Config Operator's controller.
122122
// This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.
123123
// +kubebuilder:validation:XValidation:rule="self >= oldSelf", message="observedGeneration must not decrease"
124-
// +kubebuilder:validation:Minimum=1
124+
// +kubebuilder:validation:Minimum=0
125125
// +optional
126126
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
127127
// configVersion describes the current and desired machine config version for this node.
@@ -150,17 +150,17 @@ type MachineConfigNodeStatusPinnedImageSet struct {
150150
Name string `json:"name"`
151151
// currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node.
152152
// +kubebuilder:validation:XValidation:rule="self >= oldSelf", message="currentGeneration must not decrease"
153-
// +kubebuilder:validation:Minimum=1
153+
// +kubebuilder:validation:Minimum=0
154154
// +optional
155155
CurrentGeneration int32 `json:"currentGeneration,omitempty"`
156156
// desiredGeneration is the generation of the pinned image set that is targeted to be pulled and pinned on this node.
157157
// +kubebuilder:validation:XValidation:rule="self >= oldSelf", message="desiredGeneration must not decrease"
158-
// +kubebuilder:validation:Minimum=1
158+
// +kubebuilder:validation:Minimum=0
159159
// +optional
160160
DesiredGeneration int32 `json:"desiredGeneration,omitempty"`
161161
// lastFailedGeneration is the generation of the most recent pinned image set that failed to be pulled and pinned on this node.
162162
// +kubebuilder:validation:XValidation:rule="self >= oldSelf", message="lastFailedGeneration must not decrease"
163-
// +kubebuilder:validation:Minimum=1
163+
// +kubebuilder:validation:Minimum=0
164164
// +optional
165165
LastFailedGeneration int32 `json:"lastFailedGeneration,omitempty"`
166166
// lastFailedGenerationError is the error explaining why the desired images failed to be pulled and pinned.

machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ spec:
280280
observedGeneration represents the generation of the MachineConfigNode object observed by the Machine Config Operator's controller.
281281
This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.
282282
format: int64
283-
minimum: 1
283+
minimum: 0
284284
type: integer
285285
x-kubernetes-validations:
286286
- message: observedGeneration must not decrease
@@ -298,7 +298,7 @@ spec:
298298
image set that has most recently been successfully pulled
299299
and pinned on this node.
300300
format: int32
301-
minimum: 1
301+
minimum: 0
302302
type: integer
303303
x-kubernetes-validations:
304304
- message: currentGeneration must not decrease
@@ -308,7 +308,7 @@ spec:
308308
image set that is targeted to be pulled and pinned on this
309309
node.
310310
format: int32
311-
minimum: 1
311+
minimum: 0
312312
type: integer
313313
x-kubernetes-validations:
314314
- message: desiredGeneration must not decrease
@@ -318,7 +318,7 @@ spec:
318318
recent pinned image set that failed to be pulled and pinned
319319
on this node.
320320
format: int32
321-
minimum: 1
321+
minimum: 0
322322
type: integer
323323
x-kubernetes-validations:
324324
- message: lastFailedGeneration must not decrease

machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ spec:
280280
observedGeneration represents the generation of the MachineConfigNode object observed by the Machine Config Operator's controller.
281281
This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.
282282
format: int64
283-
minimum: 1
283+
minimum: 0
284284
type: integer
285285
x-kubernetes-validations:
286286
- message: observedGeneration must not decrease
@@ -298,7 +298,7 @@ spec:
298298
image set that has most recently been successfully pulled
299299
and pinned on this node.
300300
format: int32
301-
minimum: 1
301+
minimum: 0
302302
type: integer
303303
x-kubernetes-validations:
304304
- message: currentGeneration must not decrease
@@ -308,7 +308,7 @@ spec:
308308
image set that is targeted to be pulled and pinned on this
309309
node.
310310
format: int32
311-
minimum: 1
311+
minimum: 0
312312
type: integer
313313
x-kubernetes-validations:
314314
- message: desiredGeneration must not decrease
@@ -318,7 +318,7 @@ spec:
318318
recent pinned image set that failed to be pulled and pinned
319319
on this node.
320320
format: int32
321-
minimum: 1
321+
minimum: 0
322322
type: integer
323323
x-kubernetes-validations:
324324
- message: lastFailedGeneration must not decrease

machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ spec:
280280
observedGeneration represents the generation of the MachineConfigNode object observed by the Machine Config Operator's controller.
281281
This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.
282282
format: int64
283-
minimum: 1
283+
minimum: 0
284284
type: integer
285285
x-kubernetes-validations:
286286
- message: observedGeneration must not decrease
@@ -298,7 +298,7 @@ spec:
298298
image set that has most recently been successfully pulled
299299
and pinned on this node.
300300
format: int32
301-
minimum: 1
301+
minimum: 0
302302
type: integer
303303
x-kubernetes-validations:
304304
- message: currentGeneration must not decrease
@@ -308,7 +308,7 @@ spec:
308308
image set that is targeted to be pulled and pinned on this
309309
node.
310310
format: int32
311-
minimum: 1
311+
minimum: 0
312312
type: integer
313313
x-kubernetes-validations:
314314
- message: desiredGeneration must not decrease
@@ -318,7 +318,7 @@ spec:
318318
recent pinned image set that failed to be pulled and pinned
319319
on this node.
320320
format: int32
321-
minimum: 1
321+
minimum: 0
322322
type: integer
323323
x-kubernetes-validations:
324324
- message: lastFailedGeneration must not decrease

machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/MachineConfigNodes.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ spec:
280280
observedGeneration represents the generation of the MachineConfigNode object observed by the Machine Config Operator's controller.
281281
This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.
282282
format: int64
283-
minimum: 1
283+
minimum: 0
284284
type: integer
285285
x-kubernetes-validations:
286286
- message: observedGeneration must not decrease
@@ -298,7 +298,7 @@ spec:
298298
image set that has most recently been successfully pulled
299299
and pinned on this node.
300300
format: int32
301-
minimum: 1
301+
minimum: 0
302302
type: integer
303303
x-kubernetes-validations:
304304
- message: currentGeneration must not decrease
@@ -308,7 +308,7 @@ spec:
308308
image set that is targeted to be pulled and pinned on this
309309
node.
310310
format: int32
311-
minimum: 1
311+
minimum: 0
312312
type: integer
313313
x-kubernetes-validations:
314314
- message: desiredGeneration must not decrease
@@ -318,7 +318,7 @@ spec:
318318
recent pinned image set that failed to be pulled and pinned
319319
on this node.
320320
format: int32
321-
minimum: 1
321+
minimum: 0
322322
type: integer
323323
x-kubernetes-validations:
324324
- message: lastFailedGeneration must not decrease

0 commit comments

Comments
 (0)