Skip to content

Commit

Permalink
Merge branch 'main' into declarative-pub-sub
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriele-wolfox authored Oct 14, 2024
2 parents afae552 + bda9e45 commit 0a8c831
Show file tree
Hide file tree
Showing 27 changed files with 274 additions and 192 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
uses: actions/checkout@v4

- name: Spellcheck
uses: rojopolis/spellcheck-github-actions@0.42.0
uses: rojopolis/spellcheck-github-actions@0.43.0
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ LOCALBIN ?= $(shell pwd)/bin
BUILD_IMAGE ?= true
POSTGRES_IMAGE_NAME ?= $(shell grep 'DefaultImageName.*=' "pkg/versions/versions.go" | cut -f 2 -d \")
KUSTOMIZE_VERSION ?= v5.4.3
CONTROLLER_TOOLS_VERSION ?= v0.16.3
CONTROLLER_TOOLS_VERSION ?= v0.16.4
GORELEASER_VERSION ?= v2.3.2
SPELLCHECK_VERSION ?= 0.42.0
SPELLCHECK_VERSION ?= 0.43.0
WOKE_VERSION ?= 0.19.0
OPERATOR_SDK_VERSION ?= v1.37.0
OPM_VERSION ?= v1.47.0
Expand Down
10 changes: 10 additions & 0 deletions api/v1/database_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ type DatabaseSpec struct {
// +optional
IcuRules string `json:"icu_rules,omitempty"`

// The BUILTIN_LOCALE (cannot be changed)
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="builtin_locale is immutable"
// +optional
BuiltinLocale string `json:"builtin_locale,omitempty"`

// The COLLATION_VERSION (cannot be changed)
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="collation_version is immutable"
// +optional
CollationVersion string `json:"collation_version,omitempty"`

// True when the database is a template
// +optional
IsTemplate *bool `json:"isTemplate,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/postgresql.cnpg.io_backups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.3
controller-gen.kubebuilder.io/version: v0.16.4
name: backups.postgresql.cnpg.io
spec:
group: postgresql.cnpg.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.3
controller-gen.kubebuilder.io/version: v0.16.4
name: clusterimagecatalogs.postgresql.cnpg.io
spec:
group: postgresql.cnpg.io
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/postgresql.cnpg.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.3
controller-gen.kubebuilder.io/version: v0.16.4
name: clusters.postgresql.cnpg.io
spec:
group: postgresql.cnpg.io
Expand Down
14 changes: 13 additions & 1 deletion config/crd/bases/postgresql.cnpg.io_databases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.3
controller-gen.kubebuilder.io/version: v0.16.4
name: databases.postgresql.cnpg.io
spec:
group: postgresql.cnpg.io
Expand Down Expand Up @@ -61,6 +61,12 @@ spec:
allowConnections:
description: True when connections to this database are allowed
type: boolean
builtin_locale:
description: The BUILTIN_LOCALE (cannot be changed)
type: string
x-kubernetes-validations:
- message: builtin_locale is immutable
rule: self == oldSelf
cluster:
description: The corresponding cluster
properties:
Expand All @@ -75,6 +81,12 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
collation_version:
description: The COLLATION_VERSION (cannot be changed)
type: string
x-kubernetes-validations:
- message: collation_version is immutable
rule: self == oldSelf
connectionLimit:
description: |-
Connection limit, -1 means no limit and -2 means the
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/postgresql.cnpg.io_imagecatalogs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.3
controller-gen.kubebuilder.io/version: v0.16.4
name: imagecatalogs.postgresql.cnpg.io
spec:
group: postgresql.cnpg.io
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/postgresql.cnpg.io_poolers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.3
controller-gen.kubebuilder.io/version: v0.16.4
name: poolers.postgresql.cnpg.io
spec:
group: postgresql.cnpg.io
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/postgresql.cnpg.io_scheduledbackups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.3
controller-gen.kubebuilder.io/version: v0.16.4
name: scheduledbackups.postgresql.cnpg.io
spec:
group: postgresql.cnpg.io
Expand Down
4 changes: 4 additions & 0 deletions docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ externalPackages:
target: https://pkg.go.dev/time#Duration
- match: ^k8s\.io/(api|apimachinery/pkg/apis)/
target: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#{{- lower .TypeIdentifier -}}-{{- arrIndex .PackageSegments -1 -}}-{{- arrIndex .PackageSegments -2 -}}
- match: ^github\.com/cloudnative-pg/machinery
target: https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#{{- .TypeIdentifier }}
- match: ^github\.com/cloudnative-pg/barman-cloud
target: https://pkg.go.dev/github.com/cloudnative-pg/barman-cloud/pkg/api/#{{- .TypeIdentifier }}

hideTypePatterns:
- "ParseError$"
Expand Down
54 changes: 34 additions & 20 deletions docs/src/cloudnative-pg.v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ documentation</p>
</td>
</tr>
<tr><td><code>barmanObjectStore</code><br/>
<i>github.com/cloudnative-pg/barman-cloud/pkg/api.BarmanObjectStoreConfiguration</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/barman-cloud/pkg/api/#BarmanObjectStoreConfiguration"><i>github.com/cloudnative-pg/barman-cloud/pkg/api.BarmanObjectStoreConfiguration</i></a>
</td>
<td>
<p>The configuration for the barman-cloud tool suite</p>
Expand Down Expand Up @@ -543,13 +543,13 @@ information that could be needed to correctly restore it.</p>
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>LocalObjectReference</code><br/>
<i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference"><i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i></a>
</td>
<td>(Members of <code>LocalObjectReference</code> are embedded into this type.)
<span class="text-muted">No description provided.</span></td>
</tr>
<tr><td><code>endpointCA</code><br/>
<i>github.com/cloudnative-pg/machinery/pkg/api.SecretKeySelector</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#SecretKeySelector"><i>github.com/cloudnative-pg/machinery/pkg/api.SecretKeySelector</i></a>
</td>
<td>
<p>EndpointCA store the CA bundle of the barman endpoint.
Expand All @@ -575,7 +575,7 @@ errors with certificate issuer and barman-cloud-wal-archive.</p>
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>cluster</code> <B>[Required]</B><br/>
<i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference"><i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i></a>
</td>
<td>
<p>The cluster to backup</p>
Expand Down Expand Up @@ -643,14 +643,14 @@ Overrides the default settings specified in the cluster '.backup.volumeSnapshot.
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>BarmanCredentials</code><br/>
<i>github.com/cloudnative-pg/barman-cloud/pkg/api.BarmanCredentials</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/barman-cloud/pkg/api/#BarmanCredentials"><i>github.com/cloudnative-pg/barman-cloud/pkg/api.BarmanCredentials</i></a>
</td>
<td>(Members of <code>BarmanCredentials</code> are embedded into this type.)
<p>The potential credentials for each cloud provider</p>
</td>
</tr>
<tr><td><code>endpointCA</code><br/>
<i>github.com/cloudnative-pg/machinery/pkg/api.SecretKeySelector</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#SecretKeySelector"><i>github.com/cloudnative-pg/machinery/pkg/api.SecretKeySelector</i></a>
</td>
<td>
<p>EndpointCA store the CA bundle of the barman endpoint.
Expand Down Expand Up @@ -912,7 +912,7 @@ by applications. Defaults to the value of the <code>database</code> key.</p>
</td>
</tr>
<tr><td><code>secret</code><br/>
<i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference"><i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i></a>
</td>
<td>
<p>Name of the secret containing the initial credentials for the
Expand Down Expand Up @@ -1082,7 +1082,7 @@ by applications. Defaults to the value of the <code>database</code> key.</p>
</td>
</tr>
<tr><td><code>secret</code><br/>
<i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference"><i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i></a>
</td>
<td>
<p>Name of the secret containing the initial credentials for the
Expand Down Expand Up @@ -1178,7 +1178,7 @@ by applications. Defaults to the value of the <code>database</code> key.</p>
</td>
</tr>
<tr><td><code>secret</code><br/>
<i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference"><i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i></a>
</td>
<td>
<p>Name of the secret containing the initial credentials for the
Expand Down Expand Up @@ -1490,7 +1490,7 @@ Undefined or 0 disable synchronous replication.</p>
</td>
</tr>
<tr><td><code>superuserSecret</code><br/>
<i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference"><i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i></a>
</td>
<td>
<p>The secret containing the superuser password. If not defined a new
Expand All @@ -1517,7 +1517,7 @@ user by setting it to <code>NULL</code>. Disabled by default.</p>
</td>
</tr>
<tr><td><code>imagePullSecrets</code><br/>
<i>[]github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference"><i>[]github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i></a>
</td>
<td>
<p>The list of pull secrets to be used to pull the images</p>
Expand Down Expand Up @@ -2356,6 +2356,20 @@ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-
<p>The ICU_RULES (cannot be changed)</p>
</td>
</tr>
<tr><td><code>builtin_locale</code><br/>
<i>string</i>
</td>
<td>
<p>The BUILTIN_LOCALE (cannot be changed)</p>
</td>
</tr>
<tr><td><code>collation_version</code><br/>
<i>string</i>
</td>
<td>
<p>The COLLATION_VERSION (cannot be changed)</p>
</td>
</tr>
<tr><td><code>isTemplate</code><br/>
<i>bool</i>
</td>
Expand Down Expand Up @@ -2577,7 +2591,7 @@ secure and efficient password management for external clusters.</p>
</td>
</tr>
<tr><td><code>barmanObjectStore</code><br/>
<i>github.com/cloudnative-pg/barman-cloud/pkg/api.BarmanObjectStoreConfiguration</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/barman-cloud/pkg/api/#BarmanObjectStoreConfiguration"><i>github.com/cloudnative-pg/barman-cloud/pkg/api.BarmanObjectStoreConfiguration</i></a>
</td>
<td>
<p>The configuration for the barman-cloud tool suite</p>
Expand Down Expand Up @@ -3167,14 +3181,14 @@ Default: false.</p>
</td>
</tr>
<tr><td><code>customQueriesConfigMap</code><br/>
<i>[]github.com/cloudnative-pg/machinery/pkg/api.ConfigMapKeySelector</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#ConfigMapKeySelector"><i>[]github.com/cloudnative-pg/machinery/pkg/api.ConfigMapKeySelector</i></a>
</td>
<td>
<p>The list of config maps containing the custom queries</p>
</td>
</tr>
<tr><td><code>customQueriesSecret</code><br/>
<i>[]github.com/cloudnative-pg/machinery/pkg/api.SecretKeySelector</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#SecretKeySelector"><i>[]github.com/cloudnative-pg/machinery/pkg/api.SecretKeySelector</i></a>
</td>
<td>
<p>The list of secrets containing the custom queries</p>
Expand Down Expand Up @@ -3409,7 +3423,7 @@ by pgbouncer</p>
</td>
</tr>
<tr><td><code>authQuerySecret</code><br/>
<i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference"><i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i></a>
</td>
<td>
<p>The credentials of the user that need to be used for the authentication
Expand Down Expand Up @@ -3707,7 +3721,7 @@ part for now.</p>
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>cluster</code> <B>[Required]</B><br/>
<i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference"><i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i></a>
</td>
<td>
<p>This is the cluster reference on which the Pooler will work.
Expand Down Expand Up @@ -4430,7 +4444,7 @@ Reference: https://www.postgresql.org/docs/current/sql-createrole.html</p>
</td>
</tr>
<tr><td><code>passwordSecret</code><br/>
<i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference"><i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i></a>
</td>
<td>
<p>Secret containing the password of the role (if present)
Expand Down Expand Up @@ -4557,14 +4571,14 @@ in their respective arrays.</p>
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>secretRefs</code><br/>
<i>[]github.com/cloudnative-pg/machinery/pkg/api.SecretKeySelector</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#SecretKeySelector"><i>[]github.com/cloudnative-pg/machinery/pkg/api.SecretKeySelector</i></a>
</td>
<td>
<p>SecretRefs holds a list of references to Secrets</p>
</td>
</tr>
<tr><td><code>configMapRefs</code><br/>
<i>[]github.com/cloudnative-pg/machinery/pkg/api.ConfigMapKeySelector</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#ConfigMapKeySelector"><i>[]github.com/cloudnative-pg/machinery/pkg/api.ConfigMapKeySelector</i></a>
</td>
<td>
<p>ConfigMapRefs holds a list of references to ConfigMaps</p>
Expand Down Expand Up @@ -4611,7 +4625,7 @@ see https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format</p>
</td>
</tr>
<tr><td><code>cluster</code> <B>[Required]</B><br/>
<i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i>
<a href="https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference"><i>github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference</i></a>
</td>
<td>
<p>The cluster to backup</p>
Expand Down
Loading

0 comments on commit 0a8c831

Please sign in to comment.