Feature Request: Quota Bypass for Rolling Updates in Machine Deployments
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 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
- 星标
- 325
- 派生
- 140
- 平均合并
- 4 小时 3 分钟
- 30 天内合并 PR
- 13
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
kubermatic/machine-controller 的其他 Issue
-
Align kubebuilder markers with shipped CRDs可能已有人在做 @KhizerRehan 于 36 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
kubermatic/machine-controller#2091 ·
维护者通常 1 天内回复
-
customer-request kind/feature
难度 5/5 一周以上 新手友好度 12/100
kubermatic/machine-controller#2104 ·
维护者通常 1 天内回复
-
customer-request
难度 4/5 3-5 天 新手友好度 25/100
kubermatic/machine-controller#2103 · 1 个 reaction ·
维护者通常 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 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
lognorman20/monaco#7428 ·
-
docs(prompts): IF BLOCKED workflow-scope branch says to comment on the issue on jira/local trackers未关闭agent-butler-finding bug
难度 2/5 1-3 小时 新手友好度 77/100
jordansmall/spindrift#6238 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
microcks/microcks-cli#608 · 1 条评论 ·
维护者通常 1 天内回复
-
bug from-studio
难度 2/5 1-3 小时 新手友好度 65/100
esengine/DeepSeek-Reasonix#14868 ·
维护者通常 1 天内回复