mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-03 14:21:21 +02:00
create CDC event stream CRD (#1570)
* provide event stream API * check manifest settings for logical decoding before creating streams * operator updates Postgres config and creates replication user * name FES like the Postgres cluster * add delete case and fix updating streams + update unit test * check if fes CRD exists before syncing * existing slot must use the same plugin * make id and payload columns configurable * sync streams only when they are defined in manifest * introduce applicationId for separate stream CRDs * add FES to RBAC in chart * disable streams in chart * switch to pgoutput plugin and let operator create publications * reflect code review and additional refactoring Co-authored-by: Paŭlo Ebermann <paul.ebermann@zalando.de>
This commit is contained in:
co-authored by
Paŭlo Ebermann
parent
8b404fd049
commit
d8a159ef1a
@@ -474,6 +474,39 @@ spec:
|
||||
type: string
|
||||
gs_wal_path:
|
||||
type: string
|
||||
streams:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- applicationId
|
||||
- database
|
||||
- tables
|
||||
properties:
|
||||
applicationId:
|
||||
type: string
|
||||
batchSize:
|
||||
type: integer
|
||||
database:
|
||||
type: string
|
||||
filter:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
tables:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: object
|
||||
required:
|
||||
- eventType
|
||||
properties:
|
||||
eventType:
|
||||
type: string
|
||||
idColumn:
|
||||
type: string
|
||||
payloadColumn:
|
||||
type: string
|
||||
teamId:
|
||||
type: string
|
||||
tls:
|
||||
|
||||
@@ -34,6 +34,22 @@ rules:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
# all verbs allowed for event streams
|
||||
{{- if .Values.enableStreams }}
|
||||
- apiGroups:
|
||||
- zalando.org
|
||||
resources:
|
||||
- fabriceventstreams
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
{{- end }}
|
||||
# to create or get/update CRDs when starting up
|
||||
- apiGroups:
|
||||
- apiextensions.k8s.io
|
||||
|
||||
@@ -368,6 +368,9 @@ configConnectionPooler:
|
||||
connection_pooler_default_cpu_limit: "1"
|
||||
connection_pooler_default_memory_limit: 100Mi
|
||||
|
||||
# Zalando's internal CDC stream feature
|
||||
enableStreams: false
|
||||
|
||||
rbac:
|
||||
# Specifies whether RBAC resources should be created
|
||||
create: true
|
||||
|
||||
Reference in New Issue
Block a user