diff --git a/README.md b/README.md index b0b8b91dd..a49485ab3 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ## Introduction -[Percona Operator for PostgreSQL](https://docs.percona.com/percona-operator-for-postgresql/2.0/index.html) automates and simplifies deploying and managing open source PostgreSQL clusters on Kubernetes. It is based on [Postgres Operator](https://crunchydata.github.io/postgres-operator/latest/) developed by Crunchy Data. +[Percona Operator for PostgreSQL](https://docs.percona.com/percona-operator-for-postgresql/2.0/index.html) automates and simplifies deploying and managing open source PostgreSQL clusters on Kubernetes. It is based on [Postgres Operator](https://github.com/CrunchyData/postgres-operator) developed by Crunchy Data. Whether you need to get a simple PostgreSQL cluster up and running, need to deploy a high availability, fault tolerant cluster in production, or are running your own database-as-a-service, the Operator provides the essential features you need to keep your clusters healthy: diff --git a/build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml b/build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml index ba74eb3a4..c9d7b38ae 100644 --- a/build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml +++ b/build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml @@ -8171,8 +8171,6 @@ spec: - azure type: string type: object - required: - - image type: object image: description: The image name to use for PostgreSQL containers. diff --git a/config/crd/bases/pgv2.percona.com_perconapgclusters.yaml b/config/crd/bases/pgv2.percona.com_perconapgclusters.yaml index 407f29679..21070014e 100644 --- a/config/crd/bases/pgv2.percona.com_perconapgclusters.yaml +++ b/config/crd/bases/pgv2.percona.com_perconapgclusters.yaml @@ -8577,8 +8577,6 @@ spec: - azure type: string type: object - required: - - image type: object image: description: The image name to use for PostgreSQL containers. diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index e22034402..2588d29cd 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -8870,8 +8870,6 @@ spec: - azure type: string type: object - required: - - image type: object image: description: The image name to use for PostgreSQL containers. diff --git a/deploy/crd.yaml b/deploy/crd.yaml index 90c0fcd6d..795cd8257 100644 --- a/deploy/crd.yaml +++ b/deploy/crd.yaml @@ -8870,8 +8870,6 @@ spec: - azure type: string type: object - required: - - image type: object image: description: The image name to use for PostgreSQL containers. diff --git a/deploy/cw-bundle.yaml b/deploy/cw-bundle.yaml index 8130ba034..a3f5637b9 100644 --- a/deploy/cw-bundle.yaml +++ b/deploy/cw-bundle.yaml @@ -8870,8 +8870,6 @@ spec: - azure type: string type: object - required: - - image type: object image: description: The image name to use for PostgreSQL containers. diff --git a/percona/controller/pgcluster/controller.go b/percona/controller/pgcluster/controller.go index 9a2c997fa..169ac254b 100644 --- a/percona/controller/pgcluster/controller.go +++ b/percona/controller/pgcluster/controller.go @@ -663,6 +663,10 @@ func (r *PGClusterReconciler) reconcileCustomExtensions(ctx context.Context, cr return nil } + if len(cr.Spec.Extensions.Image) == 0 && len(cr.Spec.Extensions.Custom) > 0 { + return errors.New("you need to set spec.extensions.image to install custom extensions") + } + extensionKeys := make([]string, 0) extensionNames := make([]string, 0) diff --git a/pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go b/pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go index 071ff07fb..ceea01d6b 100644 --- a/pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go +++ b/pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go @@ -590,8 +590,7 @@ type BuiltInExtensionsSpec struct { } type ExtensionsSpec struct { - // +kubebuilder:validation:Required - Image string `json:"image"` + Image string `json:"image,omitempty"` ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` Storage CustomExtensionsStorageSpec `json:"storage,omitempty"` BuiltIn BuiltInExtensionsSpec `json:"builtin,omitempty"`