-
Notifications
You must be signed in to change notification settings - Fork 34
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
Added response header for traffic splitting feature #401
Conversation
@@ -157,6 +157,7 @@ class CanaryProperties { | |||
|
|||
class TrafficSplittingProperties { | |||
var zoneName = "" | |||
var headerName = "" |
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.
you can add some default value here
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 have this empty value just to have an option not to add this header, and it can be configured as default in application.yaml for example?
@@ -359,7 +359,8 @@ class EnvoyEgressRoutesFactory( | |||
.withClusterWeight(routeSpec.clusterName, routeSpec.clusterWeights.main) | |||
.withClusterWeight( | |||
getAggregateClusterName(routeSpec.clusterName, properties), | |||
routeSpec.clusterWeights.secondary | |||
routeSpec.clusterWeights.secondary, | |||
routeSpec.clusterName |
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.
Do we need to pass any value to this header? How this header will be named? Maybe there should be a only boolean value which indicates if request was forwarded to secondary cluster
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.
so the header name is configured by this property headerName in SnpashotProperty, and the value I set as a cluster just so it can be possible to filter by it
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.
but it will be in <HeaderName>: <service-name>
format?
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.
well I add it the same way as all other headers are added: this.addResponseHeadersToAdd(buildHeader(key, value))
so I guess it will be in a correct format
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.
and I build HeaderValueOption which is envoy structure
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.
so what is a purpose of this header? to know if the request was splited to secondary cluster? if that is true, imo the value should be a boolean value or something different than service-name.
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.
and maybe for not splited traffic this values should be false
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.
kk I changed to boolean, but what would be a purpose of this tag with false value?
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.
hmm
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.
nvm :D
@Ferdudas97 up 🌝 |
closes allegro-internal/flex-roadmap#476