Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions api/v1/clusterextension_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type ClusterExtensionSpec struct {
//
// [RFC 1123]: https://tools.ietf.org/html/rfc1123
//
// +kubebuilder:validation:MaxLength:=63
// +kubebuilder:validation:MaxLength:=53
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="namespace is immutable"
// +kubebuilder:validation:XValidation:rule="self.matches(\"^[a-z0-9]([-a-z0-9]*[a-z0-9])?$\")",message="namespace must be a valid DNS1123 label"
// +kubebuilder:validation:Required
Expand Down Expand Up @@ -111,14 +111,14 @@ type SourceConfig struct {
// When using the Catalog sourceType, the catalog field must also be set.
//
// +unionDiscriminator
// +kubebuilder:validation:Enum:="Catalog"
// +kubebuilder:validation:Enum:="Catalog";"Bundle"
// +kubebuilder:validation:Required
SourceType string `json:"sourceType"`

// catalog is used to configure how information is sourced from a catalog.
// This field is required when sourceType is "Catalog", and forbidden otherwise.
//
// +optional
// +kubebuilder:validation:Required
Catalog *CatalogSource `json:"catalog,omitempty"`
}

Expand Down Expand Up @@ -287,7 +287,7 @@ type CatalogSource struct {
//
// [RFC 1123]: https://tools.ietf.org/html/rfc1123
//
// +kubebuilder:validation:items:MaxLength:=253
// +kubebuilder:validation:items:MaxLength:=250
// +kubebuilder:validation:MaxItems:=256
// +kubebuilder:validation:items:XValidation:rule="self.matches(\"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$\")",message="channels entries must be valid DNS1123 subdomains"
// +optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ spec:
start and end with an alphanumeric character, and be no longer than 63 characters

[RFC 1123]: https://tools.ietf.org/html/rfc1123
maxLength: 63
maxLength: 53
type: string
x-kubernetes-validations:
- message: namespace is immutable
Expand Down Expand Up @@ -236,7 +236,7 @@ spec:

[RFC 1123]: https://tools.ietf.org/html/rfc1123
items:
maxLength: 253
maxLength: 250
type: string
x-kubernetes-validations:
- message: channels entries must be valid DNS1123 subdomains
Expand Down Expand Up @@ -447,8 +447,10 @@ spec:
When using the Catalog sourceType, the catalog field must also be set.
enum:
- Catalog
- Bundle
type: string
required:
- catalog
- sourceType
type: object
x-kubernetes-validations:
Expand Down
Loading