Skip to content

Commit

Permalink
Merge branch 'main' into K8SPG-377-update-extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
hors authored Jan 10, 2025
2 parents 07439be + 25a6217 commit 5b063bd
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8171,8 +8171,6 @@ spec:
- azure
type: string
type: object
required:
- image
type: object
image:
description: The image name to use for PostgreSQL containers.
Expand Down
2 changes: 0 additions & 2 deletions config/crd/bases/pgv2.percona.com_perconapgclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8577,8 +8577,6 @@ spec:
- azure
type: string
type: object
required:
- image
type: object
image:
description: The image name to use for PostgreSQL containers.
Expand Down
2 changes: 0 additions & 2 deletions deploy/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8870,8 +8870,6 @@ spec:
- azure
type: string
type: object
required:
- image
type: object
image:
description: The image name to use for PostgreSQL containers.
Expand Down
2 changes: 0 additions & 2 deletions deploy/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8870,8 +8870,6 @@ spec:
- azure
type: string
type: object
required:
- image
type: object
image:
description: The image name to use for PostgreSQL containers.
Expand Down
2 changes: 0 additions & 2 deletions deploy/cw-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8870,8 +8870,6 @@ spec:
- azure
type: string
type: object
required:
- image
type: object
image:
description: The image name to use for PostgreSQL containers.
Expand Down
4 changes: 4 additions & 0 deletions percona/controller/pgcluster/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,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)

Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,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"`
Expand Down

0 comments on commit 5b063bd

Please sign in to comment.