-
Notifications
You must be signed in to change notification settings - Fork 339
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
fix(kuma-cp) Ingress improvements #840
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
return nil, err | ||
} | ||
return &any.Any{TypeUrl: googleApis + proto.MessageName(pb), Value: buffer.Bytes()}, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe #839 should benefit from this one too. @lobkovilya
tags := map[string]string{ | ||
"service": "backend", | ||
"version": "v1", | ||
"cloud": "aws", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we increase the number of tags to have higher chances to get a difference (eventually)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem was very visible with 100 iterations with those 3 of tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's all my findings :) Looks good!
pkg/util/proto/marshal_any.go
Outdated
const googleApis = "type.googleapis.com/" | ||
|
||
// When saving Snapshot in SnapshotCache we generate version based on proto.Equal() | ||
// Therefore we need deterministic way of marshaling Any which is part of the Protobuff on which we execute Equal() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: Protobuff
-> Protobuf
pkg/util/proto/marshal_any.go
Outdated
const googleApis = "type.googleapis.com/" | ||
|
||
// When saving Snapshot in SnapshotCache we generate version based on proto.Equal() | ||
// Therefore we need deterministic way of marshaling Any which is part of the Protobuff on which we execute Equal() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: marshaling
-> marshalling
Summary
While testing and working with Ingress I found a couple of small problems
proto.Equal
to send snapshot to Envoy if anything changes. This resulted in sending "the same" Envoy config to Ingress with almost every reconciliation loop (1s by default) even without changes. Snapshot was not stable for two reasonsTcpProxy
is marshaled byMarshalAny
and put intoTypedConfig
(protobuffs inside protobuffs).MarshalAny
When having manylb.tags
inMetadataMatch
is not marshaled deterministically. It turned out it can be marshaled deterministically with special settings. I createdutil
for it.Empty
inTypedConfig
so our tests pass.generateXDS
methods following the example of the outbound proxy generator.Documentation
Internal stuff only. Nothing to document.