@@ -1429,6 +1429,37 @@ type PostgresConfiguration struct {
14291429 // Defaults to false.
14301430 // +optional
14311431 EnableAlterSystem bool `json:"enableAlterSystem,omitempty"`
1432+
1433+ // The configuration of the extensions to be added
1434+ // +optional
1435+ Extensions []ExtensionConfiguration `json:"extensions,omitempty"`
1436+ }
1437+
1438+ // ExtensionConfiguration is the configuration used to add
1439+ // PostgreSQL extensions to the Cluster.
1440+ type ExtensionConfiguration struct {
1441+ // The name of the extension, required
1442+ // +kubebuilder:validation:MinLength=1
1443+ // +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
1444+ Name string `json:"name"`
1445+
1446+ // The image containing the extension, required
1447+ // +kubebuilder:validation:XValidation:rule="has(self.reference)",message="An image reference is required"
1448+ ImageVolumeSource corev1.ImageVolumeSource `json:"image"`
1449+
1450+ // The list of directories inside the image which should be added to extension_control_path.
1451+ // If not defined, defaults to "/share".
1452+ // +optional
1453+ ExtensionControlPath []string `json:"extension_control_path,omitempty"`
1454+
1455+ // The list of directories inside the image which should be added to dynamic_library_path.
1456+ // If not defined, defaults to "/lib".
1457+ // +optional
1458+ DynamicLibraryPath []string `json:"dynamic_library_path,omitempty"`
1459+
1460+ // The list of directories inside the image which should be added to ld_library_path.
1461+ // +optional
1462+ LdLibraryPath []string `json:"ld_library_path,omitempty"`
14321463}
14331464
14341465// BootstrapConfiguration contains information about how to create the PostgreSQL
0 commit comments