Feat: Add support for stickiness for primary deployment in Istio#1861
Conversation
Signed-off-by: Renato Vassão <renato.vassao@mindbodyonline.com>
Signed-off-by: Renato Vassão <renato.vassao@mindbodyonline.com>
Signed-off-by: Renato Vassão <renato.vassao@mindbodyonline.com>
Signed-off-by: Renato Vassão <renato.vassao@mindbodyonline.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1861 +/- ##
==========================================
- Coverage 39.44% 30.01% -9.43%
==========================================
Files 287 287
Lines 22706 18460 -4246
==========================================
- Hits 8956 5541 -3415
+ Misses 12777 12188 -589
+ Partials 973 731 -242 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@stefanprodan when time permits, could you take a look? Thanks! |
stefanprodan
left a comment
There was a problem hiding this comment.
Can you please add this feature to the docs here: https://docs.flagger.app/tutorials/istio-progressive-delivery#session-affinity
Signed-off-by: Renato Vassão <renato.vassao@mindbodyonline.com>
c1f870b to
70c4c52
Compare
|
@stefanprodan Thank you for your review. Added a similar comment like the one for Gateway API Session Affinity. |
| func (s *SessionAffinity) BuildCookie(cookieName string) string { | ||
| func (s *SessionAffinity) BuildCookie(cookieName string, maxAge int) string { | ||
| cookie := fmt.Sprintf("%s; %s=%d", cookieName, "Max-Age", | ||
| s.GetMaxAge(), | ||
| maxAge, | ||
| ) |
There was a problem hiding this comment.
What is the reason for this change in the public API?
There was a problem hiding this comment.
The reason is that primary cookies were being generated only with the Max-Age property, and missing the additional attributes that were added in #1826. Since the value of Max-Age of the primary and canary cookie are different, we needed to pass this as a parameter.
stefanprodan
left a comment
There was a problem hiding this comment.
LGTM
Thanks @renatovassaomb 🏅
Summary
Adding support to configure stickiness for primary deployment for Istio Provider.
Currently the implementation is only available for Gateway API provider.
Changes
primarySessionAffinityCookiefield to Canary CRD status.Testing