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
Change ClusterCatalog Priority field from int32 to *int32 to properly
represent an optional field with a default value.
- Update Priority to *int32 with json:"priority,omitempty"
- Fix kubebuilder markers: Minimum/Maximum capitalization
- Add Format:=int32 marker for OpenAPI schema
- Add GetPriority() helper method for safe nil handling
- Update resolver to use GetPriority() instead of direct access
- Update tests to use ptr.To[int32]() for pointer values
The kubebuilder default marker ensures the API server sets Priority
to 0 when omitted, while the pointer type allows proper detection of
user-specified vs defaulted values.
Assisted-by: CLAUDE
dd
Copy file name to clipboardExpand all lines: docs/api-reference/olmv1-api-reference.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,7 +178,7 @@ _Appears in:_
178
178
| Field | Description | Default | Validation |
179
179
| --- | --- | --- | --- |
180
180
|`source`_[CatalogSource](#catalogsource)_| source is a required field that defines the source of a catalog.<br />A catalog contains information on content that can be installed on a cluster.<br />The catalog source makes catalog contents discoverable and usable by other on-cluster components.<br />These components can present the content in a GUI dashboard or install content from the catalog on the cluster.<br />The catalog source must contain catalog metadata in the File-Based Catalog (FBC) format.<br />For more information on FBC, see https://olm.operatorframework.io/docs/reference/file-based-catalogs/#docs.<br />Below is a minimal example of a ClusterCatalogSpec that sources a catalog from an image:<br /> source:<br /> type: Image<br /> image:<br /> ref: quay.io/operatorhubio/catalog:latest|| Required: \{\} <br /> |
181
-
|`priority`_integer_| priority is an optional field that defines a priority for this ClusterCatalog.<br />Clients use the ClusterCatalog priority as a tie-breaker between ClusterCatalogs that meet their requirements.<br />Higher numbers mean higher priority.<br />Clients decide how to handle scenarios where multiple ClusterCatalogs with the same priority meet their requirements.<br />Clients should prompt users for additional input to break the tie.<br />When omitted, the default priority is 0.<br />Use negative numbers to specify a priority lower than the default.<br />Use positive numbers to specify a priority higher than the default.<br />The lowest possible value is -2147483648.<br />The highest possible value is 2147483647. | 0 ||
181
+
|`priority`_integer_| priority is an optional field that defines a priority for this ClusterCatalog.<br />Clients use the ClusterCatalog priority as a tie-breaker between ClusterCatalogs that meet their requirements.<br />Higher numbers mean higher priority.<br />Clients decide how to handle scenarios where multiple ClusterCatalogs with the same priority meet their requirements.<br />Clients should prompt users for additional input to break the tie.<br />When omitted, the default priority is 0.<br />Use negative numbers to specify a priority lower than the default.<br />Use positive numbers to specify a priority higher than the default.<br />The lowest possible value is -2147483648.<br />The highest possible value is 2147483647. | 0 |Format: int32 <br />Maximum: 2.147483647e+09 <br />Minimum: -2.147483648e+09 <br />|
182
182
|`availabilityMode`_[AvailabilityMode](#availabilitymode)_| availabilityMode is an optional field that defines how the ClusterCatalog is made available to clients on the cluster.<br />Allowed values are "Available", "Unavailable", or omitted.<br />When omitted, the default value is "Available".<br />When set to "Available", the catalog contents are unpacked and served over the catalog content HTTP server.<br />Clients should consider this ClusterCatalog and its contents as usable.<br />When set to "Unavailable", the catalog contents are no longer served over the catalog content HTTP server.<br />Treat this the same as if the ClusterCatalog does not exist.<br />Use "Unavailable" when you want to keep the ClusterCatalog but treat it as if it doesn't exist. | Available | Enum: [Unavailable Available] <br /> |
0 commit comments