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
@@ -136,12 +137,21 @@ type MemberClusterStatus struct {
136
137
137
138
// Taint attached to MemberCluster has the "effect" on
138
139
// any ClusterResourcePlacement that does not tolerate the Taint.
140
+
// +kubebuilder:validation:XValidation:rule="(self.key.contains('/') ? self.key.substring(self.key.indexOf('/') + 1) : self.key).matches('^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$')",message="taint key name segment must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character"
141
+
// +kubebuilder:validation:XValidation:rule="!self.key.contains('/') || self.key.substring(0, self.key.indexOf('/')).split('.').all(label, label.matches('^[a-z0-9]([a-z0-9-]*[a-z0-9])?$') && label.size() <= 63)",message="taint key prefix must be a lowercase DNS subdomain"
142
+
// +kubebuilder:validation:XValidation:rule="(self.key.contains('/') ? self.key.size() - self.key.indexOf('/') - 1 : self.key.size()) <= 63",message="taint key name segment must be 63 characters or less"
143
+
// +kubebuilder:validation:XValidation:rule="!self.key.contains('/') || self.key.indexOf('/') <= 253",message="taint key prefix must be 253 characters or less"
144
+
// +kubebuilder:validation:XValidation:rule="!has(self.value) || size(self.value) == 0 || self.value.matches('^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?$')",message="taint value must be a valid label value"
139
145
typeTaintstruct {
140
146
// The taint key to be applied to a MemberCluster.
@@ -156,12 +157,21 @@ type MemberClusterStatus struct {
156
157
157
158
// Taint attached to MemberCluster has the "effect" on
158
159
// any ClusterResourcePlacement that does not tolerate the Taint.
160
+
// +kubebuilder:validation:XValidation:rule="(self.key.contains('/') ? self.key.substring(self.key.indexOf('/') + 1) : self.key).matches('^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$')",message="taint key name segment must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character"
161
+
// +kubebuilder:validation:XValidation:rule="!self.key.contains('/') || self.key.substring(0, self.key.indexOf('/')).split('.').all(label, label.matches('^[a-z0-9]([a-z0-9-]*[a-z0-9])?$') && label.size() <= 63)",message="taint key prefix must be a lowercase DNS subdomain"
162
+
// +kubebuilder:validation:XValidation:rule="(self.key.contains('/') ? self.key.size() - self.key.indexOf('/') - 1 : self.key.size()) <= 63",message="taint key name segment must be 63 characters or less"
163
+
// +kubebuilder:validation:XValidation:rule="!self.key.contains('/') || self.key.indexOf('/') <= 253",message="taint key prefix must be 253 characters or less"
164
+
// +kubebuilder:validation:XValidation:rule="!has(self.value) || size(self.value) == 0 || self.value.matches('^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?$')",message="taint value must be a valid label value"
159
165
typeTaintstruct {
160
166
// The taint key to be applied to a MemberCluster.
0 commit comments