Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Feature Request: Quota Bypass for Rolling Updates in Machine Deployments

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
azure, go

調査の方向性

machine controller の MachineDeployment のローリングアップデートと MachineSet のスケーリングのエントリポイントから開始し、マシンの作成を admission webhook のクォータ検証まで追跡します。bypass アノテーションが適格なローリングアップデート中にのみ適用される方法と、クォータ関連のエラーが他の検証失敗とどのように区別されるかを確認します。maxSurge の範囲内のローリングアップデートが、スケールアップを許可したりクォータ以外の検証をバイパスしたりせずに成功すれば完了です。

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

説明

customer-request kind/feature sig/cluster-management

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 maxSurge to 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:

  1. The replica count of the MachineDeployment is not being increased (i.e., it's a rolling restart/update, not a scale-up)
  2. The temporary overage is within the maxSurge limits of the rolling update strategy
  3. 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=true on 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?

  1. 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
    
  2. 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
    
  3. Trigger a rolling update by changing the machine template (e.g., update the OS image or kubelet version)

  4. 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

環境構築

はじめの一歩

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

kubermatic/machine-controller のほかの issue

kubermatic/machine-controller の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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