From 548b81a2dfb7fb5c71c31756357a43d5a517c342 Mon Sep 17 00:00:00 2001 From: everettraven Date: Tue, 26 Nov 2024 09:24:30 -0500 Subject: [PATCH] TEST-DO-NOT-MERGE: intentionally make breaking changes to the CRD to test the newly merged crd-diff action Signed-off-by: everettraven --- api/v1/clusterextension_types.go | 8 ++++---- .../bases/olm.operatorframework.io_clusterextensions.yaml | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/api/v1/clusterextension_types.go b/api/v1/clusterextension_types.go index 696966c5a..74fa0a51a 100644 --- a/api/v1/clusterextension_types.go +++ b/api/v1/clusterextension_types.go @@ -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 @@ -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"` } @@ -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 diff --git a/config/base/crd/bases/olm.operatorframework.io_clusterextensions.yaml b/config/base/crd/bases/olm.operatorframework.io_clusterextensions.yaml index a908b256d..661fa077c 100644 --- a/config/base/crd/bases/olm.operatorframework.io_clusterextensions.yaml +++ b/config/base/crd/bases/olm.operatorframework.io_clusterextensions.yaml @@ -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 @@ -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 @@ -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: