Skip to content

Use UInt32Value for min_cluster_size to fix client-go JSON apply - #3754

Open
sayap wants to merge 1 commit into
istio:masterfrom
sayap:use-uint32-for-min-cluster-size
Open

Use UInt32Value for min_cluster_size to fix client-go JSON apply#3754
sayap wants to merge 1 commit into
istio:masterfrom
sayap:use-uint32-for-min-cluster-size

Conversation

@sayap

@sayap sayap commented Aug 6, 2026

Copy link
Copy Markdown

UInt64Value serializes as a JSON string (proto3 JSON spec) but the DestinationRule CRD schema declares minClusterSize as type: integer, so DRs containing it are rejected by the API server when applied via client-go, while kubectl apply works because it bypasses protobuf marshaling. UInt32Value serializes as a JSON number, matching the schema. A host count with a default of 6 does not require uint64 range.

UInt64Value serializes as a JSON string (proto3 JSON spec) but the
DestinationRule CRD schema declares minClusterSize as type: integer,
so DRs containing it are rejected by the API server when applied via
client-go, while kubectl apply works because it bypasses protobuf
marshaling. UInt32Value serializes as a JSON number, matching the
schema. A host count with a default of 6 does not require uint64 range.
@sayap
sayap requested a review from a team as a code owner August 6, 2026 03:16
@istio-policy-bot

Copy link
Copy Markdown

🤔 🐛 You appear to be fixing a bug in Go code, yet your PR doesn't include updates to any test files. Did you forget to add a test?

Courtesy of your friendly test nag.

@istio-policy-bot

Copy link
Copy Markdown

😊 Welcome @sayap! This is either your first contribution to the Istio api repo, or it's been
a while since you've been here.

You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines
by referring to Contributing to Istio.

Thanks for contributing!

Courtesy of your friendly welcome wagon.

@istio-testing istio-testing added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test labels Aug 6, 2026
@istio-testing

Copy link
Copy Markdown
Collaborator

Hi @sayap. Thanks for your PR.

I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

1 similar comment
@istio-testing

Copy link
Copy Markdown
Collaborator

Hi @sayap. Thanks for your PR.

I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@sayap

sayap commented Aug 6, 2026

Copy link
Copy Markdown
Author

This will require a follow-up change in istio/istio, to change the type and also map back to UInt64Value in Envoy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants