Support zero-downtime main InstallerSet upgrades

Đang mở
#3,922 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

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
35/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
go, kubernetes
Lĩnh vực
infrastructure

Hướng nghiên cứu

Bắt đầu với MainSet và CleanupMainSet trong pkg/reconciler/kubernetes/tektoninstallerset/client/main_set.go, sau đó đọc phần finalization của TektonInstallerSet trong pkg/reconciler/kubernetes/tektoninstallerset/tektoninstallerset.go. Theo dõi ErrVersionDifferent và vòng đời hiện có của InstallerSet trước khi thiết kế việc cùng tồn tại và loại bỏ được kiểm soát bởi readiness. Hoàn thành có nghĩa là các trường hợp cùng tồn tại, chuyển giao, dọn dẹp, tính idempotency và bảo toàn tài nguyên được liệt kê đều được các bài kiểm thử bao phủ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

kind/feature
Feature request

Main InstallerSet upgrades should use a readiness-gated handoff instead of deleting the current InstallerSets before creating their replacements.

Today, a release-version mismatch calls CleanupMainSet, and the old InstallerSet finalizers delete resources from the previous manifests before replacement sets are created:

This can temporarily remove shared ConfigMaps, RBAC, Services, APIService objects, and admission webhook configurations during an operator upgrade.

Implement a blue/green-style handoff for main InstallerSets:

  1. Keep the current generation while creating the desired-generation static and workload InstallerSets.
  2. Make replacement creation idempotent so reconciliation can resume after a partial failure.
  3. Wait for all desired-generation InstallerSets to report Ready.
  4. Retire only the explicitly identified old-generation InstallerSets.
  5. During old-generation finalization, preserve resources also represented by a non-deleting successor InstallerSet and delete only resources absent from every successor.
  6. Keep full cleanup when a component is removed and no successor exists.

The design should support the static/deployment split and the optional StatefulSet path without using broad CleanupMainSet selection during retirement.

Acceptance criteria:

  • Shared resources remain available until the desired generation is Ready.
  • Resources removed from the desired manifests are still pruned after a successful handoff.
  • Interrupted replacement creation resumes without producing duplicate sets.
  • Component deletion retains the existing cleanup behavior.
  • Tests cover generation coexistence, readiness-gated retirement, partial creation, shared-resource preservation, and obsolete-resource deletion.

Related work: #374 introduced InstallerSets for pruning resources removed by new releases, and #2121 guards reconciliation when a resource is already being deleted.

Use case

An operator upgrade changes the main InstallerSet release version while Tekton components continue serving requests. The old and desired generations share resources such as configuration, admission registration, RBAC, and Services. Those resources must remain present until the desired generation is healthy; otherwise the upgrade can create an admission or service-availability gap even though the resources will be recreated later.

Ngôn ngữ chính
Go
Star
606
Fork
270
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
159

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tektoncd/operator

Tất cả issue của tektoncd/operator

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.