feat: configurable plugin name, to run plugin versions side by side and upgrade in waves
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 18/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go, kubernetes, postgresql
調査の方向性
Start with the constant internal/cnpgi/metadata.PluginName and the cnpg.io/pluginName Service annotation, which discovery and identity both rely on. Before coding, the maintainers need to agree on the design: a configurable name, per-instance RBAC and object keys, and a shared ObjectStore CRD. Done means two plugin deployments with different names can serve different Clusters without touching each other's objects.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem?
Upgrading the plugin restarts every Cluster that uses it at the same time. The sidecar image comes from the plugin deployment (SIDECAR_IMAGE), so a new plugin version changes the instance pod spec of every Cluster that references barman-cloud.cloudnative-pg.io, and the operator rolls all of them. On a test cluster this was a 41 s outage for single-instance Clusters and a 12 s switchover for HA ones, all within the same minutes. There's no in-place path for the sidecar, unlike the instance manager's ENABLE_INSTANCE_MANAGER_INPLACE_UPDATES.
Where many independent databases share one Kubernetes cluster, we'd like to roll a plugin upgrade out in waves, the way a Postgres minor version can be moved one ImageCatalog at a time. Today that isn't possible: the plugin's name is a constant (internal/cnpgi/metadata.PluginName), so two plugin deployments at different versions can't run side by side. ObjectStore.spec.instanceSidecarConfiguration sets env, resources, args and log level, but not the sidecar image.
Describe the solution you'd like
A configurable plugin name: a flag or env var on the plugin deployment, defaulting to barman-cloud.cloudnative-pg.io. Then several plugin deployments can run side by side (for example barman-cloud-w1.cloudnative-pg.io and barman-cloud-w2.cloudnative-pg.io, each with its own sidecar image). Each Cluster names the instance it uses in .spec.plugins[].name, and an upgrade moves one instance at a time.
Details we expect it would need:
- The name used for plugin discovery (the Service's
cnpg.io/pluginNameannotation and the identity response) and the name the sidecar and operator compare against both come from that setting. - The RBAC and resources the plugin creates per Cluster are keyed so that two instances never manage the same Cluster's objects.
- The
ObjectStoreCRD stays shared. Instances at different versions must accept the same CRD version, which is already the case for patch releases.
Describe alternatives you've considered
- A sidecar image field on
ObjectStore: per database rather than per wave, and a larger change. - Operator
CLUSTERS_ROLLOUT_DELAY: spaces the restarts out, but it is one cluster-wide queue that can't be aligned with maintenance windows. - The in-tree
barmanObjectStore: deprecated.
Additional context
We'd be glad to send a PR if the approach is acceptable.
- 主要言語
- Go
- スター
- 200
- フォーク
- 82
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 19
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudnative-pg/plugin-barman-cloud のほかの issue
-
Wrong `ObjectStore` key logged when the backup object store can't be retrieved in the instance sidecar対応中かも @SamarthSRao が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cloudnative-pg/plugin-barman-cloud#1142 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cloudnative-pg/plugin-barman-cloud#1117 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
data.compression rejects zstd although barman-cloud-backup supports it対応中かも @dgsardina が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
cloudnative-pg/plugin-barman-cloud#1104 · リアクション 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Add RBAC aggregation labels to ObjectStore editor/viewer ClusterRoles対応中かも @stefanpeknik が 28 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
cloudnative-pg/plugin-barman-cloud#1102 ·
メンテナーはふだん 1 日以内に返信
-
Prefetched WAL segments are not returned until the whole batch finishes対応中かも @Kobayashi-UwU が 5 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
cloudnative-pg/plugin-barman-cloud#1149 ·
メンテナーはふだん 1 日以内に返信
cloudnative-pg/plugin-barman-cloud の issue をすべて見る
似ている issue
-
bug performance scalability
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Davidjustice28/basildb#35 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rhysd/actionlint#761 ·
-
bug needs-triage P2 tier:1-mechanical
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
krakenhavoc/cmd_and_ctrl#3652 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
puppe1990/amarra-cais#345 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
limitlessprojects/Go-Hybrid#50 ·
メンテナーはふだん 1 日以内に返信