fix(kubernetes): etcd.replicas schema accepts 2, which the chart refuses at render time

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

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
helm, kubernetes

調査の方向性

packages/apps/kubernetes/values.yamlの346~348行付近と、packages/apps/kubernetes/templates/etcd.yamlのレンダリングチェックを読みます。まず、cozyvalues-genが整数の列挙型をサポートしているか、このchartがどのようにvalues.schema.jsonを生成するかを確認してください。issueには、ジェネレーターの変更が必要かもしれないと記載されています。スキーマが1と3のみを提示し、レンダリングチェックが他の値を引き続き拒否すれば完了です。

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

説明

area/kubernetes kind/bug triage/needs-triage

Describe the bug

The tenant Kubernetes schema declares etcd.replicas as an integer with minimum: 1 and maximum: 3 (packages/apps/kubernetes/values.yaml:346-348, generated into values.schema.json), so it advertises 2 as valid. The chart accepts only 1 and 3 and fails the render on anything else (packages/apps/kubernetes/templates/etcd.yaml:3-4): an even member count tolerates no more failures than the odd count below it. Found while reviewing #4817.

Environment

  • Cozystack version: main at 8cab9b7d7bbc
  • Provider: any

To Reproduce

  1. Create or edit a Kubernetes application with etcd.replicas: 2.
  2. The write is accepted, the dashboard form allows it.
  3. The HelmRelease fails to render with etcd.replicas must be 1 or 3, got 2.

Expected behaviour

The schema says what the chart accepts, so the form offers only 1 and 3 and a client reading the schema learns the rule before the HelmRelease fails.

Actual behaviour

The value is stored and the release fails later. A running cluster keeps its previous etcd, so this is a confusing failure, not an outage.

Logs

etcd.replicas must be 1 or 3, got 2: an even member count tolerates no more failures than the odd count below it

Screenshots

Not applicable.

Additional context

The render check stays either way: the aggregated API server does not validate application specs against the schema today (#2657), so the schema change only fixes what the dashboard and other schema readers show. I have not checked whether cozyvalues-gen can emit an integer enum; if it cannot, the description already states the rule and the fix may be in the generator.

Checklist

  • I have checked the documentation
  • I have searched for similar issues
  • I have included all required information
  • I have provided clear steps to reproduce
  • I have included relevant logs
主要言語
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 を短くまとめたダイジェスト。