Workload replica overrides do not take precedence over high-availability for broker HPAs

未关闭 适合新手
#2,372 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@RaphaelFakhri 已经在做这个了。

开始于 2026年11月4日。

  • #2373 来自 @RaphaelFakhri —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
go
领域
backend

调研方向

从 pkg/reconciler/common/ha.go 开始,追踪 HighAvailabilityTransform 如何将工作负载副本数覆盖值与 HPA 资源匹配,然后检查 hpaTransform 中对 broker HPA 的处理。使用复现设置为 broker-ingress-hpa 添加或运行针对性测试;当其副本数为 minReplicas: 2 和 maxReplicas: 11,符合预期行为时,即为完成。

由索引模型根据 Issue 内容生成。

描述

Describe the bug

A replicas value in spec.workloads is meant to take precedence over spec.high-availability for that workload. HighAvailabilityTransform skips resources whose name equals the override name, which works for HPAs that share the workload's name (activator, webhook, eventing-webhook). The broker HPAs have different names (broker-ingress-hpa, broker-filter-hpa), so high-availability still raises them, and hpaTransform never lowers minReplicas afterwards.

Expected behavior

broker-ingress-hpa gets minReplicas: 2, maxReplicas: 11, the same as activator gets with equivalent settings.

To Reproduce

apiVersion: operator.knative.dev/v1beta1
kind: KnativeEventing
metadata:
  name: knative-eventing
  namespace: knative-eventing
spec:
  high-availability:
    replicas: 3
  workloads:
  - name: mt-broker-ingress
    replicas: 2

broker-ingress-hpa ends up with minReplicas: 3, maxReplicas: 12.

Knative release version

main (pkg/reconciler/common/ha.go)

主要语言
Go
星标
226
派生
119
平均合并
4 天 3 小时
30 天内合并 PR
9

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

knative/operator 的其他 Issue

查看 knative/operator 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。