@@ -1369,29 +1369,45 @@ type Condition struct {
1369
1369
// ---
1370
1370
// Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
1371
1371
// useful (see .node.status.conditions), the ability to deconflict is important.
1372
+ // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
1372
1373
// +required
1374
+ // +kubebuilder:validation:Required
1375
+ // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$`
1376
+ // +kubebuilder:validation:MaxLength=316
1373
1377
Type string `json:"type" protobuf:"bytes,1,opt,name=type"`
1374
1378
// status of the condition, one of True, False, Unknown.
1375
1379
// +required
1380
+ // +kubebuilder:validation:Required
1381
+ // +kubebuilder:validation:Enum=True;False;Unknown
1376
1382
Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"`
1377
1383
// observedGeneration represents the .metadata.generation that the condition was set based upon.
1378
1384
// For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
1379
1385
// with respect to the current state of the instance.
1380
1386
// +optional
1387
+ // +kubebuilder:validation:Minimum=0
1381
1388
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
1382
1389
// lastTransitionTime is the last time the condition transitioned from one status to another.
1383
1390
// This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
1384
1391
// +required
1392
+ // +kubebuilder:validation:Required
1393
+ // +kubebuilder:validation:Type=string
1394
+ // +kubebuilder:validation:Format=date-time
1385
1395
LastTransitionTime Time `json:"lastTransitionTime" protobuf:"bytes,4,opt,name=lastTransitionTime"`
1386
1396
// reason contains a programmatic identifier indicating the reason for the condition's last transition.
1387
1397
// Producers of specific condition types may define expected values and meanings for this field,
1388
1398
// and whether the values are considered a guaranteed API.
1389
1399
// The value should be a CamelCase string.
1390
1400
// This field may not be empty.
1391
1401
// +required
1402
+ // +kubebuilder:validation:Required
1403
+ // +kubebuilder:validation:MaxLength=1024
1404
+ // +kubebuilder:validation:MinLength=1
1405
+ // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$`
1392
1406
Reason string `json:"reason" protobuf:"bytes,5,opt,name=reason"`
1393
1407
// message is a human readable message indicating details about the transition.
1394
1408
// This may be an empty string.
1395
1409
// +required
1410
+ // +kubebuilder:validation:Required
1411
+ // +kubebuilder:validation:MaxLength=32768
1396
1412
Message string `json:"message" protobuf:"bytes,6,opt,name=message"`
1397
1413
}
0 commit comments