update docs and revert codegen

This commit is contained in:
Felix Kunde 2021-08-17 17:30:12 +02:00
parent 1f8cfc5c98
commit 54257b8249
2 changed files with 47 additions and 14 deletions

View File

@ -473,3 +473,41 @@ Those parameters are grouped under the `tls` top-level key.
relative to the "/tls/", which is mount path of the tls secret. relative to the "/tls/", which is mount path of the tls secret.
If `caSecretName` is defined, the ca.crt path is relative to "/tlsca/", If `caSecretName` is defined, the ca.crt path is relative to "/tlsca/",
otherwise to the same "/tls/". otherwise to the same "/tls/".
## Change data capture streams
This sections enables change data capture (CDC) streams e.g. into Zalandos
distributed event broker [Nakadi](https://nakadi.io/). Parameters grouped
under the `streams` top-level key will be used by the operator to create a
CRD for Zalando's internal CDC operator. Each stream can have the following
properties:
* **streamType**
Defines the sink. Either `nakadi`, `sqs` or `wal` (which is just plain wal
files). Required.
* **database**
Name of the database from where events will be published via Postgres'
logical decoding feature. The operator will take care of updating the
database configuration (setting `wal_level: logical`, creating logical
replication slots, using output plugin `wal2json` and creating a dedicated
replication user).
* **tables**
Defines a map of table names and event types. The CDC operator is following
the [outbox pattern](https://debezium.io/blog/2019/02/19/reliable-microservices-data-exchange-with-the-outbox-pattern/)
meaning changes are only consumed from an extra table that already has the
structure of the event in the target sink. The operator will assume that this
outbox table is called like `<table>_<event_type>_outbox`.
* **filter**
Streamed events can be filtered by a jsonpath expression for each table.
* **batchSize**
Defines the size of batches in which events are consumed.
* **sqsArn**
ARN to the SQS service used as event sink when streamType is `sqs`.
* **queueName**
Name of the queue to be used in SQS service when streamType is `sqs`.

View File

@ -1,18 +1,13 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eou pipefail
GOPKG="github.com/zalando/postgres-operator" set -o errexit
SCRIPT_ROOT="$(dirname "${BASH_SOURCE[0]}")/.." set -o nounset
set -o pipefail
rm -rf "${SCRIPT_ROOT}/generated" SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/..
CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ${GOPATH}/src/k8s.io/code-generator)}
go run k8s.io/code-generator/cmd/deepcopy-gen \ bash "${CODEGEN_PKG}/generate-groups.sh" all \
--input-dirs ${GOPKG}/pkg/apis/acid.zalan.do/v1,${GOPKG}/pkg/apis/zalando.org/v1alpha1 \ github.com/zalando/postgres-operator/pkg/generated github.com/zalando/postgres-operator/pkg/apis \
-O zz_generated.deepcopy \ "acid.zalan.do:v1" \
--bounding-dirs ${GOPKG}/pkg/apis \ --go-header-file "${SCRIPT_ROOT}"/hack/custom-boilerplate.go.txt
--go-header-file "${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt" \
-o "${SCRIPT_ROOT}/generated"
cp -rv "${SCRIPT_ROOT}/generated/${GOPKG}"/* .
rm -rf "${SCRIPT_ROOT}/generated"