uint64/int64 fields in Istio CRDs cannot be set via apimachinery
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go
- Domain
- api, networking
Research direction
Start with the ConsistentHashLB message in destination_rule.proto and trace how its int64/uint64 fields are represented in the generated CRD. Reproduce the issue by creating the resource with Kubernetes client-go and inspect the API server validation error. Done means the affected CRD resource can be created without the reported type validation error.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Go
- Stars
- 523
- Forks
- 623
- Avg merge
- 5d 20h
- Merged PRs (30d)
- 4
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from istio/api
-
Gateway CRD accepts both credentialName and tlsCertificates in server TLS settingsPossibly taken @RaphaelFakhri claimed this 23 days ago. Openarea/networking area/user experience
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
area/user experience kind/docs kind/enhancement
Difficulty 5/5 Over a week Newbie friendliness 40/100
Maintainers usually reply within 1 day
-
area/networking area/user experience kind/docs kind/enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
[release-1.29] change default of statsCompression to trueMay be free again @keithmattix claimed this 304 days ago, and no pull request is open. Open
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
Similar issues
-
bug raised-by:verifier to:worker
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
medici-finance/assay#7835 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
golang-malawi/qatarina#496 ·
Maintainers usually reply within 2 days
-
hive size:simple
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
documentation stage:review
Difficulty 1/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
wso2/identity-customer-data-service#430 ·
Maintainers usually reply within 1 day