Feature Request: Quota Bypass for Rolling Updates in Machine Deployments
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- azure, go
- 領域
- cloud, infrastructure
調査の方向性
machine controller の MachineDeployment のローリングアップデートと MachineSet のスケーリングのエントリポイントから開始し、マシンの作成を admission webhook のクォータ検証まで追跡します。bypass アノテーションが適格なローリングアップデート中にのみ適用される方法と、クォータ関連のエラーが他の検証失敗とどのように区別されるかを確認します。maxSurge の範囲内のローリングアップデートが、スケールアップを許可したりクォータ以外の検証をバイパスしたりせずに成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happened?
When implementing Project Quotas, we're running into a problem where rolling restarts of machine deployments fail due to quota validation. The issue occurs because during a rolling update, the machine controller temporarily creates new machines before deleting old ones, causing a brief period where the total resource usage exceeds the quota limits.
Error Message:
failed to sync Machineset replicas: admission webhook "machines.cluster.k8c.io" denied the request: requested CPU "6" would exceed current quota (quota/used "20"/"18")
Root Cause:
- Machine controller uses a rolling update strategy with
maxSurgeto maintain availability - New machines are created before old machines are deleted
- Quota validation happens at admission webhook level before the old machines are removed
- This creates a temporary overage that fails quota validation
Expected behavior
The machine controller should be able to perform rolling updates without failing quota validation when:
- The replica count of the MachineDeployment is not being increased (i.e., it's a rolling restart/update, not a scale-up)
- The temporary overage is within the
maxSurgelimits of the rolling update strategy - The total resource usage will return to normal levels once the rolling update completes
Proposed Solution:
- Add a quota bypass mechanism for machines created during rolling updates
- Use an annotation
kubermatic.io/bypass-quota-validation=trueon machines created during rolling updates - Modify the admission webhook to detect quota-related errors and bypass validation when the annotation is present
- Ensure the bypass only applies to quota-related errors, not other validation failures
How to reproduce the issue?
-
Setup a MachineDeployment with quota limits:
apiVersion: "cluster.k8s.io/v1alpha1" kind: MachineDeployment metadata: name: test-deployment spec: replicas: 3 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 1 template: spec: providerSpec: value: cloudProvider: "azure" cloudProviderSpec: vmSize: "Standard_D2s_v3" # 2 vCPUs per machine -
Set up resource quotas:
apiVersion: v1 kind: ResourceQuota metadata: name: compute-quota spec: hard: requests.cpu: "6" # Total of 3 machines * 2 CPUs = 6 CPUs -
Trigger a rolling update by changing the machine template (e.g., update the OS image or kubelet version)
-
Observe the failure when the machine controller tries to create the 4th machine (3 existing + 1 new for rolling update)
Additional details
Current Flow:
MachineDeployment Update → MachineSet Scaling → Machine Creation → Quota Check → FAIL
Proposed Flow:
MachineDeployment Update → MachineSet Scaling → Machine Creation (with bypass annotation) → Quota Check → BYPASS → SUCCESS
- 主要言語
- Go
- スター
- 326
- フォーク
- 140
- 平均マージ
- 5時間 51分
- マージ済み PR(30日)
- 13
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
kubermatic/machine-controller のほかの issue
-
Align kubebuilder markers with shipped CRDs対応中かも @KhizerRehan が 31 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
kubermatic/machine-controller#2091 ·
メンテナーはふだん 1 日以内に返信
-
customer-request kind/feature
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
kubermatic/machine-controller#2104 ·
メンテナーはふだん 1 日以内に返信
-
customer-request
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
kubermatic/machine-controller#2103 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
kubermatic/machine-controller#2080 ·
メンテナーはふだん 1 日以内に返信
-
Bump Azure SDKオープン
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
kubermatic/machine-controller#2066 ·
メンテナーはふだん 1 日以内に返信
kubermatic/machine-controller の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area/frontend/library-panels automated-triage type/bug type/ux
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
microsoft/azure-linux-image-tools#954 ·
メンテナーはふだん 1 日以内に返信
-
panic "time: missing Location in call to Time.In" on MySQL via aws_rds since v0.8.0対応中かも @tylertechgraves が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
open-policy-agent/opa-control-plane#452 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[bug bash] Actor logs are controlled by Kubernetes RBAC on the pool namespace, not atespace rolesオープンarea/cli area/security bug-bash kind/docs
難易度 1/5 1〜3時間 初心者へのやさしさ 80/100
agent-substrate/substrate#3242 ·
メンテナーはふだん 1 日以内に返信