feat: configurable plugin name, to run plugin versions side by side and upgrade in waves
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 18/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go, kubernetes, postgresql
- Lĩnh vực
- backend, infrastructure
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Go
- Star
- 200
- Fork
- 82
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 25
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cloudnative-pg/plugin-barman-cloud
-
docs: troubleshooting does not cover "cannot proceed with the backup as the cluster has no backup section"Có thể đã có người làm @fjvbn2003 đã nhận 3 ngày trước. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
cloudnative-pg/plugin-barman-cloud#1165 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Wrong `ObjectStore` key logged when the backup object store can't be retrieved in the instance sidecarCó thể đã có người làm @BoxBoxJason đã nhận 7 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
cloudnative-pg/plugin-barman-cloud#1142 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
cloudnative-pg/plugin-barman-cloud#1117 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
data.compression rejects zstd although barman-cloud-backup supports itCó thể đã có người làm @dgsardina đã nhận 15 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
cloudnative-pg/plugin-barman-cloud#1104 · 4 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add RBAC aggregation labels to ObjectStore editor/viewer ClusterRolesCó thể đã có người làm @stefanpeknik đã nhận 33 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
cloudnative-pg/plugin-barman-cloud#1102 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cloudnative-pg/plugin-barman-cloud
Issue tương tự
-
plugins: symlinked plugin directories are skippedCó thể đã có người làm @lab1207 đã nhận hôm nay. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
eugenioenko/ttt#1029 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Edwin-metcalf/MetCode#24 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-operator
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
keyxmakerx/Chronicle#1654 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Low] CSI plugin builds staging directories from storage_volume_id without a containment checkĐang mởarea/security kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
agent-substrate/substrate#2935 ·
Maintainer thường phản hồi trong vòng 1 ngày