feat(database): add declarative management of foreign servers by EdwinaZhu · Pull Request #8401 · cloudnative-pg/cloudnative-pg
dosubot
bot
added
the
size:XXL
label
Sep 8, 2025
EdwinaZhu
changed the title
Draft: declarative management for Foreign Server
Feat: Declarative management for Foreign Server
rossigee pushed a commit to rossigee/cloudnative-pg that referenced this pull request
Oct 2, 2025…ative-pg#8401) Add support for managing PostgreSQL Foreign Data Wrappers (FDWs) with foreign servers declaratively via the `spec.servers` field in the `Database` custom resource. This enables Kubernetes-native, privilege-aware lifecycle management of foreign servers without requiring direct SQL execution or superuser privileges. Supported configuration includes `name`, `ensure`, `usage` grants/revokes, and `options`. A foreign data wrapper must already exist. Only foreign servers explicitly listed in `spec.servers` are reconciled; others remain untouched. Reconciliation uses PostgreSQL’s native `CREATE SERVER`, `ALTER SERVER`, and `DROP SERVER` commands. Closes cloudnative-pg#8063 Signed-off-by: YingZhu <yingzhu3@andrew.cmu.edu> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
THE-BRAHMA pushed a commit to THE-BRAHMA/cloudnative-pg that referenced this pull request
Oct 30, 2025…ative-pg#8401) Add support for managing PostgreSQL Foreign Data Wrappers (FDWs) with foreign servers declaratively via the `spec.servers` field in the `Database` custom resource. This enables Kubernetes-native, privilege-aware lifecycle management of foreign servers without requiring direct SQL execution or superuser privileges. Supported configuration includes `name`, `ensure`, `usage` grants/revokes, and `options`. A foreign data wrapper must already exist. Only foreign servers explicitly listed in `spec.servers` are reconciled; others remain untouched. Reconciliation uses PostgreSQL’s native `CREATE SERVER`, `ALTER SERVER`, and `DROP SERVER` commands. Closes cloudnative-pg#8063 Signed-off-by: YingZhu <yingzhu3@andrew.cmu.edu> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> Signed-off-by: theBrahma <office.utpal.brahma@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters