Skip to content

Commit 2f95022

Browse files
author
CloudNativePG Automated Updates
committed
chore: sync API
1 parent 4266895 commit 2f95022

3 files changed

Lines changed: 30 additions & 4 deletions

File tree

pkg/api/v1/cluster_types.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,9 @@ type ImageInfo struct {
10381038
Image string `json:"image"`
10391039
// MajorVersion is the major version of the image
10401040
MajorVersion int `json:"majorVersion"`
1041+
// Extensions contains the container image extensions available for the current Image
1042+
// +optional
1043+
Extensions []ExtensionConfiguration `json:"extensions,omitempty"`
10411044
}
10421045

10431046
// SwitchReplicaClusterStatus contains all the statuses regarding the switch of a cluster to a replica cluster
@@ -1466,6 +1469,8 @@ type PostgresConfiguration struct {
14661469

14671470
// The configuration of the extensions to be added
14681471
// +optional
1472+
// +listType=map
1473+
// +listMapKey=name
14691474
Extensions []ExtensionConfiguration `json:"extensions,omitempty"`
14701475
}
14711476

@@ -1477,8 +1482,8 @@ type ExtensionConfiguration struct {
14771482
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9_]*[a-z0-9])?$`
14781483
Name string `json:"name"`
14791484

1480-
// The image containing the extension, required
1481-
// +kubebuilder:validation:XValidation:rule="has(self.reference)",message="An image reference is required"
1485+
// The image containing the extension.
1486+
// +optional
14821487
ImageVolumeSource corev1.ImageVolumeSource `json:"image"`
14831488

14841489
// The list of directories inside the image which should be added to extension_control_path.

pkg/api/v1/imagecatalog_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ type CatalogImage struct {
3939
// +kubebuilder:validation:Minimum=10
4040
// The PostgreSQL major version of the image. Must be unique within the catalog.
4141
Major int `json:"major"`
42+
// The configuration of the extensions to be added
43+
// +optional
44+
// +listType=map
45+
// +listMapKey=name
46+
Extensions []ExtensionConfiguration `json:"extensions,omitempty"`
4247
}
4348

4449
// +genclient

pkg/api/v1/zz_generated.deepcopy.go

Lines changed: 18 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)