uint64/int64 fields in Istio CRDs cannot be set via apimachinery
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- go
- 领域
- api, networking
调研方向
从 destination_rule.proto 中的 ConsistentHashLB 消息开始,跟踪其 int64/uint64 字段在生成的 CRD 中是如何表示的。使用 Kubernetes client-go 创建资源来复现问题,并检查 API server 的验证错误。当受影响的 CRD 资源可以创建且不再出现报告的类型验证错误时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Bug description
If a CRD defined via protobuf contains a primitive int64/uint64 field, it will be impossible to set using kubernetes client-go. The API server will log a validation error along these lines:
spec.subsets[0].trafficPolicy.loadBalancer.consistentHash.maglev.tableSize: Invalid value: "string": spec.subsets[0].trafficPolicy.loadBalancer.consistentHash.maglev.tableSize in body must be of type integer: "string""
Affected product area (please put an X in all that apply)
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[x] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[x] User Experience
Expected behavior
The expected behavior is that the resource will be created without API errors.
I would suggest either of the following solutions:
- Add the cue-gen:DestinationRule:intOrString:xxx option
- Change the uint64 to uint32 in the destination_rule.proto file, specifically in the ConsistentHashLB message:
message ConsistentHashLB {
message RingHash {
// The minimum number of virtual nodes to use for the hash
// ring. Defaults to 1024. Larger ring sizes result in more granular
// load distributions. If the number of hosts in the load balancing
// pool is larger than the ring size, each host will be assigned a
// single virtual node.
uint32 minimum_ring_size = 1;
};
message MagLev {
// The table size for Maglev hashing. This helps in controlling the
// disruption when the backend hosts change.
// Increasing the table size reduces the amount of disruption.
// The table size must be prime number less than 5000011.
// If it is not specified, the default is 65537.
uint32 table_size = 1;
};
...
}
Steps to reproduce the bug
- Define a CRD using protobuf that includes primitive int64 or uint64 fields.(e.g. tableSize field of DestinationRule)
- Attempt to create an instance of this CRD using kubernetes client-go.
- Observe the validation error in the API server logs.
Version (include the output of istioctl version --remote and kubectl version)
- istioctl version --remote: 1.16.1
- kubectl version: v1.25.2
How was Istio installed?
istioctl
Environment where bug was observed (cloud vendor, OS, etc)
MacOS sequoia v15.1.1
Additionally, please consider attaching a cluster state archive by attaching
the dump file to this issue.
- 主要语言
- Go
- 星标
- 523
- 派生
- 623
- 平均合并
- 5 天 20 小时
- 30 天内合并 PR
- 4
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
istio/api 的其他 Issue
-
Gateway CRD accepts both credentialName and tlsCertificates in server TLS settings可能已有人在做 @RaphaelFakhri 于 23 天前认领。 未关闭area/networking area/user experience
难度 2/5 1-3 小时 新手友好度 35/100
维护者通常 1 天内回复
-
area/user experience kind/docs kind/enhancement
难度 5/5 一周以上 新手友好度 40/100
维护者通常 1 天内回复
-
area/networking area/user experience kind/docs kind/enhancement
难度 5/5 一周以上 新手友好度 45/100
维护者通常 1 天内回复
-
[release-1.29] change default of statsCompression to true可能重新可做 @keithmattix 于 304 天前认领,目前没有进行中的 PR。 未关闭
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 45/100
维护者通常 1 天内回复
相似的 Issue
-
bug raised-by:verifier to:worker
难度 2/5 1-3 小时 新手友好度 88/100
medici-finance/assay#7835 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
golang-malawi/qatarina#496 ·
维护者通常 2 天内回复
-
hive size:simple
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
documentation stage:review
难度 1/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
Type/Bug
难度 2/5 1-3 小时 新手友好度 82/100
wso2/identity-customer-data-service#430 ·
维护者通常 1 天内回复