You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the new format library is not avaiable in 4.18,
use similar validations to what we were doing for v1alpha1.
Signed-off-by: Urvashi <[email protected]>
Copy file name to clipboardExpand all lines: machineconfiguration/v1/types_machineosbuild.go
+6-6
Original file line number
Diff line number
Diff line change
@@ -165,7 +165,7 @@ type MachineConfigReference struct {
165
165
// alphanumeric characters, hyphens and periods, and should start and end with an alphanumeric character.
166
166
// +kubebuilder:validation:MinLength:=10
167
167
// +kubebuilder:validation:MaxLength:=253
168
-
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character."
@@ -175,32 +175,32 @@ type ObjectReference struct {
175
175
// group of the referent.
176
176
// The name must contain only lowercase alphanumeric characters, '-' or '.' and start/end with an alphanumeric character.
177
177
// Example: "", "apps", "build.openshift.io", etc.
178
-
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character."
// This value should consist of at most 63 characters, and of only lowercase alphanumeric characters and hyphens,
184
184
// and should start and end with an alphanumeric character.
185
185
// Example: "deployments", "deploymentconfigs", "pods", etc.
186
186
// +required
187
-
// +kubebuilder:validation:XValidation:rule=`!format.dns1123Label().validate(self).hasValue()`,message="the value must consist of only lowercase alphanumeric characters and hyphens"
// This value should consist of at most 63 characters, and of only lowercase alphanumeric characters and hyphens,
193
193
// and should start and end with an alphanumeric character.
194
-
// +kubebuilder:validation:XValidation:rule=`!format.dns1123Label().validate(self).hasValue()`,message="the value must consist of only lowercase alphanumeric characters and hyphens"
// The name must contain only lowercase alphanumeric characters, '-' or '.' and start/end with an alphanumeric character.
201
-
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character."
// The name must contain only lowercase alphanumeric characters, '-' or '.' and start/end with an alphanumeric character.
212
-
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character."
Copy file name to clipboardExpand all lines: machineconfiguration/v1/types_machineosconfig.go
+2-2
Original file line number
Diff line number
Diff line change
@@ -176,7 +176,7 @@ type MachineConfigPoolReference struct {
176
176
// This value should be at most 253 characters, and must contain only lowercase
177
177
// alphanumeric characters, hyphens and periods, and should start and end with an alphanumeric character.
178
178
// +kubebuilder:validation:MaxLength:=253
179
-
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character."
@@ -187,7 +187,7 @@ type ImageSecretObjectReference struct {
187
187
// Must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character.
188
188
// This secret must be in the openshift-machine-config-operator namespace.
189
189
// +kubebuilder:validation:MaxLength:=253
190
-
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character."
Copy file name to clipboardExpand all lines: machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineosbuilds-CustomNoUpgrade.crd.yaml
+10-46
Original file line number
Diff line number
Diff line change
@@ -78,12 +78,8 @@ spec:
78
78
alphanumeric characters, hyphens and periods, and should start and end with an alphanumeric character.
0 commit comments