Skip to content

Commit ae3186a

Browse files
address review comment about type validation
Signed-off-by: Rashmi Gottipati <rgottipa@redhat.com>
1 parent f1985dc commit ae3186a

5 files changed

Lines changed: 5 additions & 1 deletion

File tree

api/v1/clusterextension_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ type BundleMetadata struct {
486486
//
487487
// +optional
488488
// <opcon:experimental>
489+
// +kubebuilder:validation:MaxLength=20
489490
// +kubebuilder:validation:XValidation:rule="self.matches(\"^$|^(0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(\\\\.(0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*$\")",message="release must be empty or consist of dot-separated identifiers (numeric without leading zeros, or alphanumeric)"
490491
Release *string `json:"release,omitempty"`
491492
}

docs/api-reference/olmv1-api-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ _Appears in:_
6767
| --- | --- | --- | --- |
6868
| `name` _string_ | name is required and follows the DNS subdomain standard as defined in [RFC 1123].<br />It must contain only lowercase alphanumeric characters, hyphens (-) or periods (.),<br />start and end with an alphanumeric character, and be no longer than 253 characters. | | Required: \{\} <br /> |
6969
| `version` _string_ | version is required and references the version that this bundle represents.<br />It follows the semantic versioning standard as defined in https://semver.org/. | | Required: \{\} <br /> |
70-
| `release` _string_ | release is an optional field that identifies a specific release of this bundle's version.<br />A release represents a re-publication of the same version, typically used to deliver<br />packaging or metadata changes without changing the version number. When multiple<br />releases exist for the same version, higher releases are preferred. An unset release<br />is less preferred than all other release values.<br />The value consists of dot-separated identifiers, where each identifier is either a<br />numeric value (without leading zeros) or an alphanumeric string (e.g., "2", "1.el9",<br />"3.alpha.1"). Releases are compared identifier by identifier: numeric identifiers are<br />compared as integers, alphanumeric identifiers are compared lexically, and numeric<br />identifiers always sort before alphanumeric identifiers.<br />For bundles with explicit pkg.Release metadata, this field contains that release value.<br />For registry+v1 bundles lacking an explicit release value, this field contains the release<br />extracted from version's build metadata (e.g., '2' from '1.0.0+2').<br />This field is omitted when the bundle's release value is unset.<br /><opcon:experimental> | | Optional: \{\} <br /> |
70+
| `release` _string_ | release is an optional field that identifies a specific release of this bundle's version.<br />A release represents a re-publication of the same version, typically used to deliver<br />packaging or metadata changes without changing the version number. When multiple<br />releases exist for the same version, higher releases are preferred. An unset release<br />is less preferred than all other release values.<br />The value consists of dot-separated identifiers, where each identifier is either a<br />numeric value (without leading zeros) or an alphanumeric string (e.g., "2", "1.el9",<br />"3.alpha.1"). Releases are compared identifier by identifier: numeric identifiers are<br />compared as integers, alphanumeric identifiers are compared lexically, and numeric<br />identifiers always sort before alphanumeric identifiers.<br />For bundles with explicit pkg.Release metadata, this field contains that release value.<br />For registry+v1 bundles lacking an explicit release value, this field contains the release<br />extracted from version's build metadata (e.g., '2' from '1.0.0+2').<br />This field is omitted when the bundle's release value is unset.<br /><opcon:experimental> | | MaxLength: 20 <br />Optional: \{\} <br /> |
7171

7272

7373
#### CRDUpgradeSafetyEnforcement

helm/olmv1/base/operator-controller/crd/experimental/olm.operatorframework.io_clusterextensions.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,7 @@ spec:
706706
For registry+v1 bundles lacking an explicit release value, this field contains the release
707707
extracted from version's build metadata (e.g., '2' from '1.0.0+2').
708708
This field is omitted when the bundle's release value is unset.
709+
maxLength: 20
709710
type: string
710711
x-kubernetes-validations:
711712
- message: release must be empty or consist of dot-separated

manifests/experimental-e2e.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,6 +1318,7 @@ spec:
13181318
For registry+v1 bundles lacking an explicit release value, this field contains the release
13191319
extracted from version's build metadata (e.g., '2' from '1.0.0+2').
13201320
This field is omitted when the bundle's release value is unset.
1321+
maxLength: 20
13211322
type: string
13221323
x-kubernetes-validations:
13231324
- message: release must be empty or consist of dot-separated

manifests/experimental.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,7 @@ spec:
12791279
For registry+v1 bundles lacking an explicit release value, this field contains the release
12801280
extracted from version's build metadata (e.g., '2' from '1.0.0+2').
12811281
This field is omitted when the bundle's release value is unset.
1282+
maxLength: 20
12821283
type: string
12831284
x-kubernetes-validations:
12841285
- message: release must be empty or consist of dot-separated

0 commit comments

Comments
 (0)