Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9f9c439
Adds a New Condition for PVC Resize Errors
andrewlecuyer Feb 7, 2025
a942197
Initial configuration for an OpenTelemetry Collector
cbandy Dec 23, 2024
3ea8f17
Add an OTel Collector with Patroni metrics
dsessler7 Jan 6, 2025
c3a98fb
Add PgBouncer metrics
dsessler7 Jan 14, 2025
9fcef77
Parse Postgres and pgAudit logs using the OTel Collector
benjaminjb Jan 22, 2025
08ab9a4
Parse Patroni logs
dsessler7 Jan 22, 2025
2e59c1b
Parse PgBouncer logs using the OTel Collector
dsessler7 Jan 29, 2025
96e1ffb
Scrape pgAdmin logs using the OTel collector
tony-landreth Jan 29, 2025
ee9bf60
Add pgBackRest repohost log collector
benjaminjb Feb 1, 2025
836572d
Validate and strip/minify Collector SQL files
cbandy Feb 7, 2025
f2a80ac
Change pgbackrest init for running containers
benjaminjb Feb 7, 2025
0dcb1be
Bump controller-gen to v0.17.2
cbandy Feb 10, 2025
fbb4f32
Change PostgresIdentifier to a type alias
cbandy Jan 3, 2025
7089149
Add k8s attributes to patroni logs. Add CompactingProcessor to patron…
dsessler7 Feb 7, 2025
8e37a1f
Create initial API for OTel instrumentation. Allow users to configure…
dsessler7 Feb 9, 2025
38fc33a
Add instrumentation_scope.name and log.record.original attributes to …
dsessler7 Feb 9, 2025
3602c70
Add configurable collector (#4092)
benjaminjb Feb 12, 2025
f7e9625
Add shared functions for quoting shell words
cbandy Nov 4, 2024
d4483cc
Add a function for setting permission on directories
cbandy Feb 10, 2025
e6ea78b
Store pgAdmin log file positions in the logs directory
cbandy Feb 6, 2025
951fa40
Ensure Postgres and Patroni log directories are writable
cbandy Feb 10, 2025
88130ca
Ensure pgBackRest log directories are writable
cbandy Feb 11, 2025
8dbe427
Add a field specifying when to delete log files
cbandy Feb 14, 2025
1797f8f
Rotate PgBouncer logs using specified retention
dsessler7 Feb 11, 2025
8b87822
Document a Kubernetes bug with the duration format
cbandy Feb 18, 2025
85636a8
Add an API struct representing a single Secret value
cbandy Jan 15, 2025
ef1eae0
Allow more control over the arguments to pg_upgrade
cbandy Dec 9, 2024
510ddf4
Validate pg_upgrade versions at the API server
cbandy Feb 19, 2025
e4dfdf2
Add a validated field for Postgres parameters
cbandy Dec 20, 2024
e884806
Otel pgMonitor metrics (#4096)
tony-landreth Feb 21, 2025
00c9068
Add reload logic to collector container start script.
dsessler7 Feb 19, 2025
19a28f7
Add a test helper that unmarshals JSON and YAML
cbandy Feb 26, 2025
9977db2
If the OpenTelemetryLogs feature gate is set, tell patroni to log to …
dsessler7 Feb 26, 2025
bfd4160
Add resources from API to OTEL sidecar (#4104)
benjaminjb Feb 26, 2025
6ba9057
Change PostgresCluster.spec.config to a pointer
cbandy Feb 26, 2025
2a2fe9b
Calculate Postgres parameters in the controller
cbandy Feb 26, 2025
9018342
Rotate postgres logs according to retentionPeriod in spec.
dsessler7 Feb 20, 2025
d04885c
Clone embedded metrics variable to avoid continuous appending.
dsessler7 Feb 28, 2025
00a93f6
Add a script to help with bumping dependencies
cbandy Feb 28, 2025
6dbbf9b
Bump golang.org/x/crypto and golang.org/x/oauth2
cbandy Feb 28, 2025
b50bae9
Rotate pgbackrest (#4108)
benjaminjb Mar 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ jobs:
--env 'RELATED_IMAGE_POSTGRES_17=registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-17.2-2' \
--env 'RELATED_IMAGE_POSTGRES_17_GIS_3.4=registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-17.2-3.4-2' \
--env 'RELATED_IMAGE_STANDALONE_PGADMIN=registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-8.14-1' \
--env 'RELATED_IMAGE_COLLECTOR=ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.119.0' \
--env 'PGO_FEATURE_GATES=TablespaceVolumes=true' \
--name 'postgres-operator' ubuntu \
postgres-operator
Expand Down
5 changes: 0 additions & 5 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,6 @@ issues:
path: internal/kubernetes/discovery.go
text: k8s.io/client-go/discovery

# PGO-2010
- linters: [exhaustive]
path: internal/controller/postgrescluster/volumes.go
text: 'v1.PersistentVolumeClaimConditionType: v1.PersistentVolumeClaimControllerResizeError, v1.PersistentVolumeClaimNodeResizeError$'

# These value types have unmarshal methods.
# https://github.com/raeperd/recvcheck/issues/7
- linters: [recvcheck]
Expand Down
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,16 @@ generate-kuttl: ## Generate kuttl tests
##@ Generate

.PHONY: check-generate
check-generate: ## Check crd, deepcopy functions, and rbac generation
check-generate: generate-crd
check-generate: generate-deepcopy
check-generate: generate-rbac
check-generate: ## Check everything generated is also committed
check-generate: generate
git diff --exit-code -- config/crd
git diff --exit-code -- config/rbac
git diff --exit-code -- internal/collector
git diff --exit-code -- pkg/apis

.PHONY: generate
generate: ## Generate crd, deepcopy functions, and rbac
generate: ## Generate everything
generate: generate-collector
generate: generate-crd
generate: generate-deepcopy
generate: generate-rbac
Expand All @@ -276,6 +276,10 @@ generate-crd: tools/controller-gen
paths='./pkg/apis/...' \
output:dir='config/crd/bases' # {directory}/{group}_{plural}.yaml

.PHONY: generate-collector
generate-collector: ## Generate OTel Collector files
$(GO) generate ./internal/collector

.PHONY: generate-deepcopy
generate-deepcopy: ## Generate DeepCopy functions
generate-deepcopy: tools/controller-gen
Expand Down Expand Up @@ -304,7 +308,7 @@ endef
CONTROLLER ?= hack/tools/controller-gen
tools: tools/controller-gen
tools/controller-gen:
$(call go-get-tool,$(CONTROLLER),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.5)
$(call go-get-tool,$(CONTROLLER),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.2)

ENVTEST ?= hack/tools/setup-envtest
tools: tools/setup-envtest
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.5
controller-gen.kubebuilder.io/version: v0.17.2
name: crunchybridgeclusters.postgres-operator.crunchydata.com
spec:
group: postgres-operator.crunchydata.com
Expand Down
485 changes: 462 additions & 23 deletions config/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml

Large diffs are not rendered by default.

41 changes: 32 additions & 9 deletions config/crd/bases/postgres-operator.crunchydata.com_pgupgrades.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.5
controller-gen.kubebuilder.io/version: v0.17.2
name: pgupgrades.postgres-operator.crunchydata.com
spec:
group: postgres-operator.crunchydata.com
Expand Down Expand Up @@ -963,6 +963,7 @@ spec:
type: object
fromPostgresVersion:
description: The major version of PostgreSQL before the upgrade.
format: int32
maximum: 17
minimum: 11
type: integer
Expand All @@ -984,7 +985,7 @@ spec:
description: |-
The image pull secrets used to pull from a private registry.
Changing this value causes all running PGUpgrade pods to restart.
https://k8s.io/docs/tasks/configure-pod-container/pull-image-private-registry/
https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry
items:
description: |-
LocalObjectReference contains enough information to let you locate the
Expand All @@ -1002,6 +1003,13 @@ spec:
type: object
x-kubernetes-map-type: atomic
type: array
jobs:
description: |-
The number of simultaneous processes pg_upgrade should use.
More info: https://www.postgresql.org/docs/current/pgupgrade.html
format: int32
minimum: 0
type: integer
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand All @@ -1015,14 +1023,14 @@ spec:
type: object
type: object
postgresClusterName:
description: The name of the cluster to be updated
description: The name of the Postgres cluster to upgrade.
minLength: 1
type: string
priorityClassName:
description: |-
Priority class name for the PGUpgrade pod. Changing this
value causes PGUpgrade pod to restart.
More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption
type: string
resources:
description: Resource requirements for the PGUpgrade container.
Expand Down Expand Up @@ -1083,13 +1091,9 @@ spec:
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
type: object
toPostgresImage:
description: |-
The image name to use for PostgreSQL containers after upgrade.
When omitted, the value comes from an operator environment variable.
type: string
toPostgresVersion:
description: The major version of PostgreSQL to be upgraded to.
format: int32
maximum: 17
minimum: 11
type: integer
Expand Down Expand Up @@ -1134,11 +1138,30 @@ spec:
type: string
type: object
type: array
transferMethod:
description: |-
The method pg_upgrade should use to transfer files to the new cluster.
More info: https://www.postgresql.org/docs/current/pgupgrade.html
enum:
- Clone
- Copy
- CopyFileRange
- Link
maxLength: 15
type: string
required:
- fromPostgresVersion
- postgresClusterName
- toPostgresVersion
type: object
x-kubernetes-validations:
- rule: self.fromPostgresVersion < self.toPostgresVersion
- message: Only Copy or Link before PostgreSQL 12
rule: '!has(self.transferMethod) || (self.toPostgresVersion < 12 ? self.transferMethod
in ["Copy","Link"] : true)'
- message: Only Clone, Copy, or Link before PostgreSQL 17
rule: '!has(self.transferMethod) || (self.toPostgresVersion < 17 ? self.transferMethod
in ["Clone","Copy","Link"] : true)'
status:
description: PGUpgradeStatus defines the observed state of PGUpgrade
properties:
Expand Down
Loading