refactor(seaweedfs): render every COSI class variant from one table and drop the vendored class patch

オープン
#5,454 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
38/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
helm, kubernetes, yaml

調査の方向性

Start by reading the listed COSI templates and patch in packages/system/seaweedfs and packages/extra/seaweedfs, then inspect the suffix lists in seaweedfs.yaml and packages/apps/bucket/templates/bucketclaim.yaml. Check whether an empty cosi.bucketClassName disables the vendored chart output, and identify the Helm ownership annotations needed for adoption. Done means all variants render from one table, the collision check uses it, the patch is removed, and the upgrade test covers adoption.

索引モデルが issue の本文から書いたものです。

説明

area/storage kind/cleanup triage/needs-triage

Problem / motivation

The set of COSI class variants (BucketClass "", -lock, -lock-noretention; BucketAccessClass "", -readonly, -public) is written out in several places that must change together:

  • packages/system/seaweedfs/patches/cosi-bucket-class-lock-readonly.patch, a patch to the vendored upstream chart that renders the base classes for the Simple and MultiZone topologies;
  • packages/extra/seaweedfs/templates/client/cosi-bucket-class.yaml for the Client topology;
  • packages/extra/seaweedfs/templates/storage-pool-bucket-classes.yaml for storage pools;
  • the two suffix lists in the name-collision check in packages/extra/seaweedfs/templates/seaweedfs.yaml (around lines 80-92);
  • packages/apps/bucket/templates/bucketclaim.yaml, which builds class names by appending the same suffixes.

Adding a variant means editing all of them, including a patch to an upstream chart, and nothing checks that they agree.

Proposed solution

Keep the variant table in one helper in packages/extra/seaweedfs and render every class, for every topology and pool, from it; feed the collision check from the same table. Set cosi.bucketClassName so the vendored chart renders no classes, and delete the patch.

Scope check

  • This affects a single component / package (if it spans many, consider a design proposal)
  • I can describe the expected behavior concretely (if not, consider a Discussion first)

Alternatives considered

Leave it and accept a multi-file change per variant; variants are added rarely.

Additional context

Moving the base classes from the system release to the extra release changes which Helm release owns existing cluster-scoped objects, so it needs a one-time adoption (Helm ownership annotations) and an upgrade test. I have not checked that an empty cosi.bucketClassName makes the vendored template render nothing. The bucket chart would still build names by concatenation; publishing the names from the table is a separate step.

主要言語
Go
スター
2.2k
フォーク
209
平均マージ
4日 14時間
マージ済み PR(30日)
140

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cozystack/cozystack のほかの issue

cozystack/cozystack の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。