New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bad String() in istio.io/client-go/pkg/apis/networking/v1beta1.OutboundTrafficPolicy #43643
Comments
this is how protobuf works afaik. It doesn't actually know if you set the enum or not since the registry only is the default value. Cannot tell zero vs unset in Go |
Wow, OK, I just got a history lesson on nullable/unset fields in protobuf by reading:
I don't think there is an easy solution here for Kiali to be able to use and display the correct YAML (at least when going through the protobuf encoding). |
https://protobuf.dev/programming-guides/proto3/#default
Note the last sentence, thar's our problem:
So when we deserialize it, it seems to not be explicitly set to the default value again (it remains unset). I'm closing this issue. There is nothing for the Istio client to do here. I'll have to see what hacks Kiali can do to work around this. |
See this followup issue that discusses this protobuf default handling and how it doesn't match that of the documentation (or, at least some of the documentation): #43657 |
Bug Description
Kiali uses the Istio client. We are finding the Istio client cannot generate proper yaml/json for Sidecar objects for display to the user because the value of OutboundTrafficPolicy is coming back empty when it should not be.
Here's simple replication procedures to see the problem.
Notice
outbound_traffic_policy:{}
-- why is this empty? The code set it to includemode
set to REGISTRY_ONLY:This manifests itself in the Kiali UI when you look at Sidecar objects in the Kiali YAML editor - notice the empty outbound traffic policy:
Yet, I know the outbound traffic policy is set by examining the object directly:
The entire spec looks like:
Version
Additional Information
No response
The text was updated successfully, but these errors were encountered: