mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-09 09:45:43 +02:00
Add topologySpreadConstraints configuration to pod spec. (#2530)
* Add topologySpreadConstraints configuration to pod spec. * Run update-codegen.sh to add deepcopy for new field to the api. * Reuse configured TopologySpreadConstraints for logical backup. * Remove x-kubernetes-preserve-unknown-fields and XPreserveUnknownFields. * Add topologySpreadConstraint example in the complete manifest. * Add support for helm chart. * Add documentation for topologySpreadConstraint. * Update e2e test to patch topologySpreadConstraints into the postgresqls manifest. * For e2e test, updated the PVC retention policy to remove redundant PVCs. * Fix e2e test, expected PVC count in end-to-end test after config changes.
This commit is contained in:
@@ -232,6 +232,12 @@ spec:
|
||||
# values:
|
||||
# - enabled
|
||||
|
||||
# Add topology spread constraint to distribute PostgreSQL pods across all nodes labeled with "topology.kubernetes.io/zone".
|
||||
# topologySpreadConstraint:
|
||||
# - maxSkew: 1
|
||||
# topologyKey: topology.kubernetes.io/zone
|
||||
# whenUnsatisfiable: DoNotSchedule
|
||||
|
||||
# Enables change data capture streams for defined database tables
|
||||
# streams:
|
||||
# - applicationId: test-app
|
||||
|
||||
@@ -4056,6 +4056,22 @@ spec:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
topologySpreadConstraints:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
maxSkew:
|
||||
type: integer
|
||||
format: int32
|
||||
topologyKey:
|
||||
type: string
|
||||
whenUnsatisfiable:
|
||||
type: string
|
||||
enum:
|
||||
- DoNotSchedule
|
||||
- ScheduleAnyway
|
||||
useLoadBalancer:
|
||||
description: |-
|
||||
deprecated load balancer settings maintained for backward compatibility
|
||||
|
||||
Reference in New Issue
Block a user