@@ -67,7 +67,7 @@ type ClusterExtensionSpec struct {
67
67
// applied to other Namespaces. This Namespace is expected to exist.
68
68
//
69
69
// installNamespace is required, immutable, and follows the DNS label standard
70
- // as defined in RFC 1123. This means that valid values:
70
+ // as defined in [ RFC 1123] . This means that valid values:
71
71
// - Contain no more than 63 characters
72
72
// - Contain only lowercase alphanumeric characters or '-'
73
73
// - Start with an alphanumeric character
@@ -85,6 +85,8 @@ type ClusterExtensionSpec struct {
85
85
// - thisisareallylongnamespacenamethatisgreaterthanthemaximumlength
86
86
// - some.namespace
87
87
//
88
+ // [RFC 1123]: https://tools.ietf.org/html/rfc1123
89
+ //
88
90
//+kubebuilder:validation:Pattern:=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
89
91
//+kubebuilder:validation:MaxLength:=63
90
92
//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="installNamespace is immutable"
@@ -140,10 +142,9 @@ type CatalogSource struct {
140
142
// packageName is a reference to the name of the package to be installed
141
143
// and is used to filter the content from catalogs.
142
144
//
143
- // This field is required, immutable and follows the DNS label standard as defined in RFC
144
- // 1123, with a deviation in the maximum length being no more than 48
145
- // characters. This means that valid values:
146
- // - Contain no more than 48 characters
145
+ // This field is required, immutable and follows the DNS label standard as
146
+ // defined in [RFC 1123]. This means that valid values:
147
+ // - Contain no more than 63 characters
147
148
// - Contain only lowercase alphanumeric characters or '-'
148
149
// - Start with an alphanumeric character
149
150
// - End with an alphanumeric character
@@ -160,8 +161,10 @@ type CatalogSource struct {
160
161
// - thisisareallylongpackagenamethatisgreaterthanthemaximumlength
161
162
// - some.package
162
163
//
163
- //+kubebuilder:validation:MaxLength:=48
164
- //+kubebuilder:validation:Pattern:=^[a-z0-9]+(-[a-z0-9]+)*$
164
+ // [RFC 1123]: https://tools.ietf.org/html/rfc1123
165
+ //
166
+ //+kubebuilder:validation:MaxLength:=63
167
+ //+kubebuilder:validation:Pattern:=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
165
168
//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="packageName is immutable"
166
169
PackageName string `json:"packageName"`
167
170
@@ -259,11 +262,11 @@ type CatalogSource struct {
259
262
//
260
263
// When unspecified, upgrade edges across all channels will be used to identify valid automatic upgrade paths.
261
264
//
262
- // This field follows the DNS subdomain name standard as defined in RFC
263
- // 1123, with a deviation in the maximum length being no more than 48
264
- // characters. This means that valid values:
265
- // - Contain no more than 48 characters
266
- // - Contain only lowercase alphanumeric characters, '-', or '. '
265
+ // This field follows the DNS label name standard as defined in [ RFC 1123]
266
+ // with the addition of '.' and '_' characters being allowed.
267
+ // This means that valid values:
268
+ // - Contain no more than 63 characters
269
+ // - Contain only lowercase alphanumeric characters, '-', '.', or '_ '
267
270
// - Start with an alphanumeric character
268
271
// - End with an alphanumeric character
269
272
//
@@ -276,14 +279,17 @@ type CatalogSource struct {
276
279
// - dev-preview
277
280
// - preview
278
281
// - community
282
+ // - original_40
279
283
//
280
284
// Some examples of invalid values are:
281
285
// - -some-channel
282
286
// - some-channel-
283
287
// - thisisareallylongchannelnamethatisgreaterthanthemaximumlength
284
288
//
285
- //+kubebuilder:validation:MaxLength:=48
286
- //+kubebuilder:validation:Pattern:=^[a-z0-9]+([\.-][a-z0-9]+)*$
289
+ // [RFC 1123]: https://tools.ietf.org/html/rfc1123
290
+ //
291
+ //+kubebuilder:validation:MaxLength:=63
292
+ //+kubebuilder:validation:Pattern:=^[a-z0-9]([\._\-a-z0-9]*[a-z0-9])?$
287
293
//+optional
288
294
Channel string `json:"channel,omitempty"`
289
295
@@ -348,7 +354,7 @@ type ServiceAccountReference struct {
348
354
// - some-serviceaccount-
349
355
//
350
356
//+kubebuilder:validation:MaxLength:=253
351
- //+kubebuilder:validation:Pattern:=^[a-z0-9]+([.|-][ a-z0-9]+ )*$
357
+ //+kubebuilder:validation:Pattern:=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([- a-z0-9]*[a-z0-9])? )*$
352
358
//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="name is immutable"
353
359
Name string `json:"name"`
354
360
}
0 commit comments